org.PingOO.DLAI.slave.UGM
Class DisplayPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--org.PingOO.DLAI.lib.PWidget.PPanel
                                |
                                +--org.PingOO.DLAI.slave.UGM.UGMPanel
                                      |
                                      +--org.PingOO.DLAI.slave.UGM.DisplayPanel
Direct Known Subclasses:
AliasLeafPanel, DirectoryNodePanel, UserSheetPanel

abstract class DisplayPanel
extends UGMPanel

Basic class for displaying information about a node.

Since:
PingOO 2.0
Version:
2.0
Author:
Fabrice Bouyé (bouye@cur-archamps.fr)
See Also:
Serialized Form

Inner Class Summary
protected  class DisplayPanel.AliasTargetActionListener
          Shows the target of this alias
protected  class DisplayPanel.BooleanAttributeActionListener
          Action to execute when a check box associated with an attribute changes its state.
protected static class DisplayPanel.DisplayListCellRenderer
          Renders elements in the lists.
protected static class DisplayPanel.DisplayMouseAdapter
          Mouse listener used when the user clicks on the tree.
protected static class DisplayPanel.DisplayTreeCellRenderer
          Render for trees..
protected  class DisplayPanel.ListAttributeActionListener
          Listener for buttons that will modify the content of a combo box.
protected static class DisplayPanel.ListTreeButton
          Buttons whihc is linked to both a list and a tree.
protected  class DisplayPanel.LockedBox
          A new locking check box.
protected  class DisplayPanel.PasswordAttributeActionListener
          Action to execute when a button associated with a password is clicked.
protected static class DisplayPanel.ProgramTableCellRenderer
          The renderer for the program table.
protected static class DisplayPanel.ProgramTreeCellRenderer
          Tree cell renderer for the progam tree.
protected  class DisplayPanel.QuotaLabel
          The quota label.
protected  class DisplayPanel.startSubWindowActionListener
           
protected static class DisplayPanel.TableTreeButton
          Buttons whihc is linked to both a table and a tree.
protected  class DisplayPanel.TextAttributeKeyListener
          Action used when modifying the content of a text field link with an attribute of the object.
 
Inner classes inherited from class org.PingOO.DLAI.slave.UGM.UGMPanel
UGMPanel.AllowChildBox, UGMPanel.DateTextField
 
Inner classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent, javax.swing.JComponent.IntVector, javax.swing.JComponent.KeyboardBinding, javax.swing.JComponent.KeyboardState
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AWTTreeLock
 
Field Summary
private static java.lang.String[] availablePrograms
          Shared list of available programs on the server.
protected static java.lang.String EXPORT_KEY
           
private static javax.swing.Icon EXPORTATION_BIG_ICON
          Defines a icon for the exportation root.
private static javax.swing.Icon EXPORTATION_ICON
          Defines a icon for the exportation root.
private static javax.swing.Icon EXPORTATION_LIST_ICON
          Defines a icon for the resource object inside the list.
private static javax.swing.Icon EXPORTATION_NODE_ICON
          Defines a icon for the exportation node inside the tree.
private static javax.swing.Icon LOCKED_ICON
          Defines a icon for locked objects.
protected  java.util.Hashtable lockedComponentTable
           
protected  java.util.Hashtable lockedValueTable
           
private static java.util.Hashtable panelTable
          The shared table containing all previously created panels.
private  UGM parentSlave
          The parent slave of this panel.
private static javax.swing.Icon PROGRAM_BIG_ICON
          Defines a icon for the program root.
private static javax.swing.Icon PROGRAM_ICON
          Defines a icon for the program root.
private static javax.swing.Icon PROGRAM_NODE_ICON
          Defines a icon for the program node inside the tree.
private static javax.swing.Icon QUOTA_ICON
          Defines a quota icon.
protected  java.util.Hashtable quotaComponentTable
           
protected  java.util.Hashtable quotaValueTable
           
private static javax.swing.Icon RESOURCE_BIG_ICON
          Defines a icon for the resource root.
private static javax.swing.Icon RESOURCE_ICON
          Defines a icon for the resource root.
private static javax.swing.Icon RESOURCE_NODE_ICON
          Defines a icon for the resource node inside the tree.
private static javax.swing.Icon UNLOCKED_ICON
          Defines a icon for unlocked objects.
 
Fields inherited from class org.PingOO.DLAI.slave.UGM.UGMPanel
component, componentTable, DEFAULT_FIELD_SIZE, nameField, WARNING_COLOR
 
Fields inherited from class org.PingOO.DLAI.lib.PWidget.PPanel
DEFAULT_LAYOUT, manager, module, toolTipKey
 
Fields inherited from class javax.swing.JPanel
defaultLayout, uiClassID
 
Fields inherited from class javax.swing.JComponent
_bounds, accessibleContext, alignmentX, alignmentY, ANCESTOR_USING_BUFFER, ancestorNotifier, autoscroller, border, changeSupport, clientProperties, flags, HAS_FOCUS, IS_DOUBLE_BUFFERED, IS_OPAQUE, IS_PAINTING_TILE, KEYBOARD_BINDINGS_KEY, listenerList, maximumSize, minimumSize, NEXT_FOCUS, paintImmediatelyClip, preferredSize, readObjectCallbacks, REQUEST_FOCUS_DISABLED, tmpRect, TOOL_TIP_TEXT_KEY, ui, uiClassID, UNDEFINED_CONDITION, vetoableChangeSupport, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Container
component, containerListener, containerSerializedDataVersion, dispatcher, layoutMgr, maxSize, ncomponents, serialVersionUID
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, assert, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, hasFocus, height, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, RIGHT_ALIGNMENT, serialVersionUID, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowListenerK, x, y
 
Constructor Summary
DisplayPanel(DirectoryComponent component)
          Creates a new instance.
 
Method Summary
protected  void createComboLine(FormPanel parentPanel, java.lang.String key, java.util.Hashtable labelTable, java.util.Hashtable componentTable, int row, int column)
          Creates the line for a combo box.
protected  void createComboLine(PPanel parentPanel, java.lang.String key, java.util.Hashtable labelTable, java.util.Hashtable componentTable)
          Creates the line for a combo box.
protected  PPanel createExportPanel()
          Creates the panel for the exportation management.
protected  PPanel createProgramPanel()
          Creates the panel for the list management.
protected  PPanel createResourcePanel()
          Creates the panel for the resource management.
protected  javax.swing.JComponent generateComponent(java.lang.String key, java.lang.Object value, java.util.Hashtable labelTable)
          Generates a specific component for display.
static DisplayPanel getPanelForComponent(DirectoryComponent component, UGM parentSlave)
          Return the display panel associated with this component.
private  ListViewer initializeList(java.lang.String key)
          Intializes the list.
private static TableViewer initializeProgramTable(java.lang.String key)
          Initializes the table displaying all availables programs.
private  TreeViewer initializeTree(java.lang.String key)
          Intializes the tree.
static DisplayPanel modifyPanelForComponent(DirectoryComponent component, UGM parentSlave)
          Reconstructs the panel associated with the given component.
static void removeAllPanels()
          Clears the panel cache.
static void removePanelForComponent(DirectoryComponent component)
          Removes a panel from the cache.
static void setAvailablePrograms(java.lang.String[] availablePrograms)
          Sets the list of available programs (slaves) on the server.
private  void setParentSlave(UGM parentSlave)
          Set the parent slave of this component.
 
Methods inherited from class org.PingOO.DLAI.slave.UGM.UGMPanel
displayAllowComponent, getAttributes, getComponent, getComponentName, getMaximumSize, getMinimumSize, getUpdatedComponent, prepareAliasTargetComponent, prepareComponents, prepareNodeAllowComponent
 
Methods inherited from class org.PingOO.DLAI.lib.PWidget.PPanel
getManager, getModule, getTextKey, getToolTipKey, setLocalizedText, setLocalizedToolTipText, setManager, setModule, updateFont, updateLanguage, updateLanguage
 
Methods inherited from class javax.swing.JPanel
, getAccessibleContext, getUIClassID, paramString, updateUI, writeObject
 
Methods inherited from class javax.swing.JComponent
_paintImmediately, addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, adjustPaintFlags, alwaysOnTop, bindingForKeyStroke, computeVisibleRect, computeVisibleRect, contains, createToolTip, enableSerialization, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperties, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getFlag, getGraphics, getHeight, getInsets, getInsets, getLocation, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, keyboardBindings, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paintWithBuffer, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyBindings, processKeyBindingsForAllComponents, processKeyEvent, processMouseMotionEvent, putClientProperty, readObject, rectangleIsObscured, registerKeyboardAction, registerKeyboardAction, registerWithKeyboardManager, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFlag, setFont, setForeground, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVisible, shouldDebugGraphics, superProcessMouseMotionEvent, unregisterKeyboardAction, unregisterWithKeyboardManager, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyOrientation, countComponents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getLayout, getMouseEventTarget, getWindow, initIDs, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPrint, list, list, locate, minimumSize, nextFocus, paintComponents, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, print, printComponents, printOneComponent, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, remove, remove, removeAll, removeContainerListener, setFocusOwner, setLayout, transferFocus, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, coalesceEvents, constructComponentName, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getToolkit, getToolkitImpl, getTreeLock, getWindowForObject, gotFocus, handleEvent, hide, imageUpdate, inside, isDisplayable, isEnabled, isEnabledImpl, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

quotaComponentTable

protected final java.util.Hashtable quotaComponentTable

lockedComponentTable

protected final java.util.Hashtable lockedComponentTable

quotaValueTable

protected final java.util.Hashtable quotaValueTable

lockedValueTable

protected final java.util.Hashtable lockedValueTable

EXPORT_KEY

protected static final java.lang.String EXPORT_KEY

PROGRAM_BIG_ICON

private static final javax.swing.Icon PROGRAM_BIG_ICON
Defines a icon for the program root.

PROGRAM_ICON

private static final javax.swing.Icon PROGRAM_ICON
Defines a icon for the program root.

PROGRAM_NODE_ICON

private static final javax.swing.Icon PROGRAM_NODE_ICON
Defines a icon for the program node inside the tree.

RESOURCE_BIG_ICON

private static final javax.swing.Icon RESOURCE_BIG_ICON
Defines a icon for the resource root.

RESOURCE_ICON

private static final javax.swing.Icon RESOURCE_ICON
Defines a icon for the resource root.

RESOURCE_NODE_ICON

private static final javax.swing.Icon RESOURCE_NODE_ICON
Defines a icon for the resource node inside the tree.

EXPORTATION_BIG_ICON

private static final javax.swing.Icon EXPORTATION_BIG_ICON
Defines a icon for the exportation root.

EXPORTATION_ICON

private static final javax.swing.Icon EXPORTATION_ICON
Defines a icon for the exportation root.

EXPORTATION_NODE_ICON

private static final javax.swing.Icon EXPORTATION_NODE_ICON
Defines a icon for the exportation node inside the tree.

EXPORTATION_LIST_ICON

private static final javax.swing.Icon EXPORTATION_LIST_ICON
Defines a icon for the resource object inside the list.

QUOTA_ICON

private static final javax.swing.Icon QUOTA_ICON
Defines a quota icon.

LOCKED_ICON

private static final javax.swing.Icon LOCKED_ICON
Defines a icon for locked objects.

UNLOCKED_ICON

private static final javax.swing.Icon UNLOCKED_ICON
Defines a icon for unlocked objects.

availablePrograms

private static java.lang.String[] availablePrograms
Shared list of available programs on the server.

panelTable

private static final java.util.Hashtable panelTable
The shared table containing all previously created panels.
Used as a cache to avoid recreating the same panel as the same component is accessed multiple time.

parentSlave

private UGM parentSlave
The parent slave of this panel.
Used to notify UGM, that the password(s) has been changed.
UGM will then send them to the server.
Constructor Detail

DisplayPanel

public DisplayPanel(DirectoryComponent component)
Creates a new instance.
Parameters:
component - The targeted component.
Method Detail

setParentSlave

private void setParentSlave(UGM parentSlave)
Set the parent slave of this component.
Parameters:
parentSlave - The new parent Slave.

setAvailablePrograms

public static void setAvailablePrograms(java.lang.String[] availablePrograms)
Sets the list of available programs (slaves) on the server.
Parameters:
availablePrograms - The complete list of available programs.

getPanelForComponent

public static DisplayPanel getPanelForComponent(DirectoryComponent component,
                                                UGM parentSlave)
Return the display panel associated with this component.
If no panel is associated with the given component, then a new one will be created.
Parameters:
component - The component associated with the panel.
Returns:
The display panel associated with this component.
Throws:
java.lang.NullPointerException - If the givent component is null.

modifyPanelForComponent

public static DisplayPanel modifyPanelForComponent(DirectoryComponent component,
                                                   UGM parentSlave)
Reconstructs the panel associated with the given component.
Parameters:
component - The component associated with the panel.
parentSlave - The parent slave of this program.

removePanelForComponent

public static void removePanelForComponent(DirectoryComponent component)
Removes a panel from the cache.
Parameters:
component - The component associated with the panel.

removeAllPanels

public static void removeAllPanels()
Clears the panel cache.

generateComponent

protected javax.swing.JComponent generateComponent(java.lang.String key,
                                                   java.lang.Object value,
                                                   java.util.Hashtable labelTable)
Generates a specific component for display.
Parameters:
key - The key of the atttribute associated with this component.
value - The value associated with this component.
labelTable - The table of labels.
Returns:
A specific component for display.
Overrides:
generateComponent in class UGMPanel

createComboLine

protected void createComboLine(PPanel parentPanel,
                               java.lang.String key,
                               java.util.Hashtable labelTable,
                               java.util.Hashtable componentTable)
Creates the line for a combo box.
Parameters:
parentPanel - The panel were to add the components.
key - The key to use.
labelTable - List of label.
componentTable - List of graphical component.

createComboLine

protected void createComboLine(FormPanel parentPanel,
                               java.lang.String key,
                               java.util.Hashtable labelTable,
                               java.util.Hashtable componentTable,
                               int row,
                               int column)
Creates the line for a combo box.
Parameters:
parentPanel - The panel were to add the components.
key - The key to use.
labelTable - List of label.
componentTable - List of graphical component.
row -  
column -  

initializeProgramTable

private static TableViewer initializeProgramTable(java.lang.String key)
Initializes the table displaying all availables programs.
Parameters:
key - The key to use.

initializeList

private ListViewer initializeList(java.lang.String key)
Intializes the list.
Parameters:
key - The key to use.

initializeTree

private TreeViewer initializeTree(java.lang.String key)
Intializes the tree.
Parameters:
key - The key to use.

createResourcePanel

protected PPanel createResourcePanel()
Creates the panel for the resource management.

createProgramPanel

protected PPanel createProgramPanel()
Creates the panel for the list management.

createExportPanel

protected PPanel createExportPanel()
Creates the panel for the exportation management.