Package hec.gui

Class MoverPanel

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, Modifiable

public class MoverPanel extends RmaJPanel implements ActionListener
See Also:
  • 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_DIALOG
      flags 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

      protected RmaListModel _availableListModel
    • _selectedListModel

      protected RmaListModel _selectedListModel
    • jList_Available

      protected RmaJList jList_Available
    • jList_Selected

      protected RmaJList jList_Selected
  • Constructor Details

    • MoverPanel

      public MoverPanel()
  • Method Details

    • clearForm

      public void clearForm()
    • setSelectedCellRenderer

      public 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 list
      Parameters:
      listCellRenderer -
    • setAvailableCellRenderer

      public void 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 list
      Parameters:
      listCellRenderer -
    • setSelectionType

      public void setSelectionType(int type)
      Sets this dialog's selection mode to 0..1 or 0..n
    • setDesc

      public void setDesc(String txt)
      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

      public void setNote(String txt)
      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

      public void setData(List avail, List sele)
      Fills the lists with argument data. Prunes the selected items from the available items.
      Parameters:
      avail - The new Data value
      sele - The new Data value
    • setSelectedListLabel

      public void setSelectedListLabel(String label)
      Sets the SelectedListLabel attribute of the MoverPanel object
      Parameters:
      label - The new SelectedListLabel value
    • setAvailableListLabel

      public void setAvailableListLabel(String label)
      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

      public Object[] getSelectedObjects()
      Gets the selected objects as an array.
      Returns:
      an array of selected objects
    • getSelectedObjectsVector

      public Vector getSelectedObjectsVector()
      Gets the selected objects in a vector.
      Returns:
      a vector containing the selected objects.
    • getAvailableObjects

      public Object[] getAvailableObjects()
      Gets the available objects as an array.
      Returns:
      an array of available objects.
    • getAvailableObjectsVector

      public Vector getAvailableObjectsVector()
      Gets the available objects in a vector.
      Returns:
      a vector containing the available objects.
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • saveForm

      public boolean saveForm()
      Saves the data from the form
      Returns:
      Description of the Returned Value
    • addTopPanel

      public void addTopPanel(JPanel panel)
      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

      protected boolean canBeMovedUp(List selectedAvailableValues)
    • canBeMovedDown

      protected boolean canBeMovedDown(List selectedAvailableValues)
    • canBeRemoved

      protected boolean canBeRemoved(List selectedSelectedValues)
    • setListsEnabled

      public void setListsEnabled(boolean enabled)
    • setAvailableListAllowsDuplicates

      public void setAvailableListAllowsDuplicates(boolean allowsDuplicates)