|
The Gravy Framework | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object
|
+--OObject
|
+--Observer
|
+--Model
|
+--ScalarModel
|
+--SelectionModel
This class encapsulates the data model for a selector
which indicates the currently selected item in a specified
Collection data model. This means that the range of legal values
for this model's value is [0..Collection.getCount()-1] plus
a "nothing selected" value.
See:
| Constructor Summary | |
SelectionModel
()
|
|
| Method Summary | |
void
|
_select(<Object> k)
select the specified Collection item but dont publish |
void
|
_unselect( )
select the zero-th item (NOT "nothing selected") but dont publish |
Object
|
getCount( )
return the size of our Collection model |
String
|
getDescription(i)
return the currently selected Collection item formatted as description |
int
|
getIndex( )
return the index into the Collection model of the current selection |
Object
|
getItem(<Object> i)
return the specified item in our Collection |
Collection
|
getList( )
return our Collection model |
Object
|
getSelection( )
return the currently selected Collection item |
String
|
getSelectionStr( )
return the currently selected Collection item formatted as string |
void
|
konstructor( <Object> collModel, <String> optName )
|
void
|
reselect( )
re-select the current value and publish |
void
|
select(<Object> k)
select the specified Collection item and publish |
void
|
unselect( )
select the zero-th item (NOT "nothing selected") and publish |
void
|
update( )
handle Collection model update event by "unselect"ing |
| Methods inherited from class ScalarModel |
_setValue, setValue, getValue, _setValidity, getValidity
|
| Methods inherited from class Model |
dumpSubscribers, toString, dirty, clean, neverChanged, publish, GET, _SET, SET, updateStamp, BeginTransaction, EndTransaction, addObserver, delObserver, notifyObservers
|
| Methods inherited from class Observer |
subscribe
|
| Constructor Detail |
SelectionModel()
| Method Detail |
void _select(<Object> k)
k - key of item to select
void _unselect( )
Object getCount( )
String getDescription(i)
int getIndex( )
Object getItem(<Object> i)
i - item key
Collection getList( )
Object getSelection( )
String getSelectionStr( )
void konstructor( <Object> collModel, <String> optName )
collModel - Collection data model we select from
optName - optional name of this instance
void reselect( )
void select(<Object> k)
k - key of item to select
void unselect( )
void update( )
|
The Gravy Framework | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||