arlut.csd.ganymede
Class GASHAdmin

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--javax.swing.JApplet
                                |
                                +--arlut.csd.ganymede.GASHAdmin
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.lang.Runnable, java.io.Serializable

public class GASHAdmin
extends javax.swing.JApplet
implements java.lang.Runnable, java.awt.event.ActionListener

Ganymede GUI admin console.

GASHAdmin is a dual-mode (applet/application) GUI app for monitoring and controlling the Ganymede server. In addition to monitoring users and tasks on the Ganymede server, the admin console includes a full-functioned schema editor.

GASHAdmin connects to a running GanymedeServer using the admin() method. In order to get logged into the server, GASHAdmin itself publishes an iAdmin object via RMI implementing the Admin interface so that the server can dynamically update us as things happen on the server.

See Also:
Serialized Form

Field Summary
(package private) static arlut.csd.ganymede.iAdmin admin
          The iAdmin object is the remote reference to the Ganymede server used by the admin console.
(package private) static java.awt.Image admin_logo
           
(package private) static arlut.csd.ganymede.GASHAdmin applet
          We assume that we're only ever going to have one console running in any given JVM, we keep track of it here as a convenience.
private static java.awt.Container appletContentPane
           
protected  boolean connected
           
(package private) static boolean debug
           
(package private)  java.awt.Image errorImage
           
(package private) static arlut.csd.ganymede.GASHAdminFrame frame
          We keep track of the single admin window that gets opened up here.
(package private)  javax.swing.JButton loginButton
           
(package private)  javax.swing.JPasswordField password
           
(package private)  javax.swing.JButton quitButton
           
(package private) static int registryPortProperty
           
(package private) static arlut.csd.ganymede.Server server
           
(package private) static java.lang.String serverhost
           
(package private) static java.lang.String url
           
(package private)  javax.swing.JTextField username
           
(package private) static boolean WeAreApplet
          If true, we are running as an applet and are limited by the Java sandbox.
 
Fields inherited from class javax.swing.JApplet
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.applet.Applet
 
Fields inherited from class java.awt.Panel
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
GASHAdmin()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 javax.swing.JPanel createLoginPanel()
           
 void destroy()
           
 java.awt.Image getErrorImage()
          Loads and returns the error Image for use in client dialogs.
 void init()
           
private  void loadParameters()
          Private method to load the Ganymede console's parameters from an applet's HTML parameters.
private static boolean loadProperties(java.lang.String filename)
          Private method to load the Ganymede console's parameters from a file.
static void main(java.lang.String[] argv)
           
 void run()
          This will be executed in the thread that tries to connect to the server.
 void stop()
           
 
Methods inherited from class javax.swing.JApplet
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.applet.Applet
getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, 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, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

debug

static final boolean debug
See Also:
Constant Field Values

applet

static arlut.csd.ganymede.GASHAdmin applet
We assume that we're only ever going to have one console running in any given JVM, we keep track of it here as a convenience.


frame

static arlut.csd.ganymede.GASHAdminFrame frame
We keep track of the single admin window that gets opened up here.


admin

static arlut.csd.ganymede.iAdmin admin
The iAdmin object is the remote reference to the Ganymede server used by the admin console.


WeAreApplet

static boolean WeAreApplet
If true, we are running as an applet and are limited by the Java sandbox. A few features of the client will be disabled if this is true (saving query reports to disk, etc.).


serverhost

static java.lang.String serverhost

registryPortProperty

static int registryPortProperty

url

static java.lang.String url

connected

protected boolean connected

server

static arlut.csd.ganymede.Server server

appletContentPane

private static java.awt.Container appletContentPane

admin_logo

static java.awt.Image admin_logo

username

javax.swing.JTextField username

password

javax.swing.JPasswordField password

quitButton

javax.swing.JButton quitButton

loginButton

javax.swing.JButton loginButton

errorImage

java.awt.Image errorImage
Constructor Detail

GASHAdmin

public GASHAdmin()
Method Detail

main

public static void main(java.lang.String[] argv)

init

public void init()
Overrides:
init in class java.applet.Applet

stop

public void stop()
Overrides:
stop in class java.applet.Applet

destroy

public void destroy()
Overrides:
destroy in class java.applet.Applet

createLoginPanel

public javax.swing.JPanel createLoginPanel()

run

public void run()
This will be executed in the thread that tries to connect to the server. The thread will terminate after a connection to the server has been made.

Specified by:
run in interface java.lang.Runnable

actionPerformed

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

loadProperties

private static boolean loadProperties(java.lang.String filename)

Private method to load the Ganymede console's parameters from a file. Used when GASHAdmin is run from the command line.. loadParameters() is for use in an applet context.


loadParameters

private void loadParameters()

Private method to load the Ganymede console's parameters from an applet's HTML parameters. Used when GASHAdmin is run as an applet.. loadProperties() is for use in an application context.


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().