JIDE 3.5.15

com.jidesoft.list
Class TextFieldList

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.jidesoft.swing.JideSplitPane
                      extended by com.jidesoft.list.TextFieldList
All Implemented Interfaces:
ComponentListener, ContainerListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ListSelectionListener

public class TextFieldList
extends JideSplitPane
implements ListSelectionListener

TextFieldList is a pane that contains a JTextField on the left and a JList on the right and a bunch of buttons. The customer can input new items in the JTextField on the left and press the transfer button to move it to the list on the right.

You could override isInputValid(String) to control which kind of inputs are allowed to be transferred to the list.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jidesoft.swing.JideSplitPane
JideSplitPane.AccessibleJideSplitPane
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 JComponent _originalFieldPane
           
protected  DefaultListModelWrapper _selectedListModel
           
 JComponent _selectedListPane
           
 String CLIENT_PROPERTY_ALWAYS_DISABLED
           
static String COMMAND_MOVE_DOWN
           
static String COMMAND_MOVE_LEFT
           
static String COMMAND_MOVE_RIGHT
           
static String COMMAND_MOVE_TO_BOTTOM
           
static String COMMAND_MOVE_TO_TOP
           
static String COMMAND_MOVE_UP
           
static int FIELD_TRANSFERRED_CLEAR_TEXT
           
static int FIELD_TRANSFERRED_NO_ACTION
           
static int FIELD_TRANSFERRED_SELECT_ALL
           
 
Fields inherited from class com.jidesoft.swing.JideSplitPane
_windowDeactivatedListener, CONTINUOUS_LAYOUT_PROPERTY, DIVIDER_SIZE_PROPERTY, GRIPPER_PROPERTY, HORIZONTAL_SPLIT, NON_CONTINUOUS_DIVIDER, ONE_TOUCH_EXPANDABLE_PROPERTY, ORIENTATION_PROPERTY, PROPERTY_DIVIDER_LOCATION, PROPERTY_HEAVYWEIGHT_COMPONENT_ENABLED, PROPORTIONAL_LAYOUT_PROPERTY, PROPORTIONS_PROPERTY, VERTICAL_SPLIT
 
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
TextFieldList()
          Constructs a JList with an empty model.
TextFieldList(DefaultListModel listModel)
          Constructs a JList with a list with existing list data in the right.
 
Method Summary
protected  void addButtonPanel(Container container, Component buttonPanel)
          Adds ButtonPanel to DualList.
 void addSelectedText(String text)
          Adds the designated text to the selected list.
protected  AbstractButton createButton(Action action)
          Creates the button.
protected  Container createButtonPanel()
           
protected  JList createList(ListModel model)
          Creates the right JList.
protected  JTextComponent createTextField()
           
protected  DefaultListModelWrapper createWrapperListModel(DefaultListModel listModel)
          Create a DefaultListModelWrapper to wrap the original list model.
 ListCellRenderer getCellRenderer()
          Gets the list cell renderer for the left list.
 ListCellRenderer getDisabledCellRenderer()
          Returns the disabled cell renderer.
 int getFieldTransferredMode()
          Get the field transferred mode.
 JTextComponent getOriginalField()
          Get the original JTextField.
 JComponent getOriginalFieldPane()
          Gets the component containing the original JList.
 Dimension getPreferredSize()
           
protected  String getResourceString(String key)
          Gets the localized string from resource bundle.
 ListCellRenderer getSelectedCellRenderer()
          Gets the list cell renderer for the right list.
 JList getSelectedList()
          Get the selected JList.
 JComponent getSelectedListPane()
          Gets the component containing the selected JList.
 Object[] getSelectedValues()
          Gets the selected indices.
 String getStartString()
          Get the default start string for the JTextField.
 int getVisibleRowCount()
          Returns the value of the visibleRowCount from the list.
protected  void installKeyboardAction()
           
 boolean isAllowDuplicates()
          Get the flag if duplicate selection is allowed in the TextFieldTransferBox.
 boolean isButtonEnabled(String command)
          Checks if the button is always disabled.
 boolean isButtonVisible(String command)
          Checks if the button is visible.
protected  boolean isInputValid(String text)
          Check if current input in the JTextField is valid so that the "move to right" button will be enabled.
 void moveDown()
          Moves the selected items in the right list down by one.
 void moveLeft()
          Moves the selected items in the right list to the left list.
 void moveRight()
          Moves the selected items in the left list to the right list.
 void moveToBottom()
          Moves the selected items in the right list to the bottom.
 void moveToTop()
          Moves the selected items in the right list to the top.
 void moveUp()
          Moves the selected items in the right list up by one.
protected  void performAction(String command)
          Performs the action.
 void removeSelectedText(String text)
          Removes the designated text from the selected list.
 void setAllowDuplicates(boolean allowDuplicates)
          Set the flag if duplicate selection is allowed in the DualList.
 void setButtonEnabled(String command, boolean enabled)
          Sets the button to always disabled.
 void setButtonVisible(String command, boolean visible)
          Sets the button visible or invisible.
 void setCellRenderer(ListCellRenderer cellRenderer)
          Sets the list cell renderer for the list on the left.
 void setDisabledCellRenderer(ListCellRenderer disabledCellRenderer)
          Sets the disabled cell renderer.
 void setEnabled(boolean enabled)
           
 void setFieldTransferredMode(int fieldTransferredMode)
          Set the field transferred mode.
 void setSelectedCellRenderer(ListCellRenderer selectedCellRenderer)
          Sets the list cell renderer for the list on the right.
 void setStartString(String startString)
          Set the default start string for the JTextField.
protected  void setupList(JList list)
          Customizes the JList.
 void setVisibleRowCount(int visibleRowCount)
          Sets the visible row count in the two lists.
 void valueChanged(ListSelectionEvent e)
           
 
Methods inherited from class com.jidesoft.swing.JideSplitPane
addExtraDividers, addPane, addProportion, componentAdded, componentHidden, componentMoved, componentRemoved, componentResized, componentShown, createSplitPaneDivider, doLayout, dragDividerTo, finishDraggingTo, getAccessibleContext, getDividerAt, getDividerLocation, getDividerLocations, getDividerSize, getDividerStepSize, getLeftOneTouchButtonImageIcon, getNextDividerLocation, getOrientation, getPaneAt, getPaneCount, getPreviousDividerLocation, getProportions, getRightOneTouchButtonImageIcon, indexOf, indexOfDivider, indexOfPane, insertPane, insertPane, isContinuousLayout, isDragResizable, isHeavyweightComponentEnabled, isInitiallyEven, isOneTouchExpandable, isProportionalLayout, isShowGripper, isValidateRoot, removeExtraDividers, removePane, removePane, removeProportion, resetToPreferredSizes, setContinuousLayout, setDividerLocation, setDividerLocation, setDividerLocations, setDividerSize, setDividerStepSize, setDividersVisible, setDragResizable, setHeavyweightComponentEnabled, setInitiallyEven, setLeftOneTouchButtonImageIcon, setOneTouchExpandable, setOrientation, setPaneAt, setPaneAt, setProportionalLayout, setProportions, setRightOneTouchButtonImageIcon, setShowGripper, setVisible, startDragging, updateUI
 
Methods inherited from class javax.swing.JPanel
getUI, getUIClassID, paramString, setUI
 
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, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, 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, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, 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, transferFocusBackward, 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, hide, 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, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COMMAND_MOVE_LEFT

public static final String COMMAND_MOVE_LEFT
See Also:
Constant Field Values

COMMAND_MOVE_RIGHT

public static final String COMMAND_MOVE_RIGHT
See Also:
Constant Field Values

COMMAND_MOVE_UP

public static final String COMMAND_MOVE_UP
See Also:
Constant Field Values

COMMAND_MOVE_DOWN

public static final String COMMAND_MOVE_DOWN
See Also:
Constant Field Values

COMMAND_MOVE_TO_TOP

public static final String COMMAND_MOVE_TO_TOP
See Also:
Constant Field Values

COMMAND_MOVE_TO_BOTTOM

public static final String COMMAND_MOVE_TO_BOTTOM
See Also:
Constant Field Values

_originalFieldPane

public JComponent _originalFieldPane

_selectedListPane

public JComponent _selectedListPane

CLIENT_PROPERTY_ALWAYS_DISABLED

public final String CLIENT_PROPERTY_ALWAYS_DISABLED
See Also:
Constant Field Values

_selectedListModel

protected DefaultListModelWrapper _selectedListModel

FIELD_TRANSFERRED_NO_ACTION

public static final int FIELD_TRANSFERRED_NO_ACTION
See Also:
Constant Field Values

FIELD_TRANSFERRED_CLEAR_TEXT

public static final int FIELD_TRANSFERRED_CLEAR_TEXT
See Also:
Constant Field Values

FIELD_TRANSFERRED_SELECT_ALL

public static final int FIELD_TRANSFERRED_SELECT_ALL
See Also:
Constant Field Values
Constructor Detail

TextFieldList

public TextFieldList()
Constructs a JList with an empty model.


TextFieldList

public TextFieldList(DefaultListModel listModel)
Constructs a JList with a list with existing list data in the right.

Parameters:
listModel - the list model
Method Detail

createWrapperListModel

protected DefaultListModelWrapper createWrapperListModel(DefaultListModel listModel)
Create a DefaultListModelWrapper to wrap the original list model. By default, it will create a SortableListModel without sorting. However, if you want to sort it and omit the up/down buttons, you could override this method to sort it.

Parameters:
listModel - the original list model
Returns:
the wrapper list model

createList

protected JList createList(ListModel model)
Creates the right JList. By default, we will create JList and set the name to "TextFieldTransferBox.rightList".

Parameters:
model - the list model
Returns:
a JList.

setupList

protected void setupList(JList list)
Customizes the JList.

Parameters:
list - the selected JList.

createTextField

protected JTextComponent createTextField()

getOriginalField

public JTextComponent getOriginalField()
Get the original JTextField.

Returns:
the original JTextField.

getSelectedList

public JList getSelectedList()
Get the selected JList.

Returns:
the selected JList.

getOriginalFieldPane

public JComponent getOriginalFieldPane()
Gets the component containing the original JList.

Returns:
the component containing the original JList.

getSelectedListPane

public JComponent getSelectedListPane()
Gets the component containing the selected JList.

Returns:
the component containing the selected JList.

addButtonPanel

protected void addButtonPanel(Container container,
                              Component buttonPanel)
Adds ButtonPanel to DualList.

Parameters:
container - the container between the two JLists.
buttonPanel - the button panel

getPreferredSize

public Dimension getPreferredSize()
Overrides:
getPreferredSize in class JComponent

createButtonPanel

protected Container createButtonPanel()

valueChanged

public void valueChanged(ListSelectionEvent e)
Specified by:
valueChanged in interface ListSelectionListener

createButton

protected AbstractButton createButton(Action action)
Creates the button. Our default code is
 protected AbstractButton createButton(Action action) {
     AbstractButton button = new JideButton(action);
     action.addPropertyChangeListener(new PropertyChangeListener() {
         public void propertyChange(PropertyChangeEvent evt) {
             if ("disabledIcon".equals(evt.getPropertyName())) {
                 button.setDisabledIcon((Icon) action.getValue("disabledIcon"));
             }
         }
     });
     button.setName("" + action.getValue(Action.ACTION_COMMAND_KEY));
     button.setDisabledIcon((Icon) action.getValue("disabledIcon"));
     button.setRequestFocusEnabled(false);
     return button;
 }
 

Parameters:
action - the action for the button.
Returns:
a button.

setEnabled

public void setEnabled(boolean enabled)
Overrides:
setEnabled in class JComponent

isInputValid

protected boolean isInputValid(String text)
Check if current input in the JTextField is valid so that the "move to right" button will be enabled.

The default implementation is as following:

Parameters:
text - the input text
Returns:
true if the input is valid. Otherwise false.

getSelectedValues

public Object[] getSelectedValues()
Gets the selected indices. The index in the array is the index as in the original list.

Returns:
the selected indices.
See Also:
DualListModel.getSelectedIndices()

installKeyboardAction

protected void installKeyboardAction()

setButtonVisible

public void setButtonVisible(String command,
                             boolean visible)
Sets the button visible or invisible.

Parameters:
command - the name defined in DualList. They are constants starting with "COMMAND_" such as COMMAND_MOVE_LEFT.
visible - true to show the button and false to hide.

isButtonVisible

public boolean isButtonVisible(String command)
Checks if the button is visible.

Parameters:
command - the name defined in DualList. They are constants starting with "COMMAND_" such as COMMAND_MOVE_LEFT.
Returns:
true or false.

setButtonEnabled

public void setButtonEnabled(String command,
                             boolean enabled)
Sets the button to always disabled.

Parameters:
command - the name defined in DualList. They are constants starting with "COMMAND_" such as COMMAND_MOVE_LEFT.
enabled - false to always disable the button.

isButtonEnabled

public boolean isButtonEnabled(String command)
Checks if the button is always disabled.

Parameters:
command - the name defined in DualList. They are constants starting with "COMMAND_" such as COMMAND_MOVE_LEFT.
Returns:
false if the button is always disabled. Otherwise true. Note that this method still could return true when the button isEnabled() return false.

getCellRenderer

public ListCellRenderer getCellRenderer()
Gets the list cell renderer for the left list.

Returns:
the list cell renderer for the left list.

setCellRenderer

public void setCellRenderer(ListCellRenderer cellRenderer)
Sets the list cell renderer for the list on the left. If setSelectedCellRenderer(javax.swing.ListCellRenderer) is never called, the same renderer will be used for the list on the right too.

Parameters:
cellRenderer - the new list cell renderer

getSelectedCellRenderer

public ListCellRenderer getSelectedCellRenderer()
Gets the list cell renderer for the right list. If you never set it, it will be the same as getCellRenderer().

Returns:
the list cell renderer for the right list.

setSelectedCellRenderer

public void setSelectedCellRenderer(ListCellRenderer selectedCellRenderer)
Sets the list cell renderer for the list on the right.

Parameters:
selectedCellRenderer - the new list cell renderer

getDisabledCellRenderer

public ListCellRenderer getDisabledCellRenderer()
Returns the disabled cell renderer. It will be used for the list on the left for items that are selected when the selection mode is DISABLE_SELECTION.

Returns:
the disabled cell renderer

setDisabledCellRenderer

public void setDisabledCellRenderer(ListCellRenderer disabledCellRenderer)
Sets the disabled cell renderer.

Parameters:
disabledCellRenderer - the new disabled cell renderer.

removeSelectedText

public void removeSelectedText(String text)
Removes the designated text from the selected list.

Parameters:
text - the designated text
Since:
3.5.10

addSelectedText

public void addSelectedText(String text)
Adds the designated text to the selected list.

Parameters:
text - the designated text
Since:
3.5.10

moveLeft

public void moveLeft()
Moves the selected items in the right list to the left list.


moveRight

public void moveRight()
Moves the selected items in the left list to the right list.


moveUp

public void moveUp()
Moves the selected items in the right list up by one.


moveDown

public void moveDown()
Moves the selected items in the right list down by one.


moveToTop

public void moveToTop()
Moves the selected items in the right list to the top.


moveToBottom

public void moveToBottom()
Moves the selected items in the right list to the bottom.


setVisibleRowCount

public void setVisibleRowCount(int visibleRowCount)
Sets the visible row count in the two lists. Please note, if you set a number too small, it will not have any effect because the buttons also need vertical space.

Parameters:
visibleRowCount - an integer specifying the preferred number of rows to display without requiring scrolling

getVisibleRowCount

public int getVisibleRowCount()
Returns the value of the visibleRowCount from the list.

Returns:
the value of the visibleRowCount property.
See Also:
setVisibleRowCount(int)

getFieldTransferredMode

public int getFieldTransferredMode()
Get the field transferred mode. JTextField's behavior could be controled on clicking the "move to right" button.

It could be #FIELD_TRANSFERRED_NO_ACTION which is the default value. In this mode, the JTextField just keep as is. #FIELD_TRANSFERRED_CLEAR_TEXT means the JTextField will clear back to its default start string. #FIELD_TRANSFERRED_SELECT_ALL means the JTextField will select all

Returns:
the field transferred mode.
See Also:
setFieldTransferredMode(int)

setFieldTransferredMode

public void setFieldTransferredMode(int fieldTransferredMode)
Set the field transferred mode. JTextField's behavior could be controled on clicking the "move to right" button.

It could be #FIELD_TRANSFERRED_NO_ACTION which is the default value. In this mode, the JTextField just keep as is. #FIELD_TRANSFERRED_CLEAR_TEXT means the JTextField will clear back to its default start string. #FIELD_TRANSFERRED_SELECT_ALL means the JTextField will select all

Parameters:
fieldTransferredMode - the field transferred mode
See Also:
getStartString()

getStartString

public String getStartString()
Get the default start string for the JTextField.

Returns:
the default start string.
See Also:
setStartString(String)

setStartString

public void setStartString(String startString)
Set the default start string for the JTextField.

For some scenarios, you may only want your customer to input IP address like "192.168.xx.xx". In this case, you may set the start string to "192.168." to make the use easier if you set the field transferred mode to #FIELD_TRANSFERRED_CLEAR_TEXT .

Parameters:
startString - the default start string.

getResourceString

protected String getResourceString(String key)
Gets the localized string from resource bundle. Subclass can override it to provide its own string. For example, you can customize the icons by overriding this method. The key for the icons will be in the format of "dualList.moveLeft.icon" and "dualList.moveLeft.disabledIcon" for the move left button. There are a total of eight buttons. Once you override, you can return a full qualified path to the icon resource such as "/com/yourcompany/icons/moveLeft.png". Note that the icon must be in the class path so that we can access it as resource.

Parameters:
key - the key
Returns:
the localized string.

performAction

protected void performAction(String command)
Performs the action.

Parameters:
command - the command

isAllowDuplicates

public boolean isAllowDuplicates()
Get the flag if duplicate selection is allowed in the TextFieldTransferBox.

Returns:
true if duplicate selection is allowed. Otherwise false.
See Also:
setAllowDuplicates(boolean)

setAllowDuplicates

public void setAllowDuplicates(boolean allowDuplicates)
Set the flag if duplicate selection is allowed in the DualList.

By default the flag is true to keep consistent with DualList.

Parameters:
allowDuplicates - the flag

JIDE 3.5.15