Package com.nt.udc.admin.client.gui
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:
-
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 Vector
Contains by default JTextField components.protected boolean
protected boolean
Indicates whether the user has altered an object's field valuesprotected JList
The list of items to display.static final int
Fields inherited from class com.nt.udc.gui.SettingsListDetailsPanel
detailsPanel, listPanel, settingsPanel
Fields inherited from class com.nt.udc.gui.OSAAdminBasePanel
panelIsDirty, panelIsShowing, scrollReset
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
ConstructorsConstructorDescriptionSplitPanel
(String leftPanelLabel, String leftPanelTooltip, String rightPanelLabel, String rightPanelTooltip) Default Constructor for the class -
Method Summary
Modifier and TypeMethodDescriptionvoid
actionPerformed
(ActionEvent event) Processes button actions.void
addGUIComponents
(String leftPanelLabel, String leftPanelTooltip, String rightPanelLabel, String rightPanelTooltip) Adds necessary GUI components.boolean
Displays a dialog box prompting the user to save the information to the Server.boolean
Retrieves the object information from the server and populates the object list with the data.void
changedUpdate
(DocumentEvent event) protected abstract void
changeObject
(Object selected) Abstract method to create a new Object of the appropriate type.protected void
deleteSelectedItems
(Object[] selectedItems) Removes the selected items from the list.protected JButton[]
protected JPanel
protected abstract Vector
Abstract method to retrieve Objects from the Admin Servervoid
insertUpdate
(DocumentEvent event) protected abstract Object
Abstract method to create an object of the appropriate type with default values.protected abstract Object
newObjectFromDialog
(Frame parent) Abstract method to display a modal dialog for the user to specify attributes of a new Object.protected abstract boolean
Abstract method to indicate whether the information that the user has entered in the fields of the "...boolean
Determines if any information on the panel has been modified.protected abstract void
populateObjectFields
(Object object) Abstract method to populate the fields in the "...protected abstract int
removeObjects
(Vector objectVector) Abstract method to remove Objects from the Admin Servervoid
removeUpdate
(DocumentEvent event) protected abstract boolean
saveObjects
(Vector objectVector) Abstract method to save Objects to the Admin Serverprotected void
Enables/Disables the buttons, based on current user selections and conditions.protected void
setRightPanel
(JPanel newPanel) boolean
Displays a confirmation dialog asking the user whether the current information should be saved to the server.protected void
void
valueChanged
(ListSelectionEvent event) Responds to changes in the list selection.Methods inherited from class com.nt.udc.gui.SettingsListDetailsPanel
addGUIComponents, getDetailsPanel, getListPanel, getSettingsPanel
Methods inherited from class com.nt.udc.gui.OSAAdminBasePanel
adminServerChanged, afterHiding, afterShowing, beforeClosing, fileChanged, nodeChanged, nodeManagerChanged, nodeManagersAdded, nodeManagersRemoved, nodePerformanceUpdate, nodesAdded, nodesRemoved, printStringBuffer, printSummary, setPanelBackgroundRecursively, setPanelBackgroundRecursively, setPanelDirty, systemUpdate
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, 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, setEnabled, 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
-
objectList
The list of items to display. -
fields
Contains by default JTextField components. -
objectFieldsDirty
protected boolean objectFieldsDirtyIndicates 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
-
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
Processes button actions.- Specified by:
actionPerformed
in interfaceActionListener
-
insertUpdate
- Specified by:
insertUpdate
in interfaceDocumentListener
-
removeUpdate
- Specified by:
removeUpdate
in interfaceDocumentListener
-
changedUpdate
- Specified by:
changedUpdate
in interfaceDocumentListener
-
valueChanged
Responds to changes in the list selection.- Specified by:
valueChanged
in interfaceListSelectionListener
- 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
Removes the selected items from the list. -
getButtons
-
setRightPanel
-
getListDetailsPanel
-
beforeShowing
public boolean beforeShowing()Retrieves the object information from the server and populates the object list with the data.- Specified by:
beforeShowing
in interfacecom.nt.udc.gui.OSAAdminPanelInterface
- Overrides:
beforeShowing
in classcom.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 interfacecom.nt.udc.gui.OSAAdminPanelInterface
- Overrides:
beforeHiding
in classcom.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
Abstract method to retrieve Objects from the Admin Server- Returns:
- Vector of Objects retrieved from the Admin Server
- Throws:
Exception
-
saveObjects
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
Abstract method to create a new Object of the appropriate type. -
newDefaultObject
Abstract method to create an object of the appropriate type with default values.- Returns:
- Object that was created
-
newObjectFromDialog
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
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
Abstract method to remove Objects from the Admin Server- Parameters:
objectVector
- Vector of Objects to be removed by the AdminServer.
-