arlut.csd.ganymede.client
Class gclient

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

public class gclient
extends javax.swing.JFrame
implements treeCallback, java.awt.event.ActionListener, JsetValueCallback

Main ganymede client class. When glogin is run and a user logs in to the server, the client obtains a Session reference that allows it to talk to the server on behalf of a user, and a single instance of this class is created to handle all client GUI and networking operations for that user.

gclient creates a windowPanel object to contain internal object and query windows on the right side of a Swing JSplitPane. The left side contains a custom treeControl GUI component displaying object categories, types, and instances for the user to browse and edit.

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)  glogin _myglogin
          Reference to the applet which instantiated us.
(package private)  messageDialog about
           
(package private)  java.lang.String aboutMessage
           
(package private)  javax.swing.JMenu actionMenu
           
(package private)  javax.swing.ImageIcon buildIcon
           
(package private)  javax.swing.ImageIcon buildIcon2
           
private  boolean buildingPhase1
           
private  boolean buildingPhase2
           
(package private)  javax.swing.JLabel buildLabel
          Build status field at the bottom of the client.
protected  objectCache cachedLists
          Our main cache, keeps information about all objects we've learned about via QueryResult's returned to us by the server.
(package private)  javax.swing.JButton cancel
           
private  java.util.Hashtable changedHash
          Cache of invid's for objects that might have been changed by the client.
(package private)  javax.swing.JMenuItem changePersonaMI
           
(package private)  javax.swing.JMenuItem clearTreeMI
           
static gclient client
          we're only going to have one gclient at a time per running client (singleton pattern).
(package private)  java.awt.Image cloneIcon
           
(package private) static int CLOSED_BASE
           
(package private) static int CLOSED_CAT
           
(package private) static int CLOSED_FIELD
           
(package private) static int CLOSED_FIELD_CHANGED
           
(package private) static int CLOSED_FIELD_CREATE
           
(package private) static int CLOSED_FIELD_DELETE
           
(package private) static int CLOSED_FIELD_EXPIRESET
           
(package private) static int CLOSED_FIELD_REMOVESET
           
(package private)  javax.swing.JButton commit
           
(package private)  createObjectDialog createDialog
           
(package private)  java.awt.Image createDialogImage
           
private  java.util.Hashtable createdObjectsWithoutNodes
          Hash of invid's corresponding to objects that have been created by the client but which have not had nodes created in the client's tree display.
private  java.util.Hashtable createHash
          Mapping of invid's for objects that the client has requested be created by the server to CacheInfo objects which hold information about the object used to make decisions about managing the client's tree display.
(package private)  javax.swing.JMenuItem createObjectMI
           
(package private)  java.awt.Image creation
           
(package private)  messageDialog credits
           
(package private)  java.lang.String creditsMessage
           
(package private)  java.lang.String currentPersonaString
          Name of the currently active persona.
static boolean debug
           
(package private)  boolean defaultOwnerChosen
           
(package private)  JDefaultOwnerDialog defaultOwnerDialog
           
(package private)  javax.swing.JMenuItem defaultOwnerMI
           
private  java.util.Hashtable deleteHash
          Mapping of invid's for objects that the client has requested be deleted by the server to CacheInfo objects which hold information about the object used to make decisions about managing the client's tree display.
(package private)  javax.swing.JMenuItem deleteObjectMI
           
(package private)  CategoryDump dump
          Local copy of the category/object tree downloaded from the server by the buildTree() method.
(package private)  javax.swing.JMenuItem editObjectMI
           
 javax.swing.border.EmptyBorder emptyBorder10
           
 javax.swing.border.EmptyBorder emptyBorder5
           
(package private)  java.awt.Image errorImage
           
(package private)  javax.swing.JMenu fileMenu
           
(package private)  JFilterDialog filterDialog
           
(package private)  javax.swing.JMenuItem filterQueryMI
           
(package private)  java.awt.Image ganymede_logo
           
(package private)  helpPanel help
           
(package private)  javax.swing.JMenu helpMenu
           
(package private)  boolean hideNonEditables
          If true, the client will only display object types that the user has permission to edit, and by default will only show objects in the tree that the user can edit.
(package private)  javax.swing.JCheckBoxMenuItem hideNonEditablesMI
           
(package private)  javax.swing.ImageIcon idleIcon
           
(package private)  java.awt.Image[] images
           
(package private)  java.awt.Image inactivateIcon
           
(package private)  javax.swing.JMenuItem inactivateObjectMI
           
protected  java.util.Hashtable invidNodeHash
          Hash mapping Invid's for objects referenced by the client to the corresponding InvidNode displayed in the client's tree display.
(package private)  LAFMenu LandFMenu
           
 javax.swing.border.LineBorder lineBorder
           
(package private)  Loader loader
          Background processing thread, downloads information on object and field types defined in the server when run.
(package private)  javax.swing.JMenuItem logoutMI
           
 javax.swing.border.BevelBorder loweredBorder
           
(package private)  javax.swing.JMenuBar menubar
           
(package private)  javax.swing.JMenuItem menubarQueryMI
           
(package private)  messageDialog motd
           
(package private)  querybox my_querybox
          Query dialog that is displayed when the user chooses to perform a query on the server.
(package private)  java.lang.String my_username
           
(package private)  java.awt.Image newToolbarIcon
           
(package private) static int NUM_IMAGE
           
(package private)  treeMenu objectInactivatePM
           
(package private) static int OBJECTNOWRITE
           
(package private)  treeMenu objectReactivatePM
           
(package private)  treeMenu objectRemovePM
           
(package private)  treeMenu objectViewPM
           
(package private) static int OPEN_BASE
           
(package private) static int OPEN_CAT
           
(package private) static int OPEN_FIELD
           
(package private) static int OPEN_FIELD_CHANGED
           
(package private) static int OPEN_FIELD_CREATE
           
(package private) static int OPEN_FIELD_DELETE
           
(package private) static int OPEN_FIELD_EXPIRESET
           
(package private) static int OPEN_FIELD_REMOVESET
           
(package private)  openObjectDialog openDialog
           
(package private)  java.util.Vector ownerGroups
           
(package private)  java.awt.Image pencil
           
(package private)  PersonaDialog personaDialog
           
(package private)  java.util.Vector personae
           
(package private)  java.awt.Image personaIcon
           
(package private)  PersonaListener personaListener
          Listener to react to persona dialog events
(package private)  javax.swing.JMenu PersonaMenu
           
(package private)  treeMenu pMenuAll
           
(package private)  treeMenu pMenuAllCreatable
           
(package private)  treeMenu pMenuEditable
           
(package private)  treeMenu pMenuEditableCreatable
           
(package private)  java.awt.Image queryIcon
           
(package private)  java.awt.Image questionImage
           
 javax.swing.border.BevelBorder raisedBorder
           
(package private) static java.lang.String release_date
           
(package private) static java.lang.String release_name
           
(package private) static java.lang.String release_number
           
(package private)  java.awt.Image search
           
 SecurityLaunderThread securityThread
          This thread is set up to launder RMI build status updates from the server.
(package private)  treeNode selectedNode
          The currently selected node from the client's GUI tree.
(package private)  Session session
          Main remote interface for communications with the server.
protected  java.util.Hashtable shortToBaseNodeHash
          Hash mapping Short Base id's to the corresponding BaseNode displayed in the client's tree display.
(package private)  javax.swing.JMenuItem showHelpMI
           
private  boolean showToolbar
           
private  boolean somethingChanged
           
 javax.swing.border.CompoundBorder statusBorder
           
 javax.swing.border.CompoundBorder statusBorderRaised
           
(package private)  javax.swing.JTextField statusLabel
          Status field at the bottom of the client.
(package private)  javax.swing.JPanel statusPanel
           
 StatusClearThread statusThread
          This thread is used to clear the statusLabel after some interval after it is set.
(package private)  javax.swing.JMenuItem toggleToolBarMI
           
(package private)  javax.swing.JToolBar toolBar
           
private  boolean toolToggle
           
(package private)  java.awt.Image trash
           
(package private)  treeControl tree
          The client's GUI tree component.
(package private)  java.awt.Image treecreation
           
(package private)  java.awt.Image treepencil
           
(package private)  java.awt.Image treetrash
           
(package private)  javax.swing.JMenuItem viewObjectMI
           
(package private)  javax.swing.JMenu windowMenu
           
private  int wizardActive
          this is true during the handleReturnVal method, while a wizard is active.
(package private)  windowPanel wp
          JDesktopPane on the right side of the client's display, contains the object and query result internal windows that are created during the client's execution.
 
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
gclient(Session s, glogin g)
          This is the main constructor for the gclient class..
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          Handles button and menu picks.
 void addTableWindow(Session session, Query query, DumpResult buffer, java.lang.String title)
           
(package private)  void buildTree()
          This method builds the initial data structures for the object selection tree, using the base information in the baseHash hashtable gained from the Loader thread.
 void cancelTransaction()
          Cancels the current transaction.
(package private)  void changePersona(boolean requirePassword)
          Creates and presents a dialog to let the user change their selected persona.
 void chooseDefaultOwner(boolean forcePopup)
          Chooses the default owner group for a newly created object.
 void chooseFilter()
          Create a custom query filter.
 void cleanUp()
          This method does all the clean up required to let garbage collection tear everything completely down.
private  void cleanUpAfterCancel()
          Cleans up the tree and gclient's caches.
 void clearCaches()
          Clears out the client's objectCache, which holds object labels, and activation status for invid's returned by various query and db_field choices() operations.
(package private)  void clearTree()
          Clears out the client's tree.
 db_object cloneObject(Invid origInvid)
          Creates a new object on the server and opens a new client framePanel window to allow the user to edit the new object.
(package private)  void cloneObjectDialog()
          Opens a dialog to let the user choose an object for cloning, and if cancel is not chosen, the object is opened for cloning.
 void commitTransaction()
          Commits the currently open transaction on the server.
 db_object createObject(short type)
          Creates a new object on the server and opens a new client framePanel window to allow the user to edit the new object.
(package private)  void createObjectDialog()
          Show the create object dialog, let the user choose to create or not create an object.
(package private)  javax.swing.JToolBar createToolbar()
          Creates and initializes the client's toolbar.
 boolean defaultOwnerChosen()
          True if a default owner has already been chosen.
 boolean deleteObject(Invid invid, boolean showDialog)
          Marks an object on the server as deleted.
(package private)  void deleteObjectDialog()
          Opens a dialog to let the user choose an object for deletion, and if cancel is not chosen, the object is opened for deletion.
 void editObject(Invid invid)
          Opens a new framePanel window to allow the user to edit an object.
 void editObject(Invid invid, java.lang.String objectType)
          Opens a new framePanel window to allow the user to edit an object.
(package private)  void editObjectDialog()
          Opens a dialog to let the user choose an object for editing, and if cancel is not chosen, the object is opened for editing.
 java.util.Vector getBaseList()
          Returns a Vector of BaseDump objects, providing a local cache of Base references that the client consults during operations.
 java.util.Hashtable getBaseMap()
          Returns a hash mapping Short Base id's to BaseDump objects.
 java.util.Hashtable getBaseNames()
          Returns a hash mapping BaseDump references to their title.
 java.util.Hashtable getBaseToShort()
          Returns a hashtable mapping BaseDump references to their object type id in Short form.
 java.awt.Image getErrorImage()
          Loads and returns the error Image for use in client dialogs.
 FieldTemplate getFieldTemplate(short objType, short fieldId)
          Returns a FieldTemplate based on the short type id for the containing object and the short field id for the field.
 ObjectHandle getObjectHandle(Invid invid, java.lang.Short type)
          Pulls a object handle for an invid out of the client's cache, if it has been cached.
 objectList getObjectList(java.lang.Short id, boolean showAll)
          Gets a list of objects from the server, in a form appropriate for use in constructing a list of nodes in the tree under an object type (object base) folder.
 java.lang.String getObjectType(Invid objId)
          Returns the type name for a given object.
(package private)  PersonaDialog getPersonaDialog()
          Returns a reference to the most recently created persona dialog.
 java.awt.Image getQuestionImage()
          Loads and returns the question-mark Image for use in client dialogs.
 InvidNode getSelectedObjectNode()
          Returns the node of the object currently selected in the tree, if any.
 Session getSession()
          Get the session
 boolean getSomethingChanged()
          True if something has been changed since the last commit/cancel
 java.lang.String getStatus()
          Get the current text from the client's status field
 java.util.Vector getTemplateVector(short id)
          Returns a vector of FieldTemplate's.
 java.util.Vector getTemplateVector(java.lang.Short id)
          Returns a vector of FieldTemplate's listing fields and field informaton for the object type identified by id.
 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.
 boolean inactivateObject(Invid invid)
          Marks an object on the server as inactivated.
(package private)  void inactivateObjectDialog()
          Opens a dialog to let the user choose an object for inactivation, and if cancel is not chosen, the object is opened for inactivation.
(package private)  treeNode insertCategoryNode(CategoryNode node, treeNode prevNode, treeNode parentNode)
          Helper method for building tree
 boolean isApplet()
          True if we are in an applet context, meaning we don't have access to local files, etc.
(package private)  void logout()
          Logs out from the client.
(package private)  boolean OKToProceed()
          Check for changes in the database before logging out.
(package private)  void openAnInvid()
          This is a debugging hook, to allow the user to enter an invid in string form for direct viewing.
private  void openNewTransaction()
          Initializes a new transaction on the server
protected  void processWindowEvent(java.awt.event.WindowEvent e)
           
 boolean reactivateObject(Invid invid)
          Reactivates an object that was previously inactivated.
(package private)  void recurseDownCategories(CatTreeNode node, Category c)
          Recurses down the category tree obtained from the server, loading the client's tree with category and object folder nodes.
 void refreshChangedObject(Invid invid)
          This method does the same thing as refreshChangedObjectHandles(), but for a single object only.
 void refreshChangedObjectHandles(java.util.Vector paramVect, boolean afterCommit)
          Queries the server for status information on a vector of invid's that were touched in some way by the client during the recent transaction.
(package private)  void refreshObjects(BaseNode node, boolean doRefresh)
          This method is used to update the list of object nodes under a given base node in our object selection tree, synchronizing the tree with the actual objects on the server.
(package private)  void refreshTreeAfterCommit()
          Updates the tree for the nodes that might have changed.
 void setBuildStatus(java.lang.String status)
          Sets text in the build status bar
 void setIconForNode(Invid invid)
          Updates a database object's icon in the tree display.
 void setNormalCursor()
          Set the cursor to the normal cursor(usually a pointer.)
private  void setSomethingChanged(boolean state)
          Sets or clears the client's somethingChanged flag.
 void setStatus(java.lang.String status)
          Sets text in the status bar, with a 5 second countdown before the status bar is cleared.
 void setStatus(java.lang.String status, int timeToLive)
          Sets text in the status bar, with a defined countdown before the status bar is cleared.
 boolean setValuePerformed(JValueObject o)
          This method comprises the JsetValueCallback interface, and is how some data-carrying components notify us when something changes.
 void setWaitCursor()
          Set the cursor to a wait cursor(usually a watch.)
 void showAboutMessage()
          Shows the About...
 void showCredits()
          Shows the credits dialog.
 void showErrorMessage(java.lang.String message)
          Pops up an error dialog with the default title.
 void showErrorMessage(java.lang.String title, java.lang.String message)
          Pops up an error dialog.
 void showErrorMessage(java.lang.String title, java.lang.String message, java.awt.Image icon)
          Show an error dialog.
 void showHelpWindow()
          Show the help window.
 void showMOTD()
          Shows the server's message of the day in a dialog.
 void showMOTD(java.lang.String message, boolean html)
          This method generates a message-of-the-day dialog.
 void softTimeout()
          This method is triggered by the Ganymede server if the client is idle long enough.
 void somethingChanged()
          This indeicates that something in the database was changed, so cancelling this transaction will have consequences.
 java.util.Vector sortListHandleVector(java.util.Vector v)
          sort a vector of listHandles
 java.util.Vector sortStringVector(java.util.Vector v)
          Sort a vector of Strings
static java.lang.String stackTrace(java.lang.Throwable thing)
          This is a convenience method used by the server to get a stack trace from a throwable object in String form.
 void start()
          This method handles the start-up tasks after the gclient has gotten initialized.
(package private)  void toggleToolBar()
          toggles the toolbar on and off
 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 unselected
 void treeNodeUnSelected(treeNode node, boolean otherNode)
          Called when an item in the tree is unselected
 void update(java.awt.Graphics g)
          By overriding update(), we can eliminate the annoying flash as the default update() method clears the frame before rendering.
(package private)  void updateNotePanels()
          Updates the note panels in the open windows.
 void viewObject(Invid invid)
          Opens a new framePanel window to view the object corresponding to the given invid.
 void viewObject(Invid invid, java.lang.String objectType)
          Opens a new framePanel window to view the object corresponding to the given invid.
(package private)  void viewObjectDialog()
          Opens a dialog to let the user choose an object for viewing, and if cancel is not chosen, the object is opened for viewing.
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, createRootPaneException, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, remove, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled
 
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 boolean debug

client

public static gclient client
we're only going to have one gclient at a time per running client (singleton pattern).

NUM_IMAGE

static final int NUM_IMAGE

OPEN_BASE

static final int OPEN_BASE

CLOSED_BASE

static final int CLOSED_BASE

OPEN_FIELD

static final int OPEN_FIELD

OPEN_FIELD_DELETE

static final int OPEN_FIELD_DELETE

OPEN_FIELD_CREATE

static final int OPEN_FIELD_CREATE

OPEN_FIELD_CHANGED

static final int OPEN_FIELD_CHANGED

OPEN_FIELD_REMOVESET

static final int OPEN_FIELD_REMOVESET

OPEN_FIELD_EXPIRESET

static final int OPEN_FIELD_EXPIRESET

CLOSED_FIELD

static final int CLOSED_FIELD

CLOSED_FIELD_DELETE

static final int CLOSED_FIELD_DELETE

CLOSED_FIELD_CREATE

static final int CLOSED_FIELD_CREATE

CLOSED_FIELD_CHANGED

static final int CLOSED_FIELD_CHANGED

CLOSED_FIELD_REMOVESET

static final int CLOSED_FIELD_REMOVESET

CLOSED_FIELD_EXPIRESET

static final int CLOSED_FIELD_EXPIRESET

OPEN_CAT

static final int OPEN_CAT

CLOSED_CAT

static final int CLOSED_CAT

OBJECTNOWRITE

static final int OBJECTNOWRITE

release_name

static java.lang.String release_name

release_date

static java.lang.String release_date

release_number

static java.lang.String release_number

creditsMessage

java.lang.String creditsMessage

aboutMessage

java.lang.String aboutMessage

session

Session session
Main remote interface for communications with the server.

_myglogin

glogin _myglogin
Reference to the applet which instantiated us.

dump

CategoryDump dump
Local copy of the category/object tree downloaded from the server by the buildTree() method.

currentPersonaString

java.lang.String currentPersonaString
Name of the currently active persona.

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

changedHash

private java.util.Hashtable changedHash
Cache of invid's for objects that might have been changed by the client. The keys and the values in this hash are the same. The collection of tree nodes corresponding to invid's listed in changedHash will be refreshed by the client when a server is committed or cancelled.

deleteHash

private java.util.Hashtable deleteHash
Mapping of invid's for objects that the client has requested be deleted by the server to CacheInfo objects which hold information about the object used to make decisions about managing the client's tree display.

createHash

private java.util.Hashtable createHash
Mapping of invid's for objects that the client has requested be created by the server to CacheInfo objects which hold information about the object used to make decisions about managing the client's tree display.

createdObjectsWithoutNodes

private java.util.Hashtable createdObjectsWithoutNodes
Hash of invid's corresponding to objects that have been created by the client but which have not had nodes created in the client's tree display. Once nodes are created for these objects, the invid will be taken out of this hash and put into createHash.

shortToBaseNodeHash

protected java.util.Hashtable shortToBaseNodeHash

Hash mapping Short Base id's to the corresponding BaseNode displayed in the client's tree display.


invidNodeHash

protected java.util.Hashtable invidNodeHash

Hash mapping Invid's for objects referenced by the client to the corresponding InvidNode displayed in the client's tree display.


cachedLists

protected objectCache cachedLists

Our main cache, keeps information about all objects we've learned about via QueryResult's returned to us by the server.

We can get QueryResults from the server by doing direct query calls on the server, or by calling choices() on an invid_field or on a string_field. Information from both sources may be integrated into this cache.


loader

Loader loader
Background processing thread, downloads information on object and field types defined in the server when run.

buildingPhase1

private boolean buildingPhase1

buildingPhase2

private boolean buildingPhase2

toolToggle

private boolean toolToggle

showToolbar

private boolean showToolbar

somethingChanged

private boolean somethingChanged

help

helpPanel help

motd

messageDialog motd

credits

messageDialog credits

about

messageDialog about

personae

java.util.Vector personae

ownerGroups

java.util.Vector ownerGroups

toolBar

javax.swing.JToolBar toolBar

filterDialog

JFilterDialog filterDialog

personaDialog

PersonaDialog personaDialog

defaultOwnerDialog

JDefaultOwnerDialog defaultOwnerDialog

openDialog

openObjectDialog openDialog

createDialog

createObjectDialog createDialog

images

java.awt.Image[] images

commit

javax.swing.JButton commit

cancel

javax.swing.JButton cancel

statusPanel

javax.swing.JPanel statusPanel

statusLabel

final javax.swing.JTextField statusLabel
Status field at the bottom of the client.

buildLabel

javax.swing.JLabel buildLabel
Build status field at the bottom of the client.

tree

treeControl tree
The client's GUI tree component.

selectedNode

treeNode selectedNode
The currently selected node from the client's GUI tree.

errorImage

java.awt.Image errorImage

questionImage

java.awt.Image questionImage

search

java.awt.Image search

queryIcon

java.awt.Image queryIcon

cloneIcon

java.awt.Image cloneIcon

pencil

java.awt.Image pencil

personaIcon

java.awt.Image personaIcon

inactivateIcon

java.awt.Image inactivateIcon

treepencil

java.awt.Image treepencil

trash

java.awt.Image trash

treetrash

java.awt.Image treetrash

creation

java.awt.Image creation

treecreation

java.awt.Image treecreation

newToolbarIcon

java.awt.Image newToolbarIcon

ganymede_logo

java.awt.Image ganymede_logo

createDialogImage

java.awt.Image createDialogImage

idleIcon

javax.swing.ImageIcon idleIcon

buildIcon

javax.swing.ImageIcon buildIcon

buildIcon2

javax.swing.ImageIcon buildIcon2

wp

windowPanel wp
JDesktopPane on the right side of the client's display, contains the object and query result internal windows that are created during the client's execution.

objectViewPM

treeMenu objectViewPM

objectReactivatePM

treeMenu objectReactivatePM

objectInactivatePM

treeMenu objectInactivatePM

objectRemovePM

treeMenu objectRemovePM

pMenuAll

treeMenu pMenuAll

pMenuEditable

treeMenu pMenuEditable

pMenuEditableCreatable

treeMenu pMenuEditableCreatable

pMenuAllCreatable

treeMenu pMenuAllCreatable

menubar

javax.swing.JMenuBar menubar

logoutMI

javax.swing.JMenuItem logoutMI

clearTreeMI

javax.swing.JMenuItem clearTreeMI

filterQueryMI

javax.swing.JMenuItem filterQueryMI

defaultOwnerMI

javax.swing.JMenuItem defaultOwnerMI

showHelpMI

javax.swing.JMenuItem showHelpMI

toggleToolBarMI

javax.swing.JMenuItem toggleToolBarMI

hideNonEditablesMI

javax.swing.JCheckBoxMenuItem hideNonEditablesMI

hideNonEditables

boolean hideNonEditables
If true, the client will only display object types that the user has permission to edit, and by default will only show objects in the tree that the user can edit. If false, all objects and object types the the user has permission to view will be shown in the tree. Toggled by the user manipulating the hideNonEditablesMI check box menu item.

defaultOwnerChosen

boolean defaultOwnerChosen

changePersonaMI

javax.swing.JMenuItem changePersonaMI

editObjectMI

javax.swing.JMenuItem editObjectMI

viewObjectMI

javax.swing.JMenuItem viewObjectMI

createObjectMI

javax.swing.JMenuItem createObjectMI

deleteObjectMI

javax.swing.JMenuItem deleteObjectMI

inactivateObjectMI

javax.swing.JMenuItem inactivateObjectMI

menubarQueryMI

javax.swing.JMenuItem menubarQueryMI

my_username

java.lang.String my_username

actionMenu

javax.swing.JMenu actionMenu

windowMenu

javax.swing.JMenu windowMenu

fileMenu

javax.swing.JMenu fileMenu

helpMenu

javax.swing.JMenu helpMenu

PersonaMenu

javax.swing.JMenu PersonaMenu

LandFMenu

LAFMenu LandFMenu

personaListener

PersonaListener personaListener
Listener to react to persona dialog events

my_querybox

querybox my_querybox
Query dialog that is displayed when the user chooses to perform a query on the server.

statusThread

public StatusClearThread statusThread

This thread is used to clear the statusLabel after some interval after it is set.

Whenever the gclient's setStatus method is called, this thread has a countdown timer started, which will clear the status label if it is not reset by another call to setStatus.


securityThread

public SecurityLaunderThread securityThread

This thread is set up to launder RMI build status updates from the server.

In some versions of Sun's JDK, RMI callbacks are not allowed to manipulate the GUI event queue. To get around this, this securityThread is created to launder these RMI callbacks so that the Swing event queue is messed with by a client-local thread.


wizardActive

private int wizardActive
this is true during the handleReturnVal method, while a wizard is active. If a wizard is active, don't allow the window to close.
Constructor Detail

gclient

public gclient(Session s,
               glogin g)

This is the main constructor for the gclient class.. it handles the interactions between the user and the server once the user has logged in.

Parameters:
s - Connection to the server created for us by the glogin applet.
g - The glogin applet which is creating us.
Method Detail

stackTrace

public static java.lang.String stackTrace(java.lang.Throwable thing)
This is a convenience method used by the server to get a stack trace from a throwable object in String form.

start

public void start()
This method handles the start-up tasks after the gclient has gotten initialized. Called by glogin.

getTemplateVector

public java.util.Vector getTemplateVector(short id)

Returns a vector of FieldTemplate's.

Parameters:
id - Object type id to retrieve field information for.

getFieldTemplate

public FieldTemplate getFieldTemplate(short objType,
                                      short fieldId)

Returns a FieldTemplate based on the short type id for the containing object and the short field id for the field.


getTemplateVector

public java.util.Vector getTemplateVector(java.lang.Short id)

Returns a vector of FieldTemplate's listing fields and field informaton for the object type identified by id.

Parameters:
id - The id number of the object type to be returned the base id.

clearCaches

public void clearCaches()

Clears out the client's objectCache, which holds object labels, and activation status for invid's returned by various query and db_field choices() operations.


getObjectList

public objectList getObjectList(java.lang.Short id,
                                boolean showAll)

Gets a list of objects from the server, in a form appropriate for use in constructing a list of nodes in the tree under an object type (object base) folder.

This method supports client-side caching.. if the list required has already been retrieved, the cached list will be returned. If it hasn't, getObjectList() will get the list from the server and save a local copy in an objectCache for future requests.


update

public void update(java.awt.Graphics g)
By overriding update(), we can eliminate the annoying flash as the default update() method clears the frame before rendering.
Overrides:
update in class javax.swing.JFrame

getSession

public final Session getSession()
Get the session

getErrorImage

public final java.awt.Image getErrorImage()

Loads and returns the error Image for use in client dialogs.

Once the image is loaded, it is cached for future calls to getErrorImage().


getQuestionImage

public final java.awt.Image getQuestionImage()

Loads and returns the question-mark Image for use in client dialogs.

Once the image is loaded, it is cached for future calls to getQuestionmage().


getBaseNames

public final java.util.Hashtable getBaseNames()

Returns a hash mapping BaseDump references to their title.

Checks to see if the baseNames was loaded, and if not, it loads it. Always use this instead of trying to access baseNames directly.


getBaseList

public final java.util.Vector getBaseList()

Returns a Vector of BaseDump objects, providing a local cache of Base references that the client consults during operations.

Checks to see if the baseList was loaded, and if not, it loads it. Always use this instead of trying to access the baseList directly.


getBaseMap

public java.util.Hashtable getBaseMap()

Returns a hash mapping Short Base id's to BaseDump objects.

Checks to see if the baseMap was loaded, and if not, it loads it. Always use this instead of trying to access the baseMap directly.


getBaseToShort

public java.util.Hashtable getBaseToShort()

Returns a hashtable mapping BaseDump references to their object type id in Short form. This is a holdover from a time when the client didn't create local copies of the server's Base references.

Checks to see if the basetoShort was loaded, and if not, it loads it. Always use this instead of trying to access the baseToShort directly.


getObjectType

public java.lang.String getObjectType(Invid objId)

Returns the type name for a given object.

If the loader thread hasn't yet downloaded that information, this method will block until the information is available.


getObjectHandle

public ObjectHandle getObjectHandle(Invid invid,
                                    java.lang.Short type)

Pulls a object handle for an invid out of the client's cache, if it has been cached.

If no handle for this invid has been cached, this method will return null.


setStatus

public final void setStatus(java.lang.String status)

Sets text in the status bar, with a 5 second countdown before the status bar is cleared.

Parameters:
status - The text to display

setStatus

public final void setStatus(java.lang.String status,
                            int timeToLive)

Sets text in the status bar, with a defined countdown before the status bar is cleared.

Parameters:
status - The text to display
timeToLive - Number of seconds to wait until clearing the status bar. If zero or negative, the status bar timer will not clear the field until the status bar is changed by another call to setStatus.

softTimeout

public final void softTimeout()

This method is triggered by the Ganymede server if the client is idle long enough. This method will downgrade the user's login to a minimum privilege level if possible, requiring the user to enter their admin password again to regain admin privileges.


setBuildStatus

public final void setBuildStatus(java.lang.String status)

Sets text in the build status bar

Parameters:
status - The text to display

getSelectedObjectNode

public InvidNode getSelectedObjectNode()

Returns the node of the object currently selected in the tree, if any. Returns null if there are no nodes selected in the tree, of if the node selected in the tree is not an object node.


getStatus

public java.lang.String getStatus()
Get the current text from the client's status field

showHelpWindow

public void showHelpWindow()

Show the help window.

This might someday take an argument, which would show a starting page or some more specific help.


showAboutMessage

public void showAboutMessage()
Shows the About... dialog.

showCredits

public void showCredits()
Shows the credits dialog.

showMOTD

public void showMOTD()
Shows the server's message of the day in a dialog.

showMOTD

public void showMOTD(java.lang.String message,
                     boolean html)
This method generates a message-of-the-day dialog.
Parameters:
message - The message to display. May be multiline.
html - If true, showMOTD() will display the motd with a html renderer, in Swing 1.1b2 and later.

showErrorMessage

public final void showErrorMessage(java.lang.String message)
Pops up an error dialog with the default title.

showErrorMessage

public final void showErrorMessage(java.lang.String title,
                                   java.lang.String message)
Pops up an error dialog.

showErrorMessage

public final void showErrorMessage(java.lang.String title,
                                   java.lang.String message,
                                   java.awt.Image icon)
Show an error dialog.
Parameters:
title - title of dialog.
message - Text of dialog.
icon - optional icon to display.

setWaitCursor

public void setWaitCursor()
Set the cursor to a wait cursor(usually a watch.)

setNormalCursor

public void setNormalCursor()

Set the cursor to the normal cursor(usually a pointer.)

This is dependent on the operating system.


somethingChanged

public final void somethingChanged()

This indeicates that something in the database was changed, so cancelling this transaction will have consequences.

This should be called whenever the client makes any changes to the database. That includes creating objects, editting fields of objects, removing objects, renaming, expiring, deleting, inactivating, and so on. It is very important to call this whenever something might have changed.


setSomethingChanged

private void setSomethingChanged(boolean state)
Sets or clears the client's somethingChanged flag.

getSomethingChanged

public boolean getSomethingChanged()
True if something has been changed since the last commit/cancel

isApplet

public boolean isApplet()
True if we are in an applet context, meaning we don't have access to local files, etc.

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.


createToolbar

javax.swing.JToolBar createToolbar()
Creates and initializes the client's toolbar.

clearTree

void clearTree()

Clears out the client's tree.

All Nodes will be removed, and the Category and BaseNodes will be rebuilt. No InvidNodes will be added.


buildTree

void buildTree()
         throws java.rmi.RemoteException

This method builds the initial data structures for the object selection tree, using the base information in the baseHash hashtable gained from the Loader thread.


recurseDownCategories

void recurseDownCategories(CatTreeNode node,
                           Category c)
                     throws java.rmi.RemoteException

Recurses down the category tree obtained from the server, loading the client's tree with category and object folder nodes.


insertCategoryNode

treeNode insertCategoryNode(CategoryNode node,
                            treeNode prevNode,
                            treeNode parentNode)
                      throws java.rmi.RemoteException
Helper method for building tree

refreshObjects

void refreshObjects(BaseNode node,
                    boolean doRefresh)
              throws java.rmi.RemoteException

This method is used to update the list of object nodes under a given base node in our object selection tree, synchronizing the tree with the actual objects on the server.

Parameters:
node - Tree node corresponding to the object type being refreshed in the client's tree.
doRefresh - If true, causes the tree to update its display.

refreshTreeAfterCommit

void refreshTreeAfterCommit()
                      throws java.rmi.RemoteException

Updates the tree for the nodes that might have changed.

This method fixes all the icons, removing icons that were marked as to-be-deleted or dropped, and cleans out the various hashes. Only call this when commit is clicked. This replaces refreshTree(boolean committed), because all the refreshing to be done after a cancel is now handled in the cancelTransaction() method directly.

This method is precisely analagous in function to cleanUpAfterCancel(), except for use after a commit.


refreshChangedObjectHandles

public void refreshChangedObjectHandles(java.util.Vector paramVect,
                                        boolean afterCommit)

Queries the server for status information on a vector of invid's that were touched in some way by the client during the recent transaction. The results from the queries are used to update the icons in the tree.

Called by refreshTreeAfterCommit().

This method is called from refreshTreeAfterCommit().

Parameters:
paramVect - Vector of invid's to refresh.
afterCommit - If true, this method will update the client's status bar as it progresses.

refreshChangedObject

public void refreshChangedObject(Invid invid)
This method does the same thing as refreshChangedObjectHandles(), but for a single object only.

setIconForNode

public void setIconForNode(Invid invid)

Updates a database object's icon in the tree display. This method uses the various client-side caches and hashes to determine the proper icon for the node.

This method does not actually induce the tree to refresh itself, and may be called in bulk for a lot of nodes efficiently.


editObject

public void editObject(Invid invid)

Opens a new framePanel window to allow the user to edit an object.

Use this to edit objects, so gclient can keep track of the caches, tree nodes, and all the other dirty work. This should be the only place windowPanel.addWindow() is called for editing purposes.

Parameters:
invid - id for the object to be edited in the new window.

editObject

public void editObject(Invid invid,
                       java.lang.String objectType)

Opens a new framePanel window to allow the user to edit an object.

Use this to edit objects, so gclient can keep track of the caches, tree nodes, and all the other dirty work. This should be the only place windowPanel.addWindow() is called for editing purposes.

Parameters:
invid - id for the object to be edited in the new window.
objectType - String describing the kind of object being edited, used in the titlebar of the window created.

cloneObject

public db_object cloneObject(Invid origInvid)

Creates a new object on the server and opens a new client framePanel window to allow the user to edit the new object.

Parameters:
type - Type of object to be created

createObject

public db_object createObject(short type)

Creates a new object on the server and opens a new client framePanel window to allow the user to edit the new object.

Parameters:
type - Type of object to be created

viewObject

public void viewObject(Invid invid)

Opens a new framePanel window to view the object corresponding to the given invid.


viewObject

public void viewObject(Invid invid,
                       java.lang.String objectType)

Opens a new framePanel window to view the object corresponding to the given invid.

Parameters:
objectType - Type of the object to be viewed.. if this is null, the server will be queried to determine the type of object for the title-bar of the view object window. By providing it here from a local cache, and server-call can be saved.

deleteObject

public boolean deleteObject(Invid invid,
                            boolean showDialog)

Marks an object on the server as deleted. The object will not actually be removed from the database until the transaction is committed.

This method does a fair amount of internal bookkeeping to manage the client's tree display, status caching, etc.


inactivateObject

public boolean inactivateObject(Invid invid)

Marks an object on the server as inactivated. The object will not actually be removed from the database until the transaction is committed. Note that the inactivation request will typically cause a dialog to come back from the server requesting the user fill in parameters describing how the object is to be inactivated.

This method does a fair amount of internal bookkeeping to manage the client's tree display, status caching, etc.


reactivateObject

public boolean reactivateObject(Invid invid)

Reactivates an object that was previously inactivated. The object's status will not actually be changed in the database until the transaction is committed. Note that the reactivation request will typically cause a dialog to come back from the server requesting the user fill in parameters describing how the object is to be reactivated.

Typically reactivating an object involves clearing the removal date from I think you should call this from the expiration date panel if the date is cleared.


createObjectDialog

void createObjectDialog()
Show the create object dialog, let the user choose to create or not create an object.

editObjectDialog

void editObjectDialog()

Opens a dialog to let the user choose an object for editing, and if cancel is not chosen, the object is opened for editing.

If an object node is selected in the client's tree, the dialog will be pre-loaded with the type and name of the selected node.


viewObjectDialog

void viewObjectDialog()

Opens a dialog to let the user choose an object for viewing, and if cancel is not chosen, the object is opened for viewing.

If an object node is selected in the client's tree, the dialog will be pre-loaded with the type and name of the selected node.


inactivateObjectDialog

void inactivateObjectDialog()

Opens a dialog to let the user choose an object for inactivation, and if cancel is not chosen, the object is opened for inactivation.

If an object node is selected in the client's tree, the dialog will be pre-loaded with the type and name of the selected node.


deleteObjectDialog

void deleteObjectDialog()

Opens a dialog to let the user choose an object for deletion, and if cancel is not chosen, the object is opened for deletion.

If a node is selected in the client's tree, the dialog will be pre-loaded with the type and name of the selected object.


cloneObjectDialog

void cloneObjectDialog()

Opens a dialog to let the user choose an object for cloning, and if cancel is not chosen, the object is opened for cloning.

If a node is selected in the client's tree, the dialog will be pre-loaded with the type and name of the selected object.


changePersona

void changePersona(boolean requirePassword)

Creates and presents a dialog to let the user change their selected persona.

gclient's personaListener reacts to events from the persona change dialog and will react appropriately as needed. This method doesn't actually do anything other than display the dialog.

PersonaDialog is modal, however, so this method will block until the user makes a choice in the dialog box.


getPersonaDialog

PersonaDialog getPersonaDialog()

Returns a reference to the most recently created persona dialog.


logout

void logout()

Logs out from the client.

This method does not do any checking, it just logs out.


chooseFilter

public void chooseFilter()

Create a custom query filter.

The filter is used to limit the output on a query, so that supergash can see the world through the eyes of a less-privileged persona. This seemed like a good idea at one point, not sure how valuable this really is anymore.


chooseDefaultOwner

public void chooseDefaultOwner(boolean forcePopup)

Chooses the default owner group for a newly created object.

This must be called before Session.create_db_object is called.


defaultOwnerChosen

public boolean defaultOwnerChosen()
True if a default owner has already been chosen.

OKToProceed

boolean OKToProceed()

Check for changes in the database before logging out.

This checks to see if anything has been changed. Basically, if edit panels are open and have been changed in any way, then somethingChanged will be true and the user will be warned. If edit panels are open but have not been changed, then it will return true(it is ok to proceed).


updateNotePanels

void updateNotePanels()

Updates the note panels in the open windows.

The note panel doesn't have a listener on the TextArea, so when a transaction is committed, this must be called on each notePanel in order to update the server.

This basically does a field.setValue(notesArea.getValue()) on each notesPanel.

THIS IS A PRETTY BIG HACK.


commitTransaction

public void commitTransaction()

Commits the currently open transaction on the server. All changes made by the user since the last openNewTransaction() call will be integrated into the database on the Ganymede server.

For various reasons, the server may reject the transaction as incomplete. Usually this will be a non-fatal error.. the user will see a dialog telling him what else needs to be filled out in order to commit the transaction. In this case, commitTransaction() will have had no effect and the user is free to try again.

If the transaction is committed successfully, the relevant object nodes in the tree will be fixed up to reflect their state after the transaction is committed. commitTransaction() will close all open editing windows, and will call openNewTransaction() to prepare the server for further changes by the user.


cancelTransaction

public void cancelTransaction()

Cancels the current transaction. Any changes made by the user since the last openNewTransaction() call will be forgotten as if they never happened. The client's tree display will be reverted to the state it was when the transaction was started, and all open windows will be closed.


cleanUpAfterCancel

private void cleanUpAfterCancel()

Cleans up the tree and gclient's caches.

This method is precisely analagous in function to refreshTreeAfterCommit(), except for use after a cancel, when nodes marked as deleted are not removed from the tree, and nodes marked as created are not kept.


openNewTransaction

private void openNewTransaction()
Initializes a new transaction on the server

toggleToolBar

void toggleToolBar()
toggles the toolbar on and off

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)

Handles button and menu picks. Includes logic for threading out queries and message panels to avoid locking the Java GUI thread.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

openAnInvid

void openAnInvid()
This is a debugging hook, to allow the user to enter an invid in string form for direct viewing.

addTableWindow

public void addTableWindow(Session session,
                           Query query,
                           DumpResult buffer,
                           java.lang.String title)

processWindowEvent

protected void processWindowEvent(java.awt.event.WindowEvent e)
Overrides:
processWindowEvent in class javax.swing.JFrame

setValuePerformed

public boolean setValuePerformed(JValueObject o)

This method comprises the JsetValueCallback interface, and is how some data-carrying components notify us when something changes.

Specified by:
setValuePerformed in interface JsetValueCallback
See Also:
JsetValueCallback, JValueObject

treeNodeExpanded

public 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.
Specified by:
treeNodeExpanded in interface treeCallback
Parameters:
node - The node opened in the tree.
See Also:
treeCanvas

treeNodeContracted

public void treeNodeContracted(treeNode node)
Called when a node is closed.
Specified by:
treeNodeContracted in interface treeCallback
See Also:
treeCanvas

treeNodeSelected

public void treeNodeSelected(treeNode node)
Called when an item in the tree is unselected
Specified by:
treeNodeSelected in interface 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)
Description copied from interface: treeCallback
Called when an item in the tree is double-clicked.
Specified by:
treeNodeDoubleClicked 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

treeNodeMenuPerformed

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

sortListHandleVector

public java.util.Vector sortListHandleVector(java.util.Vector v)
sort a vector of listHandles
Parameters:
v - Vector to be sorted
Returns:
Vector of sorted listHandles(sorted by label)

sortStringVector

public java.util.Vector sortStringVector(java.util.Vector v)
Sort a vector of Strings
Returns:
Vector of sorted Strings.

cleanUp

public void cleanUp()

This method does all the clean up required to let garbage collection tear everything completely down.

This method must be called from the Java GUI thread.