All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.visuals
Class ListBoxSelector

    com.sas.visuals.ListBoxSelector

All Implemented Interfaces:
  DetailedSelectorInterface, java.awt.event.ItemListener, java.awt.ItemSelectable, java.util.EventListener

    public class ListBoxSelector

implements DetailedSelectorInterface, java.awt.event.ItemListener

ListBoxSelector is an adapter class that instantiates an UpDownListBox and provides all the neccesary method calls and functionality the DetailedListEditor would use.

Field Summary
`com.sas.collection.OrderedCollection` | `bottomButtonPanelCommands`
`com.sas.collection.OrderedCollection` | `buttonPanelCommands`
`protected java.lang.String` | `componentTitle`
`java.lang.Object` | `defaultItemValue`
`java.awt.Component` | `detailsComponent`
`protected java.awt.event.ItemListener` | `itemListenerList` ItemListener for the ListEditor
`UpDownListBox` | `listBox` UpDownListBox instance that all methods are called on
`protected boolean` | `reorderControlVisible`

Constructor Summary
`ListBoxSelector()` constructor, takes in a listBox and sets it to this.listBox
`ListBoxSelector(java.lang.String componentTitle)`

Method Summary
`void` | `add(java.lang.Object item, int pos)` Adds an object in specific index location in the UpDownListBox
`void` | `addItemListener(java.awt.event.ItemListener listener)` Add an ItemListener to listen for ItemEvents on the ListBox
`void` | `deselectAll()` deselects all items in the UpDownListBox
`void` | `detachModel(com.sas.ModelInterface model)` Detaches the model from the component
`void` | `enableButtons()`
`protected void` | `fireItemEvent(java.awt.event.ItemEvent e)`
`com.sas.util.Command[]` | `getBottomButtonPanelCommands()`
`com.sas.util.Command[]` | `getButtonPanelCommands()` Return the specific commands in order that the DetailedListEditor may add the correct buttons and methods corresponding to calls.
`java.awt.Component` | `getComponent()`
`java.lang.String` | `getComponentTitle()`
`java.lang.Object` | `getDefaultItemValue()`
`int` | `getItemCount()` Returns number of items in the UpDownListBox
`com.sas.ModelInterface` | `getModelInterface()` Returns the modelInterface attached to the component
`java.util.Vector` | `getRequiredInterfaces()`
`int[]` | `getSelectedIndexes()` Returns and array of int corresponding to all selected indexes
`java.lang.Object[]` | `getSelectedObjects()` Returns and array of objects corresponding to all selected objects
`boolean` | `isReorderControlVisible()`
`void` | `itemStateChanged(java.awt.event.ItemEvent event)`
`protected void` | `processItemEvent(java.awt.event.ItemEvent e)`
`void` | `refresh()`
`void` | `remove(int index)` Removes the object at specific index
`void` | `removeItemListener(java.awt.event.ItemListener listener)`
`void` | `replaceItem(java.lang.Object newValue, int index)` Replaces an object at a specific index with the newValue object
`void` | `select(int index)` Selects the item at the specific index in the UpDownListBox
`void` | `setComponentTitle(java.lang.String title)`
`void` | `setDefaultItemValue(java.lang.Object defaultItemValue)`
`void` | `setDefaultValues()`
`void` | `setDetailsComponent(java.awt.Component detailsComponent)`
`void` | `setEnabled(boolean bool)`
`void` | `setModelInterface(com.sas.ModelInterface model)` Sets the model on the listBox
`void` | `setReorderControlVisible(boolean hidden)`
`protected void` | `setSelectedItem(int index)` Selects the specific object in the listBox
`void` | `setSpinButtonVisible(boolean bool)` Sets the visibility of the spin button on the UpDownListBox allowing reordering or not

Field Detail

### listBox

    public UpDownListBox listBox

  UpDownListBox instance that all methods are called on

### reorderControlVisible

    protected boolean reorderControlVisible

### buttonPanelCommands

    public com.sas.collection.OrderedCollection buttonPanelCommands

### bottomButtonPanelCommands

    public com.sas.collection.OrderedCollection bottomButtonPanelCommands

### componentTitle

    protected java.lang.String componentTitle

### detailsComponent

    public java.awt.Component detailsComponent

### defaultItemValue

    public java.lang.Object defaultItemValue

### itemListenerList

    protected transient java.awt.event.ItemListener itemListenerList

  ItemListener for the ListEditor

Constructor Detail

### ListBoxSelector

    public ListBoxSelector()

  constructor, takes in a listBox and sets it to this.listBox

### ListBoxSelector

    public ListBoxSelector(java.lang.String componentTitle)

Method Detail

### setDefaultValues

    public void setDefaultValues()

### itemStateChanged

    public void itemStateChanged(java.awt.event.ItemEvent event)

  Specified by:
    `itemStateChanged` in interface `java.awt.event.ItemListener`

### setSelectedItem

    protected void setSelectedItem(int index)

  Selects the specific object in the listBox

### setReorderControlVisible

    public void setReorderControlVisible(boolean hidden)

### isReorderControlVisible

    public boolean isReorderControlVisible()

### getComponent

    public java.awt.Component getComponent()

  Specified by:
    `getComponent` in interface `DetailedSelectorInterface`

### getComponentTitle

    public java.lang.String getComponentTitle()

  Specified by:
    `getComponentTitle` in interface `DetailedSelectorInterface`

### setComponentTitle

    public void setComponentTitle(java.lang.String title)

### add

    public void add(java.lang.Object item,
                    int pos)

  Adds an object in specific index location in the UpDownListBox

  Parameters:
    `item` - object to be added to the UpDownListBox
    `pos` - the index position at which the object is added

### deselectAll

    public void deselectAll()

  deselects all items in the UpDownListBox

### detachModel

    public void detachModel(com.sas.ModelInterface model)

  Detaches the model from the component

  Specified by:
    `detachModel` in interface `DetailedSelectorInterface`

### getItemCount

    public int getItemCount()

  Returns number of items in the UpDownListBox

### getModelInterface

    public com.sas.ModelInterface getModelInterface()

  Returns the modelInterface attached to the component

  Specified by:
    `getModelInterface` in interface `DetailedSelectorInterface`

### getSelectedIndexes

    public int[] getSelectedIndexes()

  Returns and array of int corresponding to all selected indexes

### getSelectedObjects

    public java.lang.Object[] getSelectedObjects()

  Returns and array of objects corresponding to all selected objects

  Specified by:
    `getSelectedObjects` in interface `java.awt.ItemSelectable`

### refresh

    public void refresh()

### getDefaultItemValue

    public java.lang.Object getDefaultItemValue()

### setDefaultItemValue

    public void setDefaultItemValue(java.lang.Object defaultItemValue)

### replaceItem

    public void replaceItem(java.lang.Object newValue,
                            int index)

  Replaces an object at a specific index with the newValue object

  Parameters:
    `newValue` - the new object that replaces the old
    `index` - the index at which the object will replace

### remove

    public void remove(int index)

  Removes the object at specific index

### select

    public void select(int index)

  Selects the item at the specific index in the UpDownListBox

### setSpinButtonVisible

    public void setSpinButtonVisible(boolean bool)

  Sets the visibility of the spin button on the UpDownListBox allowing reordering or not

### setModelInterface

    public void setModelInterface(com.sas.ModelInterface model)

  Sets the model on the listBox

  Specified by:
    `setModelInterface` in interface `DetailedSelectorInterface`

### setDetailsComponent

    public void setDetailsComponent(java.awt.Component detailsComponent)

  Specified by:
    `setDetailsComponent` in interface `DetailedSelectorInterface`

### processItemEvent

    protected void processItemEvent(java.awt.event.ItemEvent e)

### setEnabled

    public void setEnabled(boolean bool)

### getBottomButtonPanelCommands

    public com.sas.util.Command[] getBottomButtonPanelCommands()

  Specified by:
    `getBottomButtonPanelCommands` in interface `DetailedSelectorInterface`

### getButtonPanelCommands

    public com.sas.util.Command[] getButtonPanelCommands()

  Description copied from interface: `DetailedSelectorInterface`
  Return the specific commands in order that the DetailedListEditor may add the correct buttons and methods corresponding to calls.

  Specified by:
    `getButtonPanelCommands` in interface `DetailedSelectorInterface`

### getRequiredInterfaces

    public java.util.Vector getRequiredInterfaces()

  Specified by:
    `getRequiredInterfaces` in interface `DetailedSelectorInterface`

### addItemListener

    public void addItemListener(java.awt.event.ItemListener listener)

  Add an ItemListener to listen for ItemEvents on the ListBox

  Specified by:
    `addItemListener` in interface `java.awt.ItemSelectable`
  Parameters:
    `listener` - the ItemListener to send the ItemEvents to.
  See Also:
    `ItemListener`, `removeItemListener(java.awt.event.ItemListener)`

### removeItemListener

    public void removeItemListener(java.awt.event.ItemListener listener)

  Specified by:
    `removeItemListener` in interface `java.awt.ItemSelectable`

### fireItemEvent

    protected void fireItemEvent(java.awt.event.ItemEvent e)

### enableButtons

    public void enableButtons()

  Specified by:
    `enableButtons` in interface `DetailedSelectorInterface`

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.