Package hec.gui
Class MoverPanel
- All Implemented Interfaces:
ActionListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
,Modifiable
- See Also:
-
Nested Class Summary
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
FieldsModifier and TypeFieldDescriptionprotected RmaListModel
protected RmaListModel
static final int
protected RmaJList
protected RmaJList
static final int
flags indicating whether this is a move or copy dialog mover dialog is the defaultstatic final int
static final int
Fields inherited from class javax.swing.JComponent
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
accessibleContext, 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Description of the Methodprotected void
remove an item from the selected list and put them in the available listvoid
void
addTopPanel
(JPanel panel) Adds a feature to the TopPanel attribute of the MoverPanel objectprotected boolean
canBeMovedDown
(List selectedAvailableValues) protected boolean
canBeMovedUp
(List selectedAvailableValues) protected boolean
canBeRemoved
(List selectedSelectedValues) void
Object[]
Gets the available objects as an array.Gets the available objects in a vector.boolean
int
get the dialog type.Object[]
Gets the selected objects as an array.Gets the selected objects in a vector.boolean
Returns true if the user clicke the Cancel Buttonboolean
saveForm()
Saves the data from the formvoid
setAvailableCellRenderer
(ListCellRenderer listCellRenderer) Add a cell renderer to the "Available" list component in order to be able to control the rendering of the items in the listvoid
setAvailableListAllowsDuplicates
(boolean allowsDuplicates) void
setAvailableListLabel
(String label) Sets the AvailableListLabel attribute of the MoverPanel objectvoid
setCaseInsensitiveSort
(boolean caseInsensitiveSort) void
Fills the lists with argument data.void
Set's the textarea's text.void
setDescVisible
(boolean b) Controls whether the textarea is visible.void
setDialogType
(int type) set the dialog type.void
setListsEnabled
(boolean enabled) void
setMoveUpDownVisible
(boolean b) void
Set's the notearea's text.void
setNoteVisible
(boolean b) Controls whether the notearea is visible.void
setSelectedCellRenderer
(ListCellRenderer listCellRenderer) Add a cell renderer to the "Selected" list component in order to be able to control the rendering of the items in the listvoid
setSelectedListLabel
(String label) Sets the SelectedListLabel attribute of the MoverPanel objectvoid
setSelectionType
(int type) Sets this dialog's selection mode to 0..1 or 0..nvoid
setSortEnabled
(boolean sorted) set whether the Lists are sorted or not.Methods inherited from class rma.swing.RmaJPanel
forwardModifiedEvents, isModified, save, setFowardModifiedEvents, setModified
Methods inherited from class rma.swing.EnabledJPanel
getToolTipText, setComponentEnabled, setEnabled
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, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, 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, 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, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
SELECTION_0_TO_1
public static final int SELECTION_0_TO_1- See Also:
-
SELECTION_0_TO_MANY
public static final int SELECTION_0_TO_MANY- See Also:
-
MOVER_DIALOG
public static final int MOVER_DIALOGflags indicating whether this is a move or copy dialog mover dialog is the default- See Also:
-
COPY_DIALOG
public static final int COPY_DIALOG- See Also:
-
_availableListModel
-
_selectedListModel
-
jList_Available
-
jList_Selected
-
-
Constructor Details
-
MoverPanel
public MoverPanel()
-
-
Method Details
-
clearForm
public void clearForm() -
setSelectedCellRenderer
Add a cell renderer to the "Selected" list component in order to be able to control the rendering of the items in the list- Parameters:
listCellRenderer
-
-
setAvailableCellRenderer
Add a cell renderer to the "Available" list component in order to be able to control the rendering of the items in the list- Parameters:
listCellRenderer
-
-
setSelectionType
public void setSelectionType(int type) Sets this dialog's selection mode to 0..1 or 0..n -
setDesc
Set's the textarea's text.- Parameters:
txt
- The new Desc value
-
setNoteVisible
public void setNoteVisible(boolean b) Controls whether the notearea is visible.- Parameters:
b
- The new DescVisible value
-
setNote
Set's the notearea's text.- Parameters:
txt
- The new Note value
-
setDescVisible
public void setDescVisible(boolean b) Controls whether the textarea is visible.- Parameters:
b
- The new DescVisible value
-
setMoveUpDownVisible
public void setMoveUpDownVisible(boolean b) -
setData
Fills the lists with argument data. Prunes the selected items from the available items.- Parameters:
avail
- The new Data valuesele
- The new Data value
-
setSelectedListLabel
Sets the SelectedListLabel attribute of the MoverPanel object- Parameters:
label
- The new SelectedListLabel value
-
setAvailableListLabel
Sets the AvailableListLabel attribute of the MoverPanel object- Parameters:
label
- The new AvailableListLabel value
-
isCanceled
public boolean isCanceled()Returns true if the user clicke the Cancel Button- Returns:
- The Canceled value
-
getSelectedObjects
Gets the selected objects as an array.- Returns:
- an array of selected objects
-
getSelectedObjectsVector
Gets the selected objects in a vector.- Returns:
- a vector containing the selected objects.
-
getAvailableObjects
Gets the available objects as an array.- Returns:
- an array of available objects.
-
getAvailableObjectsVector
Gets the available objects in a vector.- Returns:
- a vector containing the available objects.
-
actionPerformed
- Specified by:
actionPerformed
in interfaceActionListener
-
saveForm
public boolean saveForm()Saves the data from the form- Returns:
- Description of the Returned Value
-
addTopPanel
Adds a feature to the TopPanel attribute of the MoverPanel object- Parameters:
panel
- The feature to be added to the TopPanel attribute
-
action_Add
protected void action_Add()Description of the Method -
getCaseInsensitiveSort
public boolean getCaseInsensitiveSort() -
setCaseInsensitiveSort
public void setCaseInsensitiveSort(boolean caseInsensitiveSort) -
action_Remove
protected void action_Remove()remove an item from the selected list and put them in the available list -
setSortEnabled
public void setSortEnabled(boolean sorted) set whether the Lists are sorted or not. Default is that they are sorted- Parameters:
sorted
- false to turn off sorting
-
setDialogType
public void setDialogType(int type) set the dialog type. One of:
MOVER_DIALOG
or
COPY_DIALOG
- Parameters:
type
- the new dialog type
-
getDialogType
public int getDialogType()get the dialog type. Returns one of:
MOVER_DIALOG
or
COPY_DIALOG
- Returns:
- the dialog type
-
canBeMovedUp
-
canBeMovedDown
-
canBeRemoved
-
setListsEnabled
public void setListsEnabled(boolean enabled) -
setAvailableListAllowsDuplicates
public void setAvailableListAllowsDuplicates(boolean allowsDuplicates)
-