|
The Gravey Framework and RATS RIA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object
|
+--GrvObject
|
+--MVCObserver
|
+--MVCModel
|
+--MVCScalarModel
|
+--MVCSelectionModel
This class encapsulates the data model for a selector
which indicates the currently selected item in a specified
MVCCollection 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.
Version: 2.0
Author: Bruce Wallace (PolyGlotInc.com)
See:
| Field Summary | |
<static> Object |
kNothingSelected
|
<static> Object |
kPropertyIdSelect
|
| Constructor Summary | |
MVCSelectionModel
()
|
|
| Method Summary | |
void
|
_select(<Object> k,<boolean> optLenient)
select the specified Collection item but dont publish |
void
|
_selectNothing()
select "nothing" but dont publish |
void
|
_unselect( )
select the zero-th item (NOT "nothing selected") but dont publish |
Object
|
getCount( )
return the size of our MVCCollection model |
String
|
getDescription(i)
return the specified MVCCollection item formatted as description |
int
|
getIndex( optKey )
return the index into the MVCCollection model of the specified key (or the current selection if no key specified) |
Object
|
getItem(<Object> i)
return the specified item in our Collection |
Collection
|
getList( )
return our Collection model |
Object
|
getMemento()
return a memento of the current state of "this" |
Object
|
getSelection( )
return the currently selected MVCCollection item or undefined if nothing selected |
String
|
getSelectionStr( )
return the currently selected MVCCollection item formatted as string |
boolean
|
hasSelection( )
return whether there is currently a selection |
void
|
konstructor( <Object> collModel, <String> optName )
|
void
|
reselect( )
re-select the current value and publish |
void
|
select(<Object> k,<boolean> optLenient)
select the specified MVCCollection item and publish |
void
|
selectNothing()
select "nothing" and publish |
void
|
setMemento(<Object> m)
update "this" based on the given memento |
void
|
unselect( )
select the zero-th item (NOT "nothing selected") and publish |
void
|
update( )
handle MVCCollection model update event by "unselect"ing |
| Methods inherited from class MVCScalarModel |
_setValue, setValue, getValue, _setValidity, getValidity
|
| Methods inherited from class MVCModel |
dumpSubscribers, toString, dirty, clean, publish, GET, _SET, SET, updateStamp, BeginTransaction, EndTransaction, addObserver, delObserver, notifyObservers
|
| Methods inherited from class MVCObserver |
subscribe
|
| Methods inherited from class GrvObject |
souper
|
| Field Detail |
<static> Object kNothingSelected
<static> Object kPropertyIdSelect
| Constructor Detail |
MVCSelectionModel()
| Method Detail |
void _select(<Object> k,<boolean> optLenient)
k - key of item to select
optLenient - optional flag to allow out of range to selectNothing
void _selectNothing()
void _unselect( )
Object getCount( )
String getDescription(i)
int getIndex( optKey )
Object getItem(<Object> i)
i - item key
Collection getList( )
Object getMemento()
Object getSelection( )
String getSelectionStr( )
boolean hasSelection( )
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,<boolean> optLenient)
k - key of item to select
optLenient - optional flag to allow out of range to selectNothing
void selectNothing()
void setMemento(<Object> m)
m - the memento
void unselect( )
void update( )
|
The Gravey Framework and RATS RIA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||