public final 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 (framePanel) 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.
javax.swing.JFrame.AccessibleJFramejava.awt.Window.AccessibleAWTWindow, java.awt.Window.Type| Modifier and Type | Field and Description |
|---|---|
(package private) glogin |
_myglogin
Reference to the applet which instantiated us.
|
(package private) aboutGanyDialog |
about |
private static java.lang.String |
about_action |
private static java.lang.String |
access_invid_action |
(package private) javax.swing.JMenu |
actionMenu |
(package private) boolean |
altKeyDown
Will be set to true by the AltKeyListener if the user has the alt
or option key held down.
|
private java.awt.KeyEventDispatcher |
altKeyListener
A custom KeyEventDispatcher we use to toggle the commit button's
text when the alt/option key is held down.
|
(package private) javax.swing.ImageIcon |
buildIcon |
(package private) javax.swing.ImageIcon |
buildIcon2 |
(package private) javax.swing.JLabel |
buildLabel
Status, build status, and login status labels at the bottom of the client.
|
private int |
buildPhase |
(package private) javax.swing.ImageIcon |
buildUnknownIcon |
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.HashSet<Invid> |
changedSet
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).
|
private static java.lang.String |
clone_action |
private static java.lang.String |
clone_pop_action |
(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 |
private java.lang.String |
comment
Variable used to track commit comment text.
|
(package private) javax.swing.JButton |
commit |
(package private) java.lang.String |
commitButtonText |
(package private) java.lang.String |
commitCommentButtonText |
(package private) javax.swing.JMenuItem |
copyMI |
private static java.lang.String |
create_action |
private static java.lang.String |
create_pop_action |
(package private) createObjectDialog |
createDialog |
(package private) java.awt.Image |
createDialogImage |
private java.util.Hashtable<Invid,BaseNode> |
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<Invid,CacheInfo> |
createHash
|
(package private) javax.swing.JMenuItem |
createObjectMI |
(package private) java.awt.Image |
creation |
(package private) java.lang.String |
currentPersonaString
Name of the currently active persona.
|
(package private) javax.swing.JMenuItem |
cutMI |
static boolean |
debug |
private static java.lang.String |
default_owner_action |
(package private) boolean |
defaultOwnerChosen |
(package private) JDefaultOwnerDialog |
defaultOwnerDialog |
(package private) javax.swing.JMenuItem |
defaultOwnerMI |
private static java.lang.String |
delete_action |
private static java.lang.String |
delete_pop_action |
private java.util.Hashtable<Invid,CacheInfo> |
deleteHash
|
(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. |
private static java.lang.String |
edit_action |
private static java.lang.String |
edit_pop_action |
(package private) javax.swing.JMenu |
editMenu |
(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 |
private static java.lang.String |
help_action |
(package private) javax.swing.JMenu |
helpMenu |
private static java.lang.String |
hide_pop_action |
(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 |
private static java.lang.String |
inactivate_action |
private static java.lang.String |
inactivate_pop_action |
(package private) java.awt.Image |
inactivateIcon |
(package private) javax.swing.JMenuItem |
inactivateObjectMI |
(package private) java.awt.Image |
infoImage |
protected java.util.Hashtable<Invid,InvidNode> |
invidNodeHash
|
(package private) aboutJavaDialog |
java_ver_dialog |
private static java.lang.String |
java_version_action |
(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.JLabel |
loginLabel
Status, build status, and login status labels at the bottom of the client.
|
StatusClearThread |
loginStatusThread
This thread is used to clear the statusLabel after some interval after
it is set.
|
(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 |
private static java.lang.String |
motd_action |
(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 |
private static java.lang.String |
owner_filter_action |
(package private) java.util.Vector<listHandle> |
ownerGroups |
(package private) javax.swing.JMenuItem |
pasteMI |
(package private) java.awt.Image |
pencil |
private static java.lang.String |
persona_action |
(package private) PersonaDialog |
personaDialog |
(package private) java.util.Vector<java.lang.String> |
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 |
static java.util.prefs.Preferences |
prefs
Preferences object for the Ganymede client.
|
(package private) boolean |
promptForComments
If true, the client will prompt for comments at commit time by
default.
|
(package private) javax.swing.JCheckBoxMenuItem |
promptForCommentsMI |
private static java.lang.String |
query_action |
private static java.lang.String |
query_pop_action |
(package private) java.awt.Image |
queryIcon |
(package private) java.awt.Image |
questionImage |
javax.swing.border.BevelBorder |
raisedBorder |
private static java.lang.String |
reactivate_pop_action |
private static java.lang.String |
report_edit_pop_action |
private static java.lang.String |
report_pop_action |
private static boolean |
reportVersionToServer
If reportVersionToServer is true, the Ganymede client will report
the Java version information to the server that it has logged
into on startup.
|
(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<java.lang.Short,BaseNode> |
shortToBaseNodeHash
|
private static java.lang.String |
show_pop_action |
(package private) javax.swing.JMenuItem |
showHelpMI |
static windowSizer |
sizer |
private boolean |
somethingChanged |
private javax.swing.JSplitPane |
sPane |
javax.swing.border.CompoundBorder |
statusBorder |
javax.swing.border.CompoundBorder |
statusBorderRaised |
(package private) javax.swing.JLabel |
statusLabel
Status, build status, and login status labels at the bottom of the client.
|
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 |
submitXMLMI |
(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) static TranslationService |
ts
TranslationService object for handling string localization in the
Ganymede client.
|
private static java.lang.String |
view_action |
private static java.lang.String |
view_pop_action |
(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.
|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabledCROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSORBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Handles button and menu picks.
|
void |
addTableWindow(Session session,
Query query,
DumpResult buffer) |
(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.
|
boolean |
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.
|
void |
cloneObject(Invid origInvid)
Clones an object based on origInvid 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(boolean promptForComment)
Commits the currently open transaction on the server.
|
com.explodingpixels.macwidgets.UnifiedToolBar |
createMacToolBar() |
private javax.swing.JMenuBar |
createMenuBar()
Create our client's menu bar from localization resources.
|
private javax.swing.JMenuItem |
createMenuItem(java.lang.String text,
java.lang.String actionCommand) |
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.
|
private void |
createTree()
Create the tree component used in the left hand side of the client.
|
boolean |
defaultOwnerChosen()
True if a default owner has already been chosen.
|
void |
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.
|
private java.lang.String |
dialogMenuName(java.lang.String text)
Generates a Mac-compliant menu item name if we're running on a
Mac, else returns the text unmodified.
|
void |
editObject(Invid invid)
Opens a new
framePanel
window to allow the user to edit an object. |
void |
editObject(Invid invid,
framePanel originalWindow)
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.
|
Invid |
findParentInvid(Invid invid)
Find the top-most parent Invid of the given Invid.
|
java.util.Vector<Base> |
getBaseList()
|
java.util.Hashtable<java.lang.Short,Base> |
getBaseMap()
|
java.util.Hashtable<Base,java.lang.String> |
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. |
int |
getBuildPhase()
Public accessor for the SecurityLaunderThread
|
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. |
java.awt.Image |
getInfoImage()
Loads and returns the neutral 'Info' Image for use in client dialogs.
|
java.lang.String |
getObjectDesignation(Invid objId)
This method returns a concatenated string made up of the object
type and object name.
|
ObjectHandle |
getObjectHandle(Invid invid)
Pulls a object handle for an invid out of the
client's cache, if it has been cached.
|
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<FieldTemplate> |
getTemplateVector(short id)
Returns a vector of
FieldTemplate's. |
java.util.Vector<FieldTemplate> |
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.
|
void |
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 |
invidHasBeenEdited(Invid invid)
Returns true if this Invid has been created or edited during the
current transaction.
|
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) void |
logout(boolean andQuit)
Logs out from the client and optionally quits 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
|
(package private) void |
postQuery(BaseDump base)
Pop up the query box
|
void |
processException(java.lang.Throwable ex)
This method is used to display an error dialog for the given
exception.
|
void |
processException(java.lang.Throwable ex,
java.lang.String message)
This method is used to display an error dialog for the given
exception.
|
void |
processExceptionRethrow(java.lang.Throwable ex)
This method is used to display an error dialog for the given
exception, and to rethrow it as a RuntimeException.
|
void |
processExceptionRethrow(java.lang.Throwable ex,
java.lang.String message)
This method is used to display an error dialog for the given
exception, and to rethrow it as a RuntimeException.
|
protected void |
processWindowEvent(java.awt.event.WindowEvent e) |
void |
processXMLSubmission()
This method is called to prompt the user for an XML file to be
submitted to the server, which it will proceed to do.
|
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. |
void |
refreshCommitLabel()
This method updates the commit button's label, with the text
set according to whether the user has the 'Prompt for Comments on
Commit' menu item checked and whether or not the Alt/Option key
is held down.
|
(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.
|
private void |
setAccelerator(javax.swing.JMenuItem item,
char key) |
private void |
setAccelerator(javax.swing.JMenuItem item,
java.lang.String key)
Sets a direct access accelerator on a menu item.
|
void |
setBuildStatus(java.lang.String status)
Updates the status icon, based on an enumerated list of strings
that can be provided from the server.
|
void |
setDefaultStatus(java.lang.String status)
Sets the text that will appear in the status bar when no other
status is being displayed.
|
void |
setIconForNode(Invid invid)
Updates a database object's icon in the tree display.
|
void |
setLoginCount(int loginCount)
This method is called to update the client's display of the
number of users concurrently logged into the server.
|
private void |
setMenuMnemonic(javax.swing.JMenuItem item,
java.lang.String pattern)
This helper method sets the mnemonic character for a menu item.
|
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... 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 |
showExceptionMessage(java.lang.String title,
java.lang.String message)
Show an Exception dialog, and offer to transmit the error message
to the server.
|
void |
showExceptionMessage(java.lang.String title,
java.lang.String message,
java.awt.Image icon)
Show an Exception dialog, and offer to transmit the error message to
the server.
|
void |
showHelpWindow()
Show the help window.
|
void |
showJavaVersion()
Shows the Java Version dialog.
|
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 |
showNotLoggedIn()
Display a message explaining that the user is no longer logged in
|
void |
softTimeout()
This method is triggered by the Ganymede server if the client
is idle long enough.
|
void |
somethingChanged()
Call this method to enable indicators that something in the
database was changed, so cancelling this transaction will have
consequences.
|
java.util.Vector<listHandle> |
sortListHandleVector(java.util.Vector<listHandle> v)
Sorts a vector of listHandles in place.
|
java.util.Vector<java.lang.String> |
sortStringVector(java.util.Vector<java.lang.String> v)
Sort a vector of Strings in-place.
|
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 selected
|
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.
|
void |
updateAfterFilterChange()
This method is called by the
JFilterDialog class when
the owner list filter is changed, to refresh the tree's display
of all object lists loaded into the client so that only those
objects matching the owner list filter are visible. |
(package private) void |
updateNotePanels()
Updates the note panels in the open windows.
|
private void |
updateTreeAfterFilterChange(treeNode node)
This method updates all category and base nodes at or under
the given node, and all category and base nodes that are nextSiblings
to the given node.
|
void |
viewObject(Invid invid)
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.
|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandleraddNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecoratedaddPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFrontadd, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic static boolean debug
static final TranslationService ts
private static final boolean reportVersionToServer
public static final java.util.prefs.Preferences prefs
public static final windowSizer sizer
public static gclient client
static final int NUM_IMAGE
static final int OPEN_BASE
static final int CLOSED_BASE
static final int OPEN_FIELD
static final int OPEN_FIELD_DELETE
static final int OPEN_FIELD_CREATE
static final int OPEN_FIELD_CHANGED
static final int OPEN_FIELD_REMOVESET
static final int OPEN_FIELD_EXPIRESET
static final int CLOSED_FIELD
static final int CLOSED_FIELD_DELETE
static final int CLOSED_FIELD_CREATE
static final int CLOSED_FIELD_CHANGED
static final int CLOSED_FIELD_REMOVESET
static final int CLOSED_FIELD_EXPIRESET
static final int OPEN_CAT
static final int CLOSED_CAT
static final int OBJECTNOWRITE
private static final java.lang.String hide_pop_action
private static final java.lang.String show_pop_action
private static final java.lang.String query_pop_action
private static final java.lang.String report_edit_pop_action
private static final java.lang.String report_pop_action
private static final java.lang.String create_pop_action
private static final java.lang.String view_pop_action
private static final java.lang.String edit_pop_action
private static final java.lang.String clone_pop_action
private static final java.lang.String delete_pop_action
private static final java.lang.String inactivate_pop_action
private static final java.lang.String reactivate_pop_action
private static final java.lang.String persona_action
private static final java.lang.String query_action
private static final java.lang.String create_action
private static final java.lang.String edit_action
private static final java.lang.String view_action
private static final java.lang.String delete_action
private static final java.lang.String clone_action
private static final java.lang.String inactivate_action
private static final java.lang.String access_invid_action
private static final java.lang.String owner_filter_action
private static final java.lang.String default_owner_action
private static final java.lang.String help_action
private static final java.lang.String about_action
private static final java.lang.String java_version_action
private static final java.lang.String motd_action
final java.lang.String commitButtonText
final java.lang.String commitCommentButtonText
Session session
glogin _myglogin
CategoryDump dump
buildTree()
method.java.lang.String currentPersonaString
public javax.swing.border.EmptyBorder emptyBorder5
public javax.swing.border.EmptyBorder emptyBorder10
public javax.swing.border.BevelBorder raisedBorder
public javax.swing.border.BevelBorder loweredBorder
public javax.swing.border.LineBorder lineBorder
public javax.swing.border.CompoundBorder statusBorder
public javax.swing.border.CompoundBorder statusBorderRaised
private java.util.HashSet<Invid> changedSet
invid's for
objects that might have been changed by the client. The
collection of tree nodes corresponding to invid's listed in
changedSet will be refreshed by the client when a server is
committed or canceled.private java.util.Hashtable<Invid,BaseNode> createdObjectsWithoutNodes
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.protected java.util.Hashtable<java.lang.Short,BaseNode> shortToBaseNodeHash
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
private boolean toolToggle
private boolean somethingChanged
private int buildPhase
private java.awt.KeyEventDispatcher altKeyListener
helpPanel help
messageDialog motd
aboutGanyDialog about
aboutJavaDialog java_ver_dialog
java.util.Vector<java.lang.String> personae
java.util.Vector<listHandle> ownerGroups
javax.swing.JToolBar toolBar
JFilterDialog filterDialog
PersonaDialog personaDialog
JDefaultOwnerDialog defaultOwnerDialog
createObjectDialog createDialog
java.awt.Image[] images
javax.swing.JButton commit
javax.swing.JButton cancel
private javax.swing.JPanel statusPanel
private javax.swing.JSplitPane sPane
javax.swing.JLabel statusLabel
javax.swing.JLabel buildLabel
javax.swing.JLabel loginLabel
treeControl tree
treeNode selectedNode
java.awt.Image errorImage
java.awt.Image questionImage
java.awt.Image infoImage
java.awt.Image search
java.awt.Image queryIcon
java.awt.Image cloneIcon
java.awt.Image pencil
java.awt.Image personaIcon
java.awt.Image inactivateIcon
java.awt.Image treepencil
java.awt.Image trash
java.awt.Image treetrash
java.awt.Image creation
java.awt.Image treecreation
java.awt.Image newToolbarIcon
java.awt.Image ganymede_logo
java.awt.Image createDialogImage
javax.swing.ImageIcon idleIcon
javax.swing.ImageIcon buildIcon
javax.swing.ImageIcon buildIcon2
javax.swing.ImageIcon buildUnknownIcon
windowPanel wp
treeMenu pMenuAll
treeMenu pMenuEditable
treeMenu pMenuEditableCreatable
treeMenu pMenuAllCreatable
treeMenu objectViewPM
treeMenu objectReactivatePM
treeMenu objectInactivatePM
treeMenu objectRemovePM
javax.swing.JMenuBar menubar
javax.swing.JMenuItem copyMI
javax.swing.JMenuItem cutMI
javax.swing.JMenuItem pasteMI
javax.swing.JMenuItem logoutMI
javax.swing.JMenuItem clearTreeMI
javax.swing.JMenuItem filterQueryMI
javax.swing.JMenuItem defaultOwnerMI
javax.swing.JMenuItem showHelpMI
javax.swing.JMenuItem toggleToolBarMI
javax.swing.JMenuItem submitXMLMI
javax.swing.JCheckBoxMenuItem promptForCommentsMI
javax.swing.JCheckBoxMenuItem hideNonEditablesMI
boolean hideNonEditables
boolean promptForComments
private java.lang.String comment
boolean altKeyDown
boolean defaultOwnerChosen
javax.swing.JMenuItem changePersonaMI
javax.swing.JMenuItem editObjectMI
javax.swing.JMenuItem viewObjectMI
javax.swing.JMenuItem createObjectMI
javax.swing.JMenuItem deleteObjectMI
javax.swing.JMenuItem inactivateObjectMI
javax.swing.JMenuItem menubarQueryMI
java.lang.String my_username
javax.swing.JMenu fileMenu
javax.swing.JMenu editMenu
javax.swing.JMenu actionMenu
javax.swing.JMenu windowMenu
javax.swing.JMenu helpMenu
javax.swing.JMenu PersonaMenu
LAFMenu LandFMenu
PersonaListener personaListener
querybox my_querybox
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.
public StatusClearThread loginStatusThread
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.
public SecurityLaunderThread securityThread
This thread is set up to launder RMI build status updates from the server./p>
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.
private int wizardActive
public gclient(Session s, glogin g)
s - Connection to the server created for us by the glogin applet.g - The glogin applet which is creating us.public static java.lang.String stackTrace(java.lang.Throwable thing)
private javax.swing.JMenuBar createMenuBar()
private java.lang.String dialogMenuName(java.lang.String text)
private void setMenuMnemonic(javax.swing.JMenuItem item,
java.lang.String pattern)
private void setAccelerator(javax.swing.JMenuItem item,
java.lang.String key)
private void setAccelerator(javax.swing.JMenuItem item,
char key)
private void createTree()
private javax.swing.JMenuItem createMenuItem(java.lang.String text,
java.lang.String actionCommand)
public void start()
public java.util.Vector<FieldTemplate> getTemplateVector(short id)
FieldTemplate's.id - Object type id to retrieve field information for.public FieldTemplate getFieldTemplate(short objType, short fieldId)
FieldTemplate
based on the short type id for the containing object and the
short field id for the field.public java.util.Vector<FieldTemplate> getTemplateVector(java.lang.Short id)
FieldTemplate's
listing fields and field informaton for the object type identified by
id.id - The id number of the object type to be returned the base id.public void clearCaches()
objectCache,
which holds object labels, and activation status for invid's returned
by various query and db_field
choices() operations.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.
public int getBuildPhase()
public void update(java.awt.Graphics g)
update in class javax.swing.JFramepublic final Session getSession()
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().
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().
public final java.awt.Image getInfoImage()
Loads and returns the neutral 'Info' Image for use in client dialogs.
Once the image is loaded, it is cached for future calls to getInfoImage().
public final java.util.Hashtable<Base,java.lang.String> 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.
public final java.util.Vector<Base> getBaseList()
public java.util.Hashtable<java.lang.Short,Base> getBaseMap()
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.
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.
public java.lang.String getObjectDesignation(Invid objId)
This method returns a concatenated string made up of the object type and object name. This string is localized in the gclient.properties file, and should be structured in a fashion suitable for inclusion in gclient message strings with their own localizations.
Both the client and the server cache object information until a transaction deleting the object is committed, so it is explicitly legal to call getObjectDesignation() on Invids for objects that are being deleted in the current transaction.
public ObjectHandle getObjectHandle(Invid invid)
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 attempt to retrieve one from the server.
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 attempt to retrieve one from the server.
The Short type parameter is just a micro-optimizing convenience for code that already has such a Short constructed. This method will work perfectly well if the type parameter is null.
public final void setLoginCount(int loginCount)
This method is called to update the client's display of the number of users concurrently logged into the server.
loginCount - The number of users logged into the Ganymede serverpublic final void setDefaultStatus(java.lang.String status)
status - The text to displaypublic final void setStatus(java.lang.String status)
status - The text to displaypublic final void setStatus(java.lang.String status,
int timeToLive)
status - The text to displaytimeToLive - 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.public final void softTimeout()
public final void setBuildStatus(java.lang.String status)
Updates the status icon, based on an enumerated list of strings that can be provided from the server. These are "idle", "building", and "building2". The "building" state applies when the server is currently running builderPhase1. That is, when the server is (at least partially) locked while it dumps out data files.
The "building2" phase is in effect when the server is unlocked and has one or more threads waiting for the completion of external build scripts.
status - The text to key off of.public InvidNode getSelectedObjectNode()
public java.lang.String getStatus()
public void showHelpWindow()
Show the help window.
This might someday take an argument, which would show a starting page or some more specific help.
public void showJavaVersion()
public void showAboutMessage()
public void showMOTD()
public void showMOTD(java.lang.String message,
boolean html)
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.public final void processExceptionRethrow(java.lang.Throwable ex)
This method is used to display an error dialog for the given exception, and to rethrow it as a RuntimeException.
Potentially useful when catching RemoteExceptions from the server.
public final void processExceptionRethrow(java.lang.Throwable ex,
java.lang.String message)
This method is used to display an error dialog for the given exception, and to rethrow it as a RuntimeException.
Potentially useful when catching RemoteExceptions from the server.
public final void processException(java.lang.Throwable ex)
public final void processException(java.lang.Throwable ex,
java.lang.String message)
public final void showExceptionMessage(java.lang.String title,
java.lang.String message)
title - title of dialog.message - Text of dialog.public final void showExceptionMessage(java.lang.String title,
java.lang.String message,
java.awt.Image icon)
title - title of dialog.message - Text of dialog.icon - optional icon to display.public final void showNotLoggedIn()
public final void showErrorMessage(java.lang.String message)
public final void showErrorMessage(java.lang.String title,
java.lang.String message)
public final void showErrorMessage(java.lang.String title,
java.lang.String message,
java.awt.Image icon)
title - title of dialog.message - Text of dialog.icon - optional icon to display.public void setWaitCursor()
public void setNormalCursor()
public final void somethingChanged()
Call this method to enable indicators 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.
private void setSomethingChanged(boolean state)
public boolean getSomethingChanged()
public boolean invidHasBeenEdited(Invid invid)
public boolean isApplet()
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.
public Invid findParentInvid(Invid invid)
Find the top-most parent Invid of the given Invid.
javax.swing.JToolBar createToolbar()
public com.explodingpixels.macwidgets.UnifiedToolBar createMacToolBar()
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.
void buildTree()
throws java.rmi.RemoteException
Loader
thread.java.rmi.RemoteExceptionvoid recurseDownCategories(CatTreeNode node, Category c) throws java.rmi.RemoteException
java.rmi.RemoteExceptiontreeNode insertCategoryNode(CategoryNode node, treeNode prevNode, treeNode parentNode) throws java.rmi.RemoteException
java.rmi.RemoteExceptionvoid refreshObjects(BaseNode node, boolean doRefresh) throws java.rmi.RemoteException
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.java.rmi.RemoteExceptionvoid 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.
java.rmi.RemoteExceptionpublic 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().
paramVect - Vector of invid's to refresh.afterCommit - If true, this method will update the client's status
bar as it progresses.public void refreshChangedObject(Invid invid)
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.
public void processXMLSubmission()
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.
invid - id for the object to be edited in the new window.public void editObject(Invid invid, framePanel originalWindow)
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.
invid - id for the object to be edited in the new window.originalWindow - The framePanel that we are replacing with
the editing version. If null, we won't do any frame
replacement.. we'll just create a new frame.public void cloneObject(Invid origInvid)
framePanel
window to allow the user to edit the new object.origInvid - ID of object to be clonedpublic db_object createObject(short type)
framePanel
window to allow the user to edit the new object.type - Type of object to be createdpublic void viewObject(Invid invid)
framePanel
window to view the object corresponding to the given invid.public void 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.
invid - The object invid identifier to be deletedshowDialog - If true, we'll show a dialog box asking the user
if they are sure they want to delete the object in question.public void 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.
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 the removal date panel.
void createObjectDialog()
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.
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.
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.
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.
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.
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.
PersonaDialog getPersonaDialog()
void logout()
Logs out from the client.
This method does not do any checking, it just logs out.
void logout(boolean andQuit)
Logs out from the client and optionally quits the client.
This method does not do any checking, it just logs out.
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.
public void updateAfterFilterChange()
JFilterDialog class when
the owner list filter is changed, to refresh the tree's display
of all object lists loaded into the client so that only those
objects matching the owner list filter are visible.private void updateTreeAfterFilterChange(treeNode node)
public boolean chooseDefaultOwner(boolean forcePopup)
Chooses the default owner group for a newly created object.
This must be called before Session.create_db_object(short) is
called.
public boolean defaultOwnerChosen()
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).
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.
public void commitTransaction(boolean promptForComment)
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.
public void cancelTransaction()
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.
private void openNewTransaction()
void toggleToolBar()
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed in interface java.awt.event.ActionListenervoid postQuery(BaseDump base)
void openAnInvid()
This is a debugging hook, to allow the user to enter an invid in string form for direct viewing.
Since this is just for debugging, I haven't bothered to localize this method.
public void addTableWindow(Session session, Query query, DumpResult buffer)
protected void processWindowEvent(java.awt.event.WindowEvent e)
processWindowEvent in class javax.swing.JFramepublic boolean setValuePerformed(JValueObject o)
setValuePerformed in interface JsetValueCallbackJsetValueCallback,
JValueObjectpublic void treeNodeExpanded(treeNode node)
treeNodeExpanded in interface treeCallbacknode - The node opened in the tree.treeCanvaspublic void treeNodeContracted(treeNode node)
treeNodeContracted in interface treeCallbacktreeCanvaspublic void treeNodeSelected(treeNode node)
treeNodeSelected in interface treeCallbacknode - The node selected in the tree.treeCanvaspublic void treeNodeDoubleClicked(treeNode node)
treeCallbacktreeNodeDoubleClicked in interface treeCallbacknode - The node selected in the tree.treeCanvaspublic void treeNodeUnSelected(treeNode node, boolean otherNode)
treeNodeUnSelected in interface treeCallbacknode - The node selected in the tree.otherNode - If true, this node is being unselected by the selection
of another node.treeCanvaspublic void treeNodeMenuPerformed(treeNode node, java.awt.event.ActionEvent event)
treeNodeMenuPerformed in interface treeCallbacknode - The node selected in the tree.treeCanvaspublic java.util.Vector<listHandle> sortListHandleVector(java.util.Vector<listHandle> v)
Sorts a vector of listHandles in place.
v - Vector to be sortedpublic java.util.Vector<java.lang.String> sortStringVector(java.util.Vector<java.lang.String> v)
Sort a vector of Strings in-place.
public void refreshCommitLabel()
This method updates the commit button's label, with the text set according to whether the user has the 'Prompt for Comments on Commit' menu item checked and whether or not the Alt/Option key is held down.
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.