|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--org.skunk.swing.DualListPanel
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.
Inner classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
DualListPanel(java.lang.Object[] sourceItems,
java.lang.Object[] sinkItems)
constructs a DualListPanel with the given source and sink values. |
|
DualListPanel(java.lang.Object[] sourceItems,
java.lang.Object[] sinkItems,
java.lang.String sourceLabel,
java.lang.String sinkLabel)
constructs a DualListPanel with the given source and sink values and labels. |
Method Summary | |
void |
addListDataListener(javax.swing.event.ListDataListener ldl)
add a listener to the data model of the left JList |
javax.swing.JButton |
getAddButton()
provides access to the add button |
java.lang.Object[] |
getChosenItems()
returns the items in the right JList |
javax.swing.JButton |
getDownButton()
provides access to the down button |
javax.swing.JButton |
getRemoveButton()
provides access to the remove button |
javax.swing.JButton |
getUpButton()
provides access to the up button |
void |
removeListDataListener(javax.swing.event.ListDataListener ldl)
remove a listener from the data model of the left JList |
void |
reset()
returns panel and models to original state at time of construction. |
void |
reset(java.lang.Object[] chosenItems)
sets the contents of the right JList to the given values, and places other values currently in the DualListPanel in the left JList |
void |
reset(java.lang.Object[] sourceItems,
java.lang.Object[] sinkItems)
populates the JLists with the given source and sink values. |
void |
setAddLabel(java.lang.String addLabel)
sets the label of the add button. |
void |
setDownLabel(java.lang.String downLabel)
sets the label of the down button |
void |
setListPreferredSize(java.awt.Dimension d)
sets the preferred size of both lists. |
void |
setRemoveLabel(java.lang.String removeLabel)
sets the label of the remove button |
void |
setSinkListLabelText(java.lang.String sinkListLabelText)
sets the label of the right JList |
void |
setSourceListLabelText(java.lang.String sourceListLabelText)
sets the label of the left JList |
void |
setUpLabel(java.lang.String upLabel)
sets the label of the up button |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUIClassID, paramString, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DualListPanel(java.lang.Object[] sourceItems, java.lang.Object[] sinkItems)
sourceItems
- the source values (will appear in the left JList)sinkItems
- the sink values (will appear in the right JList)public DualListPanel(java.lang.Object[] sourceItems, java.lang.Object[] sinkItems, java.lang.String sourceLabel, java.lang.String sinkLabel)
sourceItems
- the source values (will appear in the left JList)sinkItems
- the sink values (will appear in the right JList)sourceLabel
- the label text for the left JListsinkLabel
- the label text for the right JListMethod Detail |
public void reset()
public void reset(java.lang.Object[] sourceItems, java.lang.Object[] sinkItems)
sourceItems
- the new contents of the left JListsinkITems
- the new contents of the right JListpublic void reset(java.lang.Object[] chosenItems)
chosenItems
- the items the right JList should containpublic java.lang.Object[] getChosenItems()
public void addListDataListener(javax.swing.event.ListDataListener ldl)
ldl
- the listenerpublic void removeListDataListener(javax.swing.event.ListDataListener ldl)
ldl
- the listenerpublic javax.swing.JButton getAddButton()
public javax.swing.JButton getRemoveButton()
public javax.swing.JButton getUpButton()
public javax.swing.JButton getDownButton()
public void setListPreferredSize(java.awt.Dimension d)
d
- the preferred sizepublic void setAddLabel(java.lang.String addLabel)
addLabel
- the new labelpublic void setRemoveLabel(java.lang.String removeLabel)
removeLabel
- the new labelpublic void setUpLabel(java.lang.String upLabel)
upLabel
- the new labelpublic void setDownLabel(java.lang.String downLabel)
downLabel
- the new labelpublic void setSourceListLabelText(java.lang.String sourceListLabelText)
sourceListLabelText
- the new labelpublic void setSinkListLabelText(java.lang.String sinkListLabelText)
sinkListLabelText
- the new label
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |