|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.dataselectors.filters.AbstractFilterableListModel
public abstract class 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 java.lang.Object |
_dataSource
The data source for the model. |
protected java.util.List |
_filterableItems
The list of filterable items in the model. |
protected java.lang.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 java.util.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(java.lang.Object dataSource)
Constructs a new model from the given source. |
|
AbstractFilterableListModel(java.lang.Object dataSource,
int environment)
Constructs a new model from the given source and initial filter. |
|
AbstractFilterableListModel(java.lang.Object dataSource,
java.lang.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(java.lang.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(java.lang.Object filterable)
Creates and returns the filterable item object for the given object from the native filter model. |
java.util.List |
getFilterableItems()
Returns the list of filterable items from the source model. |
protected abstract java.util.List |
getFilterableObjects()
Returns the list of native filter model objects that should be used for filterable items in the filter model. |
java.lang.Object |
getInitialFilter()
Returns the initial filter for the model. |
java.util.Locale |
getLocale()
Returns the Locale currently assigned to the model. |
java.lang.Object |
getModel()
Returns the source native model for this adapter. |
void |
setEnvironment(int environment)
Sets the operating environment to the specified value. |
void |
setInitialFilter(java.lang.Object initialFilter)
Sets the initial filter for the model. |
void |
setLocale(java.util.Locale locale)
Sets the locale assigned to this model and all the filterable items. |
void |
setModel(java.lang.Object model)
Sets the source native model for this adapter. |
Field Detail |
---|
protected java.util.Locale _locale
protected java.lang.Object _dataSource
protected java.lang.Object _initialFilter
protected boolean _initialized
protected java.util.List _filterableItems
protected int environment
Constructor Detail |
---|
public AbstractFilterableListModel()
public AbstractFilterableListModel(java.lang.Object dataSource)
dataSource
- the source modelpublic AbstractFilterableListModel(java.lang.Object dataSource, java.lang.Object initialFilter)
dataSource
- the source modelinitialFilter
- the initial filter object from the native modelpublic AbstractFilterableListModel(java.lang.Object dataSource, int environment)
dataSource
- the source modelinitialFilter
- the initial filter object from the native modelenvironment
- the current operating environmentMethod Detail |
---|
public void setInitialFilter(java.lang.Object initialFilter)
initialFilter
- the initial filter object from the native modelpublic java.lang.Object getInitialFilter()
getInitialFilter
in interface FilterableListModelInterface
public java.lang.Object getModel()
getModel
in interface FilterableListModelInterface
public void setModel(java.lang.Object model)
model
- the source native modelpublic java.util.List getFilterableItems()
getFilterableItems
in interface FilterableListModelInterface
public FilterableItemInterface getFilterableItem(java.lang.Object filterable)
getFilterableItem
in interface FilterableListModelInterface
filterable
- the object to process from the native filter model
protected void createFilterableItemList()
protected abstract java.util.List getFilterableObjects()
protected abstract FilterableItemInterface createFilterableItem(java.lang.Object filterable)
filterable
- the native model object to process
public boolean commitChanges()
commitChanges
in interface FilterableListModelInterface
public void cancel()
cancel
in interface FilterableListModelInterface
public void clearAll()
clearAll
in interface FilterableListModelInterface
public void clearFilter(int index)
clearFilter
in interface FilterableListModelInterface
index
- the index in the list of filterable items of the filter to clearpublic java.util.Locale getLocale()
getLocale
in interface FilterableListModelInterface
public void setLocale(java.util.Locale locale)
setLocale
in interface FilterableListModelInterface
locale
- 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: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |