|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
java.lang.Object
|
+--com.sas.Component
|
+--com.sas.util.selectors.BaseSelector
|
+--com.sas.util.selectors.IntegerIndexedSelector
|
+--com.sas.util.selectors.AssociationListSelector
A selector which handles collections which implement AssociationListInterface.
This includes AssociationList.
The key may be an integer, in which case the selected item is the value alist.get(integerKey()).
if the key is not an integer, the selected item is the value alist.get(get())
| Field Summary | |
static String |
RB_KEY
|
| Fields inherited from class com.sas.util.selectors.BaseSelector |
lastKey, lastValue |
| Constructor Summary | |
AssociationListSelector()
Default constructor. |
|
AssociationListSelector(Object collection,
Object key)
Construct an AssociationListSelector for a AssociationList and key |
|
| Method Summary | |
static int |
computeIntegerKey(Object key)
Convert a key/value into an integer. |
static ExtendedBeanInfo |
getExtendedBeanInfo()
|
Object |
getKey(Object value)
Return the key that corresponds to a value |
Object |
getValue(int index)
Get the value of the ith element from the association list. |
Object |
getValue(Object key)
Get the value from the association list, based on the key. |
int |
keyAsInteger(Object value)
Find the integer key associated with the value |
| Methods inherited from class com.sas.util.selectors.BaseSelector |
contentsChanged, firePropertyChange, forgetKey, forgetValue, getCollection, getKey, getValue, isFound, listen, maybeFireKey, maybeFireValue, propertyChange, setCollection, setFound, setKey, setValue, unlisten, update |
| Methods inherited from class com.sas.Component |
addLink, addPropertyChangeListener, addVetoableChangeListener, anyPropertyChangeListeners, attachModel, attachView, beansIsDesignTime, beansSetDesignTime, clone, clone, detachModel, detachView, dumpComponent, firePropertyChange, fireVetoableChange, getComponentDescription, getComponentSupportInfo, getEventMethod, getEventValues, getLinkInfo, getModelInterface, getRequiredInterfaces, getResources, getStringResource, getViewInterfaceSupportInfo, initialize, initializeComponent, isDesignTime, isLinked, queryLinks, queryLinks, refresh, removeAllLinks, removeInterfaceTraps, removeLink, removePropertyChangeListener, removeVetoableChangeListener, setComponentDescription, setComponentSupportInfo, setDefaultValues, setLinkInfo, setModelInterface, setRequiredInterfaces, setViewInterfaceSupportInfo, supportsListenerInterface, supportsRequiredInterfaces, trapInterfaceEvents, validateObject |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String RB_KEY
| Constructor Detail |
public AssociationListSelector()
public AssociationListSelector(Object collection,
Object key)
collection - The collection from which elements are selectedkey - The key, which should be an Integer or some value from which
an integer can be selected| Method Detail |
public static ExtendedBeanInfo getExtendedBeanInfo()
public Object getValue(int index)
getValue in class com.sas.util.selectors.IntegerIndexedSelectori - the item indexpublic Object getValue(Object key)
getValue(int),
else use associationList.get(Object)getValue in class com.sas.util.selectors.IntegerIndexedSelectorkey - The key for the itempublic int keyAsInteger(Object value)
keyAsInteger in class com.sas.util.selectors.IntegerIndexedSelectorvalue - a value within the association list.StaticOrderedCollectionInterface.getIndex(Object, int)public Object getKey(Object value)
getKey in class BaseSelectorcom.sas.util.selectors.BaseSelectorpublic static int computeIntegerKey(Object key)
key - some valueIllegalArgumentException - if the key cannot be
interpreted as an integer.
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||