|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EntityComboBoxModel
Specifies a ComboBoxModel containing entities.
Method Summary | |
---|---|
void |
addRefreshListener(ActionListener listener)
|
EntityComboBoxModel |
createForeignKeyFilterComboBoxModel(String foreignKeyPropertyID)
Returns a combo box model for selecting a foreign key value for filtering this model |
void |
forceRefresh()
Forces a refresh of this model, disregarding the staticData directive |
Entity |
getEntity(Entity.Key primaryKey)
|
Collection<Entity> |
getForeignKeyFilterEntities(String foreignKeyPropertyID)
|
Entity |
getSelectedEntity()
|
boolean |
isStaticData()
|
void |
removeRefreshListener(ActionListener listener)
|
void |
setEntitySelectCriteria(EntitySelectCriteria entitySelectCriteria)
Sets the criteria to use when querying data |
void |
setForeignKeyFilterEntities(String foreignKeyPropertyID,
Collection<Entity> entities)
Filters this combo box model so that only entities referencing the given foreign key entities via the given foreign key property are shown. |
void |
setSelectedEntityByPrimaryKey(Entity.Key primaryKey)
Selects the entity with the given primary key, if the entity is not available in the model this method returns silently without changing the selection |
EntityComboBoxModel |
setStaticData(boolean staticData)
Specifies whether or not this model's data should be considered static, that is, only fetched once. |
Methods inherited from interface org.jminor.common.model.combobox.FilteredComboBoxModel |
---|
addItem, addSelectionListener, getNullValueString, isCleared, isNullValueSelected, removeItem, removeSelectionListener, setContents, setNullValueString |
Methods inherited from interface org.jminor.common.model.FilteredModel |
---|
addFilteringListener, contains, filterContents, getAllItems, getFilterCriteria, getFilteredItemCount, getFilteredItems, getVisibleItemCount, getVisibleItems, isFiltered, isVisible, removeFilteringListener, setFilterCriteria |
Methods inherited from interface javax.swing.ComboBoxModel |
---|
getSelectedItem, setSelectedItem |
Methods inherited from interface javax.swing.ListModel |
---|
addListDataListener, getElementAt, getSize, removeListDataListener |
Methods inherited from interface org.jminor.common.model.Refreshable |
---|
clear, refresh |
Methods inherited from interface org.jminor.framework.client.model.EntityDataProvider |
---|
getConnectionProvider, getEntityID |
Method Detail |
---|
Entity getSelectedEntity()
Entity getEntity(Entity.Key primaryKey)
primaryKey
- the primary key of the entity to fetch from this model
Collection<Entity> getForeignKeyFilterEntities(String foreignKeyPropertyID)
foreignKeyPropertyID
- the ID of the foreign key property
void setForeignKeyFilterEntities(String foreignKeyPropertyID, Collection<Entity> entities)
foreignKeyPropertyID
- the property IDentities
- the entitiesEntityComboBoxModel createForeignKeyFilterComboBoxModel(String foreignKeyPropertyID)
foreignKeyPropertyID
- the ID of the property with which values to create the combo box model
void setSelectedEntityByPrimaryKey(Entity.Key primaryKey)
primaryKey
- the primary key of the entity to selectvoid forceRefresh()
EntityComboBoxModel setStaticData(boolean staticData)
staticData
- the value
boolean isStaticData()
forceRefresh()
void setEntitySelectCriteria(EntitySelectCriteria entitySelectCriteria)
entitySelectCriteria
- the criteriavoid addRefreshListener(ActionListener listener)
listener
- a listener to be notified each time this model is refreshedvoid removeRefreshListener(ActionListener listener)
listener
- the listener to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |