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.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 VectorContains by default JTextField components.protected booleanprotected booleanIndicates whether the user has altered an object's field valuesprotected JListThe list of items to display.static final intFields inherited from class com.nt.udc.gui.SettingsListDetailsPanel
detailsPanel, listPanel, settingsPanelFields inherited from class com.nt.udc.gui.OSAAdminBasePanel
panelIsDirty, panelIsShowing, scrollResetFields 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
ConstructorsConstructorDescriptionSplitPanel(String leftPanelLabel, String leftPanelTooltip, String rightPanelLabel, String rightPanelTooltip) Default Constructor for the class -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) Processes button actions.voidaddGUIComponents(String leftPanelLabel, String leftPanelTooltip, String rightPanelLabel, String rightPanelTooltip) Adds necessary GUI components.booleanDisplays a dialog box prompting the user to save the information to the Server.booleanRetrieves the object information from the server and populates the object list with the data.voidchangedUpdate(DocumentEvent event) protected abstract voidchangeObject(Object selected) Abstract method to create a new Object of the appropriate type.protected voiddeleteSelectedItems(Object[] selectedItems) Removes the selected items from the list.protected JButton[]protected JPanelprotected abstract VectorAbstract method to retrieve Objects from the Admin ServervoidinsertUpdate(DocumentEvent event) protected abstract ObjectAbstract method to create an object of the appropriate type with default values.protected abstract ObjectnewObjectFromDialog(Frame parent) Abstract method to display a modal dialog for the user to specify attributes of a new Object.protected abstract booleanAbstract method to indicate whether the information that the user has entered in the fields of the "...booleanDetermines if any information on the panel has been modified.protected abstract voidpopulateObjectFields(Object object) Abstract method to populate the fields in the "...protected abstract intremoveObjects(Vector objectVector) Abstract method to remove Objects from the Admin ServervoidremoveUpdate(DocumentEvent event) protected abstract booleansaveObjects(Vector objectVector) Abstract method to save Objects to the Admin Serverprotected voidEnables/Disables the buttons, based on current user selections and conditions.protected voidsetRightPanel(JPanel newPanel) booleanDisplays a confirmation dialog asking the user whether the current information should be saved to the server.protected voidvoidvalueChanged(ListSelectionEvent event) Responds to changes in the list selection.Methods inherited from class com.nt.udc.gui.SettingsListDetailsPanel
addGUIComponents, getDetailsPanel, getListPanel, getSettingsPanelMethods 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, systemUpdateMethods 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, 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, 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
-
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:
actionPerformedin interfaceActionListener
-
insertUpdate
- Specified by:
insertUpdatein interfaceDocumentListener
-
removeUpdate
- Specified by:
removeUpdatein interfaceDocumentListener
-
changedUpdate
- Specified by:
changedUpdatein interfaceDocumentListener
-
valueChanged
Responds to changes in the list selection.- Specified by:
valueChangedin 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:
beforeShowingin interfacecom.nt.udc.gui.OSAAdminPanelInterface- Overrides:
beforeShowingin 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:
beforeHidingin interfacecom.nt.udc.gui.OSAAdminPanelInterface- Overrides:
beforeHidingin classcom.nt.udc.gui.OSAAdminBasePanel- Returns:
falseif 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:
falseif 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.
-