Class SplitPanel

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.nt.udc.gui.OSAAdminBasePanel
com.nt.udc.gui.SettingsListDetailsPanel
com.nt.udc.admin.client.gui.SplitPanel
All Implemented Interfaces:
com.nt.udc.gui.OSAAdminPanelInterface, AcctEventListener, ActionListener, ImageObserver, MenuContainer, Serializable, Remote, EventListener, Accessible, DocumentListener, ListSelectionListener

public abstract class SplitPanel extends com.nt.udc.gui.SettingsListDetailsPanel implements ActionListener, ListSelectionListener, DocumentListener
Panel for displaying a list of Items on the left side of a split pane, and a series of buttons and a details panel on the right side.
See Also:
  • Field Details

    • objectList

      protected JList objectList
      The list of items to display.
    • fields

      protected Vector fields
      Contains by default JTextField components.
    • objectFieldsDirty

      protected boolean objectFieldsDirty
      Indicates whether the user has altered an object's field values
    • ignoreNextListChange

      protected boolean ignoreNextListChange
    • REMOVE_FROM_LIST

      public static final int REMOVE_FROM_LIST
      See Also:
  • Constructor Details

    • SplitPanel

      public SplitPanel(String leftPanelLabel, String leftPanelTooltip, String rightPanelLabel, String rightPanelTooltip)
      Default Constructor for the class
  • Method Details

    • addGUIComponents

      public void addGUIComponents(String leftPanelLabel, String leftPanelTooltip, String rightPanelLabel, String rightPanelTooltip)
      Adds necessary GUI components.
      Removes List and Detail areas, and sets up Settings area.
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Processes button actions.
      Specified by:
      actionPerformed in interface ActionListener
    • insertUpdate

      public void insertUpdate(DocumentEvent event)
      Specified by:
      insertUpdate in interface DocumentListener
    • removeUpdate

      public void removeUpdate(DocumentEvent event)
      Specified by:
      removeUpdate in interface DocumentListener
    • changedUpdate

      public void changedUpdate(DocumentEvent event)
      Specified by:
      changedUpdate in interface DocumentListener
    • valueChanged

      public void valueChanged(ListSelectionEvent event)
      Responds to changes in the list selection.
      Specified by:
      valueChanged in interface ListSelectionListener
      Parameters:
      event - Event that was generaged
    • updateObjectList

      protected void updateObjectList()
    • setButtonState

      protected void setButtonState()
      Enables/Disables the buttons, based on current user selections and conditions.
    • panelIsDirty

      public boolean panelIsDirty()
      Determines if any information on the panel has been modified.
    • deleteSelectedItems

      protected void deleteSelectedItems(Object[] selectedItems)
      Removes the selected items from the list.
    • getButtons

      protected JButton[] getButtons()
    • setRightPanel

      protected void setRightPanel(JPanel newPanel)
    • getListDetailsPanel

      protected JPanel getListDetailsPanel()
    • beforeShowing

      public boolean beforeShowing()
      Retrieves the object information from the server and populates the object list with the data.
      Specified by:
      beforeShowing in interface com.nt.udc.gui.OSAAdminPanelInterface
      Overrides:
      beforeShowing in class com.nt.udc.gui.OSAAdminBasePanel
      Returns:
      false, if the panel should not be displayed.
    • beforeHiding

      public boolean beforeHiding()
      Displays a dialog box prompting the user to save the information to the Server.
      Specified by:
      beforeHiding in interface com.nt.udc.gui.OSAAdminPanelInterface
      Overrides:
      beforeHiding in class com.nt.udc.gui.OSAAdminBasePanel
      Returns:
      false if the user cancelled the save operation, indicating that this panel should remain visible.
    • showSaveDialog

      public boolean showSaveDialog()
      Displays a confirmation dialog asking the user whether the current information should be saved to the server.
      Returns:
      false if the user cancelled the operation.
    • getObjects

      protected abstract Vector getObjects() throws Exception
      Abstract method to retrieve Objects from the Admin Server
      Returns:
      Vector of Objects retrieved from the Admin Server
      Throws:
      Exception
    • saveObjects

      protected abstract boolean saveObjects(Vector objectVector)
      Abstract method to save Objects to the Admin Server
      Parameters:
      objectVector - Vector of Objects to be persisted by the AdminServer.
      Returns:
      true if objects were successfully saved.
    • changeObject

      protected abstract void changeObject(Object selected)
      Abstract method to create a new Object of the appropriate type.
    • newDefaultObject

      protected abstract Object newDefaultObject()
      Abstract method to create an object of the appropriate type with default values.
      Returns:
      Object that was created
    • newObjectFromDialog

      protected abstract Object newObjectFromDialog(Frame parent)
      Abstract method to display a modal dialog for the user to specify attributes of a new Object. Instantiates an Object of the appropriate type with those values and returns it.
      Parameters:
      parent - Parent frame for the dialog
      Returns:
      The object that was created.
    • objectFieldsValid

      protected abstract boolean objectFieldsValid()
      Abstract method to indicate whether the information that the user has entered in the fields of the "... Details" panel is valid.
      Returns:
      boolean indicating whether the information is valid
    • populateObjectFields

      protected abstract void populateObjectFields(Object object)
      Abstract method to populate the fields in the "... Details" panel with information from the given Object.
      Parameters:
      object - Object to populate the fields with
    • removeObjects

      protected abstract int removeObjects(Vector objectVector)
      Abstract method to remove Objects from the Admin Server
      Parameters:
      objectVector - Vector of Objects to be removed by the AdminServer.