arlut.csd.ganymede
Class GASHSchema

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--javax.swing.JFrame
                                |
                                +--arlut.csd.ganymede.GASHSchema
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, treeCallback, treeDragDropCallback, javax.swing.WindowConstants

public class GASHSchema
extends javax.swing.JFrame
implements treeCallback, treeDragDropCallback, java.awt.event.ActionListener

GUI Schema Editor, part of the Ganymede admin console.

GASHSchema talks to the server by way of the SchemaEdit remote interface.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Inner classes inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
Inner classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock
 
Field Summary
(package private)  javax.swing.JPanel attribCardPane
           
(package private)  javax.swing.JPanel attribPane
           
(package private)  javax.swing.JScrollPane baseEditPane
           
(package private)  treeMenu baseMenu
           
(package private)  BaseEditor be
           
(package private)  java.awt.Color bgColor
           
(package private)  javax.swing.JPanel buttonPane
           
(package private)  javax.swing.JButton cancelButton
           
(package private)  java.awt.CardLayout card
           
(package private)  javax.swing.JPanel categoryEditPane
           
(package private)  treeMenu categoryMenu
           
(package private)  CategoryEditor ce
           
(package private)  javax.swing.JMenuItem createCategoryMI
           
(package private)  javax.swing.JMenuItem createFieldMI
           
(package private)  javax.swing.JMenuItem createInternalObjectMI
           
(package private)  javax.swing.JMenuItem createNameMI
           
(package private)  javax.swing.JMenuItem createObjectMI
           
static boolean debug
           
(package private)  javax.swing.JMenuItem deleteCategoryMI
           
(package private)  javax.swing.JMenuItem deleteFieldMI
           
(package private)  javax.swing.JMenuItem deleteNameMI
           
(package private)  javax.swing.JMenuItem deleteObjectMI
           
(package private)  SchemaEdit editor
           
 javax.swing.border.EmptyBorder emptyBorder10
           
 javax.swing.border.EmptyBorder emptyBorder5
           
(package private)  javax.swing.JPanel emptyPane
           
(package private)  BaseFieldEditor fe
           
(package private)  javax.swing.JScrollPane fieldEditPane
           
(package private)  treeMenu fieldMenu
           
 javax.swing.border.LineBorder lineBorder
           
 javax.swing.border.BevelBorder loweredBorder
           
(package private)  javax.swing.JScrollPane namespaceEditPane
           
(package private)  treeMenu nameSpaceMenu
           
(package private)  treeMenu nameSpaceObjectMenu
           
(package private)  treeNode namespaces
           
(package private)  NameSpaceEditor ne
           
(package private)  treeNode nodeAfterCategories
           
(package private)  CatTreeNode objects
           
(package private)  javax.swing.JButton okButton
           
(package private)  java.awt.Image questionImage
           
 javax.swing.border.BevelBorder raisedBorder
           
(package private)  Category rootCategory
           
(package private)  javax.swing.JMenuItem schemaMI
           
(package private)  boolean showingBase
           
(package private)  boolean showingField
           
 javax.swing.border.CompoundBorder statusBorder
           
 javax.swing.border.CompoundBorder statusBorderRaised
           
(package private)  treeControl tree
           
(package private)  java.awt.Image[] treeImages
           
 
Fields inherited from class javax.swing.JFrame
accessibleContext, defaultCloseOperation, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
base, CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, frameSerializedDataVersion, HAND_CURSOR, icon, ICONIFIED, mbManagement, menuBar, MOVE_CURSOR, N_RESIZE_CURSOR, nameCounter, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, ownedWindows, resizable, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, serialVersionUID, state, SW_RESIZE_CURSOR, TEXT_CURSOR, title, W_RESIZE_CURSOR, WAIT_CURSOR, weakThis
 
Fields inherited from class java.awt.Window
active, dbg, focusMgr, inputContext, inputContextLock, OPENED, ownedWindowList, warningString, windowListener, windowSerializedDataVersion
 
Fields inherited from class java.awt.Container
component, containerListener, containerSerializedDataVersion, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, printing, printingThreads
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, changeSupport, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
GASHSchema(java.lang.String title, SchemaEdit editor, javax.swing.JMenuItem schemaMI)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
           
 void dragLineRelease(treeNode dragNode, treeNode aboveNode, treeNode belowNode)
          This method is called when a drag and drop operation in the Schema Editor's tree is completed.
 boolean dragLineTween(treeNode dragNode, treeNode aboveNode, treeNode belowNode)
          Method to control whether the drag line may be moved between a pair of given nodes.
(package private)  void editBase(BaseNode node)
           
(package private)  void editCategory(CatTreeNode node)
           
(package private)  void editField(FieldNode node)
           
(package private)  void editNameSpace(SpaceNode node)
           
 SchemaEdit getSchemaEdit()
           
 ReturnVal handleReturnVal(ReturnVal retVal)
          This method takes a ReturnVal object from the server and, if necessary, runs through a wizard interaction sequence, possibly displaying several dialogs before finally returning a final result code.
 void iconDragDrop(treeNode dragNode, treeNode targetNode)
          This method provides intelligence to the tree, determining what action is to be taken if a node is dropped on another node.
 boolean iconDragOver(treeNode dragNode, treeNode targetNode)
          This method provides intelligence to the tree, determining which nodes the dragNode may be dropped on.
(package private)  void initializeDisplayTree()
           
(package private)  treeNode insertCategoryNode(CategoryNode node, treeNode prevNode, treeNode parentNode)
          Local helper method to place a new CategoryNode (either a Base or a Category) into the schema editor's display tree.
(package private)  void recurseDownCategories(CatTreeNode node)
           
(package private)  void refreshFields(BaseNode node, boolean doRefresh)
          This method generates the per-field children of the specified baseNode.
(package private)  void refreshNamespaces()
           
 void setNormalCursor()
           
 void setWaitCursor()
           
 boolean startDrag(treeNode dragNode)
          This method determines which nodes may be dragged.
 void treeNodeContracted(treeNode node)
          Called when a node is closed.
 void treeNodeDoubleClicked(treeNode node)
          Called when an item in the tree is double-clicked.
 void treeNodeExpanded(treeNode node)
          Called when a node is expanded, to allow the user of the tree to dynamically load the information at that time.
 void treeNodeMenuPerformed(treeNode node, java.awt.event.ActionEvent event)
          Called when a popup menu item is selected on a treeNode
 void treeNodeSelected(treeNode node)
          Called when an item in the tree is selected
 void treeNodeUnSelected(treeNode node, boolean otherNode)
          Called when an item in the tree is unselected
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, createRootPaneException, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
, addNotify, addToFrameList, constructComponentName, finalize, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, initIDs, isResizable, postProcessKeyEvent, readObject, remove, removeFromFrameList, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState, setTitle, writeObject
 
Methods inherited from class java.awt.Window
addOwnedWindow, addWindowListener, adjustListeningChildren, applyResourceBundle, applyResourceBundle, connectOwnedWindow, dispatchEventImpl, dispose, eventEnabled, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isActive, isShowing, nextFocus, ownedInit, pack, postEvent, postWindowEvent, preProcessKeyEvent, processEvent, removeOwnedWindow, removeWindowListener, resetGC, setCursor, setFocusOwner, setWarningString, show, toBack, toFront, transferFocus
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventToSelf, doLayout, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getMouseEventTarget, getPreferredSize, getWindow, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, numListening, paint, paintComponents, paintHeavyweightComponents, postsOldMouseEvents, preferredSize, print, printComponents, printHeavyweightComponents, processContainerEvent, proxyEnableEvents, proxyRequestFocus, remove, removeAll, removeContainerListener, setFont, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getSize, getToolkitImpl, getTreeLock, getWidth, getWindowForObject, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isEnabledImpl, isFocusTraversable, isLightweight, isOpaque, isRecursivelyVisible, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

debug

public static final boolean debug

schemaMI

javax.swing.JMenuItem schemaMI

editor

SchemaEdit editor

questionImage

java.awt.Image questionImage

treeImages

java.awt.Image[] treeImages

tree

treeControl tree

rootCategory

Category rootCategory

objects

CatTreeNode objects

nodeAfterCategories

treeNode nodeAfterCategories

namespaces

treeNode namespaces

createCategoryMI

javax.swing.JMenuItem createCategoryMI

deleteCategoryMI

javax.swing.JMenuItem deleteCategoryMI

createObjectMI

javax.swing.JMenuItem createObjectMI

createInternalObjectMI

javax.swing.JMenuItem createInternalObjectMI

deleteObjectMI

javax.swing.JMenuItem deleteObjectMI

createNameMI

javax.swing.JMenuItem createNameMI

deleteNameMI

javax.swing.JMenuItem deleteNameMI

createFieldMI

javax.swing.JMenuItem createFieldMI

deleteFieldMI

javax.swing.JMenuItem deleteFieldMI

categoryMenu

treeMenu categoryMenu

baseMenu

treeMenu baseMenu

fieldMenu

treeMenu fieldMenu

nameSpaceMenu

treeMenu nameSpaceMenu

nameSpaceObjectMenu

treeMenu nameSpaceObjectMenu

card

java.awt.CardLayout card

buttonPane

javax.swing.JPanel buttonPane

attribPane

javax.swing.JPanel attribPane

attribCardPane

javax.swing.JPanel attribCardPane

emptyPane

javax.swing.JPanel emptyPane

categoryEditPane

javax.swing.JPanel categoryEditPane

fieldEditPane

javax.swing.JScrollPane fieldEditPane

namespaceEditPane

javax.swing.JScrollPane namespaceEditPane

baseEditPane

javax.swing.JScrollPane baseEditPane

be

BaseEditor be

fe

BaseFieldEditor fe

ne

NameSpaceEditor ne

ce

CategoryEditor ce

showingBase

boolean showingBase

showingField

boolean showingField

okButton

javax.swing.JButton okButton

cancelButton

javax.swing.JButton cancelButton

bgColor

java.awt.Color bgColor

emptyBorder5

public javax.swing.border.EmptyBorder emptyBorder5

emptyBorder10

public javax.swing.border.EmptyBorder emptyBorder10

raisedBorder

public javax.swing.border.BevelBorder raisedBorder

loweredBorder

public javax.swing.border.BevelBorder loweredBorder

lineBorder

public javax.swing.border.LineBorder lineBorder

statusBorder

public javax.swing.border.CompoundBorder statusBorder

statusBorderRaised

public javax.swing.border.CompoundBorder statusBorderRaised
Constructor Detail

GASHSchema

public GASHSchema(java.lang.String title,
                  SchemaEdit editor,
                  javax.swing.JMenuItem schemaMI)
Method Detail

getSchemaEdit

public SchemaEdit getSchemaEdit()

initializeDisplayTree

void initializeDisplayTree()

recurseDownCategories

void recurseDownCategories(CatTreeNode node)
                     throws java.rmi.RemoteException

insertCategoryNode

treeNode insertCategoryNode(CategoryNode node,
                            treeNode prevNode,
                            treeNode parentNode)
                      throws java.rmi.RemoteException
Local helper method to place a new CategoryNode (either a Base or a Category) into the schema editor's display tree.

refreshFields

void refreshFields(BaseNode node,
                   boolean doRefresh)
             throws java.rmi.RemoteException
This method generates the per-field children of the specified baseNode.

refreshNamespaces

void refreshNamespaces()

editBase

void editBase(BaseNode node)

editField

void editField(FieldNode node)

editNameSpace

void editNameSpace(SpaceNode node)

editCategory

void editCategory(CatTreeNode node)

setWaitCursor

public void setWaitCursor()

setNormalCursor

public void setNormalCursor()

treeNodeExpanded

public void treeNodeExpanded(treeNode node)
Description copied from interface: treeCallback
Called when a node is expanded, to allow the user of the tree to dynamically load the information at that time.
Specified by:
treeNodeExpanded in interface treeCallback

treeNodeContracted

public void treeNodeContracted(treeNode node)
Description copied from interface: treeCallback
Called when a node is closed.
Specified by:
treeNodeContracted in interface treeCallback

treeNodeSelected

public void treeNodeSelected(treeNode node)
Description copied from interface: treeCallback
Called when an item in the tree is selected
Specified by:
treeNodeSelected in interface treeCallback
Following copied from interface: arlut.csd.JTree.treeCallback
Parameters:
node - The node selected in the tree.
See Also:
treeCanvas

treeNodeUnSelected

public void treeNodeUnSelected(treeNode node,
                               boolean otherNode)
Description copied from interface: treeCallback
Called when an item in the tree is unselected
Specified by:
treeNodeUnSelected in interface treeCallback
Following copied from interface: arlut.csd.JTree.treeCallback
Parameters:
node - The node selected in the tree.
someNodeSelected - If true, this node is being unselected by the selection of another node.
See Also:
treeCanvas

treeNodeDoubleClicked

public void treeNodeDoubleClicked(treeNode node)
Called when an item in the tree is double-clicked.
Specified by:
treeNodeDoubleClicked in interface treeCallback
Parameters:
node - The node selected in the tree.
See Also:
treeCallback

treeNodeMenuPerformed

public void treeNodeMenuPerformed(treeNode node,
                                  java.awt.event.ActionEvent event)
Description copied from interface: treeCallback
Called when a popup menu item is selected on a treeNode
Specified by:
treeNodeMenuPerformed in interface treeCallback
Following copied from interface: arlut.csd.JTree.treeCallback
Parameters:
node - The node selected in the tree.
See Also:
treeCanvas

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

startDrag

public boolean startDrag(treeNode dragNode)
This method determines which nodes may be dragged.
Specified by:
startDrag in interface treeDragDropCallback
See Also:
treeDragDropCallback

iconDragOver

public boolean iconDragOver(treeNode dragNode,
                            treeNode targetNode)
This method provides intelligence to the tree, determining which nodes the dragNode may be dropped on.
Specified by:
iconDragOver in interface treeDragDropCallback
See Also:
treeDragDropCallback

iconDragDrop

public void iconDragDrop(treeNode dragNode,
                         treeNode targetNode)
This method provides intelligence to the tree, determining what action is to be taken if a node is dropped on another node.
Specified by:
iconDragDrop in interface treeDragDropCallback
See Also:
treeDragDropCallback

dragLineTween

public boolean dragLineTween(treeNode dragNode,
                             treeNode aboveNode,
                             treeNode belowNode)
Method to control whether the drag line may be moved between a pair of given nodes.
Specified by:
dragLineTween in interface treeDragDropCallback
See Also:
treeDragDropCallback

dragLineRelease

public void dragLineRelease(treeNode dragNode,
                            treeNode aboveNode,
                            treeNode belowNode)
This method is called when a drag and drop operation in the Schema Editor's tree is completed.
Specified by:
dragLineRelease in interface treeDragDropCallback
See Also:
treeDragDropCallback

handleReturnVal

public ReturnVal handleReturnVal(ReturnVal retVal)

This method takes a ReturnVal object from the server and, if necessary, runs through a wizard interaction sequence, possibly displaying several dialogs before finally returning a final result code.

Use the ReturnVal returned from this function after this function is called to determine the ultimate success or failure of any operation which returns ReturnVal, because a wizard sequence may determine the ultimate result.

This method should not be synchronized, since handleReturnVal may pop up modal (thread-blocking) dialogs, and if we we synchronize this, some Swing or AWT code seems to block on our synchronization when we do pop-up dialogs. It's not any of my code, so I assume that AWT tries to synchronize on the frame when parenting a new dialog.