public class ListSelectionControl extends java.lang.Object implements GUIControl
| Constructor and Description |
|---|
ListSelectionControl() |
ListSelectionControl(javax.swing.ListModel model) |
| Modifier and Type | Method and Description |
|---|---|
void |
doAction()
Subclasses should override this to take action whenever an action should
occur (generally when the user hits return in the field).
|
javax.swing.JComponent |
getGUI() |
javax.swing.JList |
getJList() |
javax.swing.JScrollPane |
getJScrollPane() |
int |
getSelectedIndex() |
java.lang.Object |
getSelectedItem() |
void |
optimizeForLongList()
Call this to tweak for longer listings.
|
void |
selectAndShowIndex(int index) |
void |
selectIndex(int index)
Selects the given item.
|
void |
selectionModified()
Subclasses should override this to take action whenever the selection set
changes.
|
void |
setModel(javax.swing.ListModel newModel) |
void |
setSelectedIndex(int newIndex) |
void |
setSelectedItem(java.lang.Object newItem) |
void |
showIndex(int index)
Makes sure you can see the selected item.
|
protected java.lang.Object |
transformValueForRendering(java.lang.Object value)
Subclasses can override this to do a transformation on the listed Object
before sending it to the default renderer.
|
public ListSelectionControl()
public ListSelectionControl(javax.swing.ListModel model)
public void selectIndex(int index)
public void showIndex(int index)
public void selectAndShowIndex(int index)
public void setModel(javax.swing.ListModel newModel)
public void optimizeForLongList()
public int getSelectedIndex()
public void setSelectedIndex(int newIndex)
public java.lang.Object getSelectedItem()
public void setSelectedItem(java.lang.Object newItem)
public javax.swing.JList getJList()
public javax.swing.JScrollPane getJScrollPane()
public void selectionModified()
public void doAction()
protected java.lang.Object transformValueForRendering(java.lang.Object value)
You must not modify the input value; you may only provide a different Object derived from the input.
The default behavior is to return the object provided.
value - value to be renderedpublic javax.swing.JComponent getGUI()
getGUI in interface GUIControl