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.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected RmaListModelprotected RmaListModelstatic final intprotected RmaJListprotected RmaJListstatic final intflags indicating whether this is a move or copy dialog mover dialog is the defaultstatic final intstatic final intFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidDescription of the Methodprotected voidremove an item from the selected list and put them in the available listvoidvoidaddTopPanel(JPanel panel) Adds a feature to the TopPanel attribute of the MoverPanel objectprotected booleancanBeMovedDown(List selectedAvailableValues) protected booleancanBeMovedUp(List selectedAvailableValues) protected booleancanBeRemoved(List selectedSelectedValues) voidObject[]Gets the available objects as an array.Gets the available objects in a vector.booleanintget the dialog type.Object[]Gets the selected objects as an array.Gets the selected objects in a vector.booleanReturns true if the user clicke the Cancel ButtonbooleansaveForm()Saves the data from the formvoidsetAvailableCellRenderer(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 listvoidsetAvailableListAllowsDuplicates(boolean allowsDuplicates) voidsetAvailableListLabel(String label) Sets the AvailableListLabel attribute of the MoverPanel objectvoidsetCaseInsensitiveSort(boolean caseInsensitiveSort) voidFills the lists with argument data.voidSet's the textarea's text.voidsetDescVisible(boolean b) Controls whether the textarea is visible.voidsetDialogType(int type) set the dialog type.voidsetListsEnabled(boolean enabled) voidsetMoveUpDownVisible(boolean b) voidSet's the notearea's text.voidsetNoteVisible(boolean b) Controls whether the notearea is visible.voidsetSelectedCellRenderer(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 listvoidsetSelectedListLabel(String label) Sets the SelectedListLabel attribute of the MoverPanel objectvoidsetSelectionType(int type) Sets this dialog's selection mode to 0..1 or 0..nvoidsetSortEnabled(boolean sorted) set whether the Lists are sorted or not.Methods inherited from class rma.swing.RmaJPanel
forwardModifiedEvents, isModified, save, setFowardModifiedEvents, setModifiedMethods inherited from class rma.swing.EnabledJPanel
getToolTipText, setComponentEnabled, setEnabledMethods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods 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, updateMethods 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, validateTreeMethods 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:
actionPerformedin 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_DIALOGor
COPY_DIALOG- Parameters:
type- the new dialog type
-
getDialogType
public int getDialogType()get the dialog type. Returns one of:
MOVER_DIALOGor
COPY_DIALOG- Returns:
- the dialog type
-
canBeMovedUp
-
canBeMovedDown
-
canBeRemoved
-
setListsEnabled
public void setListsEnabled(boolean enabled) -
setAvailableListAllowsDuplicates
public void setAvailableListAllowsDuplicates(boolean allowsDuplicates)
-