|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
java.lang.Object | +--com.sas.dataselectors.filters.AbstractFilterableListModel
This class takes a model as input, decides what filterable items it contains, and constructs a list of FilterableItemInterface instances that define those filterable items and their individual filter models.
| Field Summary | |
protected Object |
_dataSource
The data source for the model. |
protected List |
_filterableItems
The list of filterable items in the model. |
protected Object |
_initialFilter
An initial filter object in the native filter to focus the model on. |
protected boolean |
_initialized
A flag to indicate whether the model has been initialized or not. |
protected Locale |
_locale
The locale the model should use when generating UI elements. |
protected int |
environment
The operating environment (e.g. |
| Constructor Summary | |
AbstractFilterableListModel()
Construct a new AbstractFilterableListModel. |
|
AbstractFilterableListModel(Object dataSource)
Constructs a new model from the given source. |
|
AbstractFilterableListModel(Object dataSource,
int environment)
Constructs a new model from the given source and initial filter. |
|
AbstractFilterableListModel(Object dataSource,
Object initialFilter)
Constructs a new model from the given source and initial filter. |
|
| Method Summary | |
void |
cancel()
Cancels any changes to the filter model. |
void |
clearAll()
Removes the filters from all filterable items. |
void |
clearFilter(int index)
Removes the filter from the filterable item at the specified index. |
boolean |
commitChanges()
Commits any changes made in the filter model to the native model. |
protected abstract FilterableItemInterface |
createFilterableItem(Object filterable)
Creates an instance of FilterableItemInterface for the given object from the native filter model. |
protected void |
createFilterableItemList()
Creates the list of filterable items based on the underlying native model. |
int |
getEnvironment()
Gets the current operating environment. |
FilterableItemInterface |
getFilterableItem(Object filterable)
Creates and returns the filterable item object for the given object from the native filter model. |
List |
getFilterableItems()
Returns the list of filterable items from the source model. |
protected abstract List |
getFilterableObjects()
Returns the list of native filter model objects that should be used for filterable items in the filter model. |
Object |
getInitialFilter()
Returns the initial filter for the model. |
Locale |
getLocale()
Returns the Locale currently assigned to the model. |
Object |
getModel()
Returns the source native model for this adapter. |
void |
setEnvironment(int environment)
Sets the operating environment to the specified value. |
void |
setInitialFilter(Object initialFilter)
Sets the initial filter for the model. |
void |
setLocale(Locale locale)
Sets the locale assigned to this model and all the filterable items. |
void |
setModel(Object model)
Sets the source native model for this adapter. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Locale _locale
protected Object _dataSource
protected Object _initialFilter
protected boolean _initialized
protected List _filterableItems
protected int environment
| Constructor Detail |
public AbstractFilterableListModel()
public AbstractFilterableListModel(Object dataSource)
dataSource - the source model
public AbstractFilterableListModel(Object dataSource,
Object initialFilter)
dataSource - the source modelinitialFilter - the initial filter object from the native model
public AbstractFilterableListModel(Object dataSource,
int environment)
dataSource - the source modelinitialFilter - the initial filter object from the native modelenvironment - the current operating environment| Method Detail |
public void setInitialFilter(Object initialFilter)
initialFilter - the initial filter object from the native modelpublic Object getInitialFilter()
getInitialFilter in interface FilterableListModelInterfacepublic Object getModel()
getModel in interface FilterableListModelInterfacepublic void setModel(Object model)
model - the source native modelpublic List getFilterableItems()
getFilterableItems in interface FilterableListModelInterfacepublic FilterableItemInterface getFilterableItem(Object filterable)
getFilterableItem in interface FilterableListModelInterfacefilterable - the object to process from the native filter modelprotected void createFilterableItemList()
protected abstract List getFilterableObjects()
protected abstract FilterableItemInterface createFilterableItem(Object filterable)
filterable - the native model object to processpublic boolean commitChanges()
commitChanges in interface FilterableListModelInterfacepublic void cancel()
cancel in interface FilterableListModelInterfacepublic void clearAll()
clearAll in interface FilterableListModelInterfacepublic void clearFilter(int index)
clearFilter in interface FilterableListModelInterfaceindex - the index in the list of filterable items of the filter to clearpublic Locale getLocale()
getLocale in interface FilterableListModelInterfacepublic void setLocale(Locale locale)
setLocale in interface FilterableListModelInterfacelocale - the locale to assign to all filterable items in this modelpublic void setEnvironment(int environment)
environment - The environment to set. Valid values are defined in com.sas.util.OperatingEnvironmentInterface.public int getEnvironment()
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||