de.esprit.appsuite.gui.dialog.misc

## Class CrossListAssignPanel<E>

- java.lang.Object
- - java.awt.Component
  - - java.awt.Container
    - - javax.swing.JComponent
      - - javax.swing.JPanel
        - - de.esprit.common.gui.ZPanel
          - - de.esprit.common.gui.BorderLayoutPanel
            - - de.esprit.appsuite.gui.dialog.misc.CrossListAssignPanel<E>

- All Implemented Interfaces:
    BorderLayoutConstants, Clearable, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

      public class CrossListAssignPanel<E>
      extends BorderLayoutPanel
      implements Clearable

  This panel encapsulates the reusable part of a cross-list assignment layout. It displays two lists with two buttons in between which are used to exchange items between the lists. Both lists use the same `ModifyFlag`. If this flag is set, you know that a cross assignment has been taken place.
  Author:
    Rainer Buesch
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class javax.swing.JPanel

      `javax.swing.JPanel.AccessibleJPanel`

    - ### Nested classes/interfaces inherited from class javax.swing.JComponent

      `javax.swing.JComponent.AccessibleJComponent`

    - ### Nested classes/interfaces inherited from class java.awt.Container

      `java.awt.Container.AccessibleAWTContainer`

    - ### Nested classes/interfaces inherited from class java.awt.Component

      `java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy`

  - ### Field Summary

    - ### 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 de.esprit.common.gui.comp.BorderLayoutConstants

      `CENTER, EAST, NORTH, SOUTH, WEST`

    - ### Fields inherited from interface java.awt.image.ImageObserver

      `ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CrossListAssignPanel()`
    `CrossListAssignPanel(int visibleRows, int cellWidth, ListSelectionMode selectionMode)`

  - ### Method Summary

    Methods
    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)`

    - ### Methods inherited from class de.esprit.common.gui.ZPanel

      `addBorder, contains, getTileIcon, insertBorder, paintComponent, setTileIcon, setTileIcon, setTitledBorder`

    - ### Methods inherited from class javax.swing.JPanel

      `getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI`

    - ### Methods inherited from class javax.swing.JComponent

      `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`

    - ### Methods inherited from class java.awt.Container

      `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`

    - ### Methods inherited from class java.awt.Component

      `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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### CrossListAssignPanel

          public CrossListAssignPanel()

    - #### CrossListAssignPanel

          public CrossListAssignPanel(int visibleRows,
                              int cellWidth,
                              ListSelectionMode selectionMode)

  - ### Method Detail

    - #### setListCellRenderer

          public void setListCellRenderer(javax.swing.ListCellRenderer renderer)

    - #### hasSortButtons

          protected boolean hasSortButtons()

      Defines whether sort buttons should be added for manually sorting the right list

    - #### createLeftListTitleText

          protected NlsKey createLeftListTitleText()

      Creates the base-label for the title-border of the left list

    - #### createRightListTitleText

          protected NlsKey createRightListTitleText()

      Creates the base-label for the title-border of the right list

    - #### setSelectionMode

          public final void setSelectionMode(ListSelectionMode mode)

    - #### getSelectionMode

          public final ListSelectionMode getSelectionMode()

    - #### getActionClear

          public final ZAction getActionClear()

      Returns the action to clear the assignment.
      See Also:
        `clear()`

    - #### setAvailableValues

          public final void setAvailableValues(java.util.Collection<E> values)

    - #### setAvailableValues

          public final void setAvailableValues(E[] values)

    - #### selectValues

          public final void selectValues(java.util.Collection<E> c)

    - #### selectValues

          public final void selectValues(E... values)

    - #### selectValue

          public final void selectValue(E value)

    - #### unselectValue

          public final void unselectValue(E value)

    - #### unselectValues

          public final void unselectValues(E... values)

    - #### unselectValues

          public final void unselectValues(java.util.Collection<E> c)

    - #### clearAll

          public final void clearAll()

      Clears both, the left and the right list

    - #### clear

          public final void clear()

      Removes all assignments, thus moves all items from the right list to the left list.
      Specified by:
        `clear` in interface `Clearable`

    - #### getSelectedValues

          public java.util.List<E> getSelectedValues()

      Returns the selected values of the right list

    - #### hasSelection

          public boolean hasSelection()

      Tells whether the right list has got values

    - #### setModified

          public final void setModified(boolean b)

    - #### isModified

          public final boolean isModified()

    - #### getModifyFlag

          public final ModifyFlag getModifyFlag()

    - #### getLeftList

          public final ZList getLeftList()

    - #### getRightList

          public final ZList getRightList()

    - #### getHeaderField

          public final Field getHeaderField()

      Returns the header field if any
      See Also:
        `createHeaderField()`

    - #### setHeaderValue

          public final void setHeaderValue(java.lang.Object value)

      Sets the value of the header field (if any)

    - #### createHeaderField

          protected Field createHeaderField()

      May be overridden to place a component in the NORTH area. Returns null by default.

Copyright © 2014 EsprIT-Systems. All Rights Reserved.