public class CrossListAssignPanel<E> extends BorderLayoutPanel implements Clearable
ModifyFlag
. If this flag is set, you know that a cross assignment has been taken
place.javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
CrossListAssignPanel() |
CrossListAssignPanel(int visibleRows,
int cellWidth,
ListSelectionMode selectionMode) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all assignments, thus moves all items from the right
list to the left list.
|
void |
clearAll()
Clears both, the left and the right list
|
protected Field |
createHeaderField()
May be overridden to place a component in the NORTH area.
|
protected NlsKey |
createLeftListTitleText()
Creates the base-label for the title-border of the left list
|
protected NlsKey |
createRightListTitleText()
Creates the base-label for the title-border of the right list
|
ZAction |
getActionClear()
Returns the action to clear the assignment.
|
Field |
getHeaderField()
Returns the header field if any
|
ZList |
getLeftList() |
ModifyFlag |
getModifyFlag() |
ZList |
getRightList() |
java.util.List<E> |
getSelectedValues()
Returns the selected values of the right list
|
ListSelectionMode |
getSelectionMode() |
boolean |
hasSelection()
Tells whether the right list has got values
|
protected boolean |
hasSortButtons()
Defines whether sort buttons should be added for manually sorting the right list
|
boolean |
isModified() |
void |
selectValue(E value) |
void |
selectValues(java.util.Collection<E> c) |
void |
selectValues(E... values) |
void |
setAvailableValues(java.util.Collection<E> values) |
void |
setAvailableValues(E[] values) |
void |
setHeaderValue(java.lang.Object value)
Sets the value of the header field (if any)
|
void |
setListCellRenderer(javax.swing.ListCellRenderer renderer) |
void |
setModified(boolean b) |
void |
setSelectionMode(ListSelectionMode mode) |
void |
unselectValue(E value) |
void |
unselectValues(java.util.Collection<E> c) |
void |
unselectValues(E... values) |
addBorder, contains, getTileIcon, insertBorder, paintComponent, setTileIcon, setTileIcon, setTitledBorder
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public CrossListAssignPanel()
public CrossListAssignPanel(int visibleRows, int cellWidth, ListSelectionMode selectionMode)
public void setListCellRenderer(javax.swing.ListCellRenderer renderer)
protected boolean hasSortButtons()
protected NlsKey createLeftListTitleText()
protected NlsKey createRightListTitleText()
public final void setSelectionMode(ListSelectionMode mode)
public final ListSelectionMode getSelectionMode()
public final ZAction getActionClear()
clear()
public final void setAvailableValues(java.util.Collection<E> values)
public final void setAvailableValues(E[] values)
public final void selectValues(java.util.Collection<E> c)
public final void selectValues(E... values)
public final void selectValue(E value)
public final void unselectValue(E value)
public final void unselectValues(E... values)
public final void unselectValues(java.util.Collection<E> c)
public final void clearAll()
public final void clear()
public java.util.List<E> getSelectedValues()
public boolean hasSelection()
public final void setModified(boolean b)
public final boolean isModified()
public final ModifyFlag getModifyFlag()
public final ZList getLeftList()
public final ZList getRightList()
public final Field getHeaderField()
createHeaderField()
public final void setHeaderValue(java.lang.Object value)
protected Field createHeaderField()
Copyright © 2014 EsprIT-Systems. All Rights Reserved.