|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.visuals.SelectionGroup
public class SelectionGroup
SelectionGroup is a class used to group and manipulate SelectableInterface objects.
SelectableInterface objects have a buttonModel that holds the selected state for
that SelectableInterface object. The SelectionGroup handles setting the state
of the buttonModel when the SelectableInterface object is selected or deselected.
The SelectionGroup is a non-visual group of objects that can be visual or not.
Notes:
SelectableInterface
,
Serialized FormField Summary | |
---|---|
static java.lang.String |
RB_KEY
|
Constructor Summary | |
---|---|
SelectionGroup()
The Default Constructor |
Method Summary | |
---|---|
void |
add(java.lang.Object selectableObject)
Adds a SelectableInterface object to the SelectionGroup. |
void |
add(java.lang.Object selectableObject,
int index)
Adds a SelectableInterface object to the SelectionGroup at the specified index. |
void |
addItemListener(java.awt.event.ItemListener l)
Add a listener to receive item events when the state of an item changes. |
void |
addItems(java.util.Enumeration items)
Add all items in the specified Enumeration. |
void |
addItems(java.util.Enumeration items,
int index)
Add all items in the specified Enumeration at the specified index. |
boolean |
containsItem(java.lang.Object item)
Test for the presence of an object set as the item property on one of the SelectableInterface objects in the collection. |
com.sas.util.transforms.TransformInterface |
getDisplayTransform()
Gets the transform used to change the item property for display on the SelectableInterface. |
static com.sas.beans.ExtendedBeanInfo |
getExtendedBeanInfo()
Returns information used by the com.sas.beans.Introspector to
augment the automatically introspected information about this SelectionGroup. |
int |
getIndex(SelectableInterface selectableObject)
Gets the index of the specified SelectableInterface object. |
com.sas.util.transforms.TransformInterface |
getInputTransform()
Gets the transform used to change the item property for input to the SelectableInterface. |
java.lang.Object |
getItem(int index)
Gets the Item object of the SelectableInterface object at the specified index. |
int |
getItemIndex(java.lang.Object item)
Gets the index of the SelectableInterface object with the specified item property. |
java.util.Enumeration |
getItemsData()
Gets an enumeration of the objects used as item properties on the SelectableInterface objects. |
com.sas.util.transforms.TransformInterface |
getOutputTransform()
Gets the transform used to change the item property for output on the SelectableInterface. |
int |
getSelectedIndex()
Gets the index of the selected SelectableInterface. |
java.lang.Object |
getSelectedItem()
Gets the item property of the selected SelectableInterface. |
java.lang.Object[] |
getSelectedObjects()
Gets the selected SelectableInterface object. |
boolean |
isDeselectable()
Returns whether or not the SelectionGroup can have no SelectableInterface objects selected. |
protected void |
processItemEvent(java.awt.event.ItemEvent e)
Processes item events occurring on this checkbox by dispatching them to any registered ItemListener objects. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Handles any property changes on the transforms. |
boolean |
remove(java.lang.Object selectableObject)
Remove a SelectableInterface from the SelectionGroup. |
void |
removeAll()
Remove all SelectableInterface objects from the SelectionGroup. |
java.lang.Object |
removeAt(int index)
Remove the SelectableInterface object at the specified index from the SelectionGroup. |
void |
removeItemListener(java.awt.event.ItemListener l)
Removes an item listener. |
void |
select(SelectableInterface selectableObject)
Select the specified SelectableInterface object. |
void |
set(int index,
java.lang.Object selectableObject)
Sets the selectableObject at the specified index. |
void |
setDefaultValues()
This method sets the initial values to the default values. |
void |
setDeselectable(boolean deselect)
Sets the SelectionGroup to deselectable, so all of the SelectableInterface objects can be deselected at the same time. |
void |
setDisplayTransform(com.sas.util.transforms.TransformInterface transform)
Sets the transform used to change the item property for display on the SelectableInterface. |
void |
setInputTransform(com.sas.util.transforms.TransformInterface transform)
Sets the transform used to change the item property for input to the SelectionGroup. |
void |
setOutputTransform(com.sas.util.transforms.TransformInterface transform)
Sets the transform used to change the item property for output from the SelectionGroup. |
void |
setSelectedIndex(int index)
Sets the selected SelectableInterface based on the specified index. |
void |
setSelectedItem(java.lang.Object selectedItem)
Sets the selected SelectableInterface based on the item. |
Methods inherited from interface com.sas.util.Enumerable |
---|
getItems |
Methods inherited from interface com.sas.util.IndexedGetInterface |
---|
get |
Methods inherited from interface com.sas.util.Countable |
---|
count |
Field Detail |
---|
public static java.lang.String RB_KEY
Constructor Detail |
---|
public SelectionGroup()
Method Detail |
---|
public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
com.sas.beans.Introspector
to
augment the automatically introspected information about this SelectionGroup.
public void add(java.lang.Object selectableObject)
add
in interface com.sas.collection.CollectionInterface
add
in class com.sas.collection.OrderedCollection
selectableObject
- the SelectableInterface object to add to the group.public void add(java.lang.Object selectableObject, int index)
add
in interface com.sas.collection.OrderedCollectionInterface
add
in class com.sas.collection.OrderedCollection
selectableObject
- the SelectableInterface to add to the group.index
- the index at which to add the SelectableInterface.public void addItemListener(java.awt.event.ItemListener l)
addItemListener
in interface java.awt.ItemSelectable
l
- the listener to recieve events.public void addItems(java.util.Enumeration items)
addItems
in interface com.sas.collection.CollectionInterface
addItems
in class com.sas.collection.OrderedCollection
items
- an Enumeration of SelectableInterface objects to add.public void addItems(java.util.Enumeration items, int index)
addItems
in interface com.sas.collection.OrderedCollectionInterface
addItems
in class com.sas.collection.OrderedCollection
items
- an Enumeration of SelectableInterface objects to add.index
- the index to add the items at.public boolean containsItem(java.lang.Object item)
containsItem
in interface SelectionGroupInterface
item
- the item to search for
OrderedCollection.contains(java.lang.Object)
public java.lang.Object[] getSelectedObjects()
getSelectedObjects
in interface java.awt.ItemSelectable
public com.sas.util.transforms.TransformInterface getDisplayTransform()
getDisplayTransform
in interface SelectionGroupInterface
setDisplayTransform(com.sas.util.transforms.TransformInterface)
public com.sas.util.transforms.TransformInterface getInputTransform()
getInputTransform
in interface SelectionGroupInterface
setInputTransform(com.sas.util.transforms.TransformInterface)
public java.util.Enumeration getItemsData()
getItemsData
in interface SelectionGroupInterface
public java.lang.Object getItem(int index)
getItem
in interface SelectionGroupInterface
index
- the index of the SelectableInterface object to get.
java.lang.IndexOutOfBoundsException
- if index is out of boundspublic com.sas.util.transforms.TransformInterface getOutputTransform()
getOutputTransform
in interface SelectionGroupInterface
setOutputTransform(com.sas.util.transforms.TransformInterface)
public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange
in interface java.beans.PropertyChangeListener
propertyChange
in class com.sas.Component
event
- property event that was changedPropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)
public void setDisplayTransform(com.sas.util.transforms.TransformInterface transform)
setDisplayTransform
in interface SelectionGroupInterface
transform
- the new TransformInterface for the displayTransformgetDisplayTransform()
public void setInputTransform(com.sas.util.transforms.TransformInterface transform)
setInputTransform
in interface SelectionGroupInterface
transform
- the new TransformInterface for the inputTransformgetInputTransform()
public void setOutputTransform(com.sas.util.transforms.TransformInterface transform)
setOutputTransform
in interface SelectionGroupInterface
transform
- the new TransformInterface for the outputTransformgetOutputTransform()
public int getIndex(SelectableInterface selectableObject)
getIndex
in interface SelectionGroupInterface
selectableObject
- the SelectableInterface to get the index of
getItemIndex(java.lang.Object)
public int getItemIndex(java.lang.Object item)
getItemIndex
in interface SelectionGroupInterface
selectableObject
- the SelectableInterface item property value to get the index of
getItem(int)
public java.lang.Object getSelectedItem()
getSelectedItem
in interface SelectionGroupInterface
setSelectedItem(java.lang.Object)
public int getSelectedIndex()
getSelectedIndex
in interface SelectionGroupInterface
setSelectedIndex(int)
public boolean isDeselectable()
isDeselectable
in interface SelectionGroupInterface
true
, when all SelectableInterface objects in the group can be deselected
at the same time, false
when one SelectableInterface object must be selected.setDeselectable(boolean)
protected void processItemEvent(java.awt.event.ItemEvent e)
e
- the item eventpublic boolean remove(java.lang.Object selectableObject)
remove
in interface com.sas.collection.CollectionInterface
remove
in class com.sas.collection.OrderedCollection
selectableObject
- the specific SelectableInterface to remove from the group.
public void removeAll()
removeAll
in interface com.sas.collection.CollectionInterface
removeAll
in class com.sas.collection.OrderedCollection
public java.lang.Object removeAt(int index)
removeAt
in interface com.sas.collection.OrderedCollectionInterface
removeAt
in class com.sas.collection.OrderedCollection
index
- the index of the SelectableInterface object to remove from the group.
public void removeItemListener(java.awt.event.ItemListener l)
removeItemListener
in interface java.awt.ItemSelectable
l
- the item listener to removepublic void select(SelectableInterface selectableObject)
select
in interface SelectionGroupInterface
selectableObject
- the SelectableInterface object to set the selected state to true.public void set(int index, java.lang.Object selectableObject)
set
in interface com.sas.collection.OrderedCollectionInterface
set
in interface IndexedSetInterface
set
in class com.sas.collection.OrderedCollection
index
- the index of the selectableObject value to setselectableObject
- the new value at index.public void setDefaultValues()
setDefaultValues
in interface com.sas.ComponentInterface
setDefaultValues
in class com.sas.Component
ComponentInterface.setDefaultValues()
public void setDeselectable(boolean deselect)
setDeselectable
in interface SelectionGroupInterface
deselect
- if true, all SelectableInterface objects can be deselected.isDeselectable()
public void setSelectedItem(java.lang.Object selectedItem)
setSelectedItem
in interface SelectionGroupInterface
selectedItem
- the item of the SelectableInterface to set selected.getSelectedItem()
public void setSelectedIndex(int index)
setSelectedIndex
in interface SelectionGroupInterface
index
- the index of the SelectableInterface to set selected.getSelectedIndex()
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |