| javax.swing.JPanel org.skunk.swing.DualListPanel
DualListPanel | public class DualListPanel extends JPanel (Code) | | a widget for making an ordered selection from a list of items.
Two JLists are separated vertically by a stack of four buttons,
add, remove, up and down. The add and remove buttons move
items from the left Jlist to the right and vice versa, respectively.
The up and down buttons move selected items of the right JList up
and down the list.
Internationalized applications should set the label properties.
|
Constructor Summary | |
public | DualListPanel(Object[] sourceItems, Object[] sinkItems) constructs a DualListPanel with the given source and sink values. | public | DualListPanel(Object[] sourceItems, Object[] sinkItems, String sourceLabel, String sinkLabel) constructs a DualListPanel with the given source and sink values and labels. |
DualListPanel | public DualListPanel(Object[] sourceItems, Object[] sinkItems)(Code) | | constructs a DualListPanel with the given source and sink values.
Parameters: sourceItems - the source values (will appear in the left JList) Parameters: sinkItems - the sink values (will appear in the right JList) |
DualListPanel | public DualListPanel(Object[] sourceItems, Object[] sinkItems, String sourceLabel, String sinkLabel)(Code) | | constructs a DualListPanel with the given source and sink values and labels.
Parameters: sourceItems - the source values (will appear in the left JList) Parameters: sinkItems - the sink values (will appear in the right JList) Parameters: sourceLabel - the label text for the left JList Parameters: sinkLabel - the label text for the right JList |
addListDataListener | public void addListDataListener(ListDataListener ldl)(Code) | | add a listener to the data model of the left JList
Parameters: ldl - the listener |
getAddButton | public JButton getAddButton()(Code) | | provides access to the add button
the add button |
getChosenItems | public Object[] getChosenItems()(Code) | | returns the items in the right JList
the chosen items |
getDownButton | public JButton getDownButton()(Code) | | provides access to the down button
the down button |
getRemoveButton | public JButton getRemoveButton()(Code) | | provides access to the remove button
the remove button |
getUpButton | public JButton getUpButton()(Code) | | provides access to the up button
the up button |
removeListDataListener | public void removeListDataListener(ListDataListener ldl)(Code) | | remove a listener from the data model of the left JList
Parameters: ldl - the listener |
reset | public void reset()(Code) | | returns panel and models to original state at time of construction.
|
reset | public void reset(Object[] sourceItems, Object[] sinkItems)(Code) | | populates the JLists with the given source and sink values.
Parameters: sourceItems - the new contents of the left JList Parameters: sinkITems - the new contents of the right JList |
reset | public void reset(Object[] chosenItems)(Code) | | sets the contents of the right JList to the given values,
and places other values currently in the DualListPanel in the left JList
Parameters: chosenItems - the items the right JList should contain |
setAddLabel | public void setAddLabel(String addLabel)(Code) | | sets the label of the add button.
Parameters: addLabel - the new label |
setDownLabel | public void setDownLabel(String downLabel)(Code) | | sets the label of the down button
Parameters: downLabel - the new label |
setListPreferredSize | public void setListPreferredSize(Dimension d)(Code) | | sets the preferred size of both lists.
Parameters: d - the preferred size |
setRemoveLabel | public void setRemoveLabel(String removeLabel)(Code) | | sets the label of the remove button
Parameters: removeLabel - the new label |
setSinkListLabelText | public void setSinkListLabelText(String sinkListLabelText)(Code) | | sets the label of the right JList
Parameters: sinkListLabelText - the new label |
setSourceListLabelText | public void setSourceListLabelText(String sourceListLabelText)(Code) | | sets the label of the left JList
Parameters: sourceListLabelText - the new label |
setUpLabel | public void setUpLabel(String upLabel)(Code) | | sets the label of the up button
Parameters: upLabel - the new label |
|
|