arlut.csd.ganymede.client
Class gResultTable

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JInternalFrame
                          |
                          +--arlut.csd.ganymede.client.gResultTable
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, rowSelectCallback, java.io.Serializable, javax.swing.WindowConstants

public class gResultTable
extends javax.swing.JInternalFrame
implements rowSelectCallback, java.awt.event.ActionListener

Client internal window for displaying the results of a query dump in a table form.

This window is created when windowPanel's addTableWindow method is called.

Note that windowPanel's addTableWindow method is called from gclient's actionPerformed method, which spawns a separate thread in which the query is performed and the gResultTable window is created.

Constructors for this class take a Query object describing the query that this table was generated from, and a DumpResult object actually containing the dump results from the Ganymede server. gResultTable can resubmit the dump query to the server if the user chooses to refresh the query, but normally the dump query is performed by gclient.

See Also:
Serialized Form

Field Summary
(package private)  javax.swing.JMenuItem cloneMI
           
(package private)  java.awt.Container contentPane
          The contentPane for this internal window.
(package private) static boolean debug
           
(package private)  javax.swing.JMenuItem deleteMI
           
(package private)  javax.swing.JMenuItem editMI
           
(package private)  javax.swing.JMenuItem inactivateMI
           
(package private)  javax.swing.JPopupMenu popMenu
           
(package private)  arlut.csd.ganymede.Query query
          The actual Query used to create this gResultTable.
(package private)  arlut.csd.ganymede.Session session
          Main remote interface for communications with the server.
(package private)  arlut.csd.JTable.rowTable table
          The GUI table component.
(package private)  javax.swing.JToolBar toolbar
           
(package private)  javax.swing.JMenuItem viewMI
           
(package private)  arlut.csd.ganymede.client.windowPanel wp
          Reference to the desktop pane containing the client's internal windows.
 
Fields inherited from class javax.swing.JInternalFrame
closable, CONTENT_PANE_PROPERTY, desktopIcon, FRAME_ICON_PROPERTY, frameIcon, GLASS_PANE_PROPERTY, iconable, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, isClosed, isIcon, isMaximum, isSelected, LAYERED_PANE_PROPERTY, maximizable, MENU_BAR_PROPERTY, resizable, ROOT_PANE_PROPERTY, rootPane, rootPaneCheckingEnabled, title, TITLE_PROPERTY
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
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 javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
gResultTable(arlut.csd.ganymede.client.windowPanel wp, arlut.csd.ganymede.Session session, arlut.csd.ganymede.Query query, arlut.csd.ganymede.DumpResult results)
          Constructor for gResultTable.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
           
private  javax.swing.JToolBar createToolBar()
          Creates and initializes the JInternalFrame's toolbar.
(package private)  java.lang.String escapeHTML(java.lang.String string)
          This helper method makes a field string safe to emit to an HTML file.
(package private)  java.lang.String escapeString(java.lang.String string, char sepChar)
          This helper method makes a field string safe to emit to a sepChar separated text file.
(package private)  java.lang.StringBuffer generateHTMLRep()
          This method generates an HTML representation of the table's contents.
(package private)  java.lang.StringBuffer generateTextRep(char sepChar)
          This method generates a sepChar-separated dump of the table's contents, one line per row of the table.
(package private)  javax.swing.JToolBar getToolBar()
           
 void loadResults(arlut.csd.ganymede.DumpResult results)
          This method loads the DumpResult into a table.
 void refreshQuery()
           
 void rowDoubleSelected(java.lang.Object key)
          Called when a row is double selected (double clicked) in rowTable
 void rowMenuPerformed(java.lang.Object key, java.awt.event.ActionEvent event)
          Called when a row is unselected in rowTable
 void rowSelected(java.lang.Object key)
          Called when a row is selected in rowTable
 void rowUnSelected(java.lang.Object key, boolean endSelected)
          Called when a row is unselected in rowTable
 void sendReport(boolean mailit)
           
private  void setStatus(java.lang.String s)
           
private  void setStatus(java.lang.String s, int timeLimit)
           
 
Methods inherited from class javax.swing.JInternalFrame
addImpl, addInternalFrameListener, createRootPane, dispose, doDefaultCloseAction, fireInternalFrameEvent, getAccessibleContext, getContentPane, getDefaultCloseOperation, getDesktopIcon, getDesktopPane, getFocusCycleRootAncestor, getFocusOwner, getFrameIcon, getGlassPane, getInternalFrameListeners, getJMenuBar, getLayer, getLayeredPane, getMenuBar, getMostRecentFocusOwner, getNormalBounds, getRootPane, getTitle, getUI, getUIClassID, getWarningString, hide, isClosable, isClosed, isFocusCycleRoot, isIcon, isIconifiable, isMaximizable, isMaximum, isResizable, isRootPaneCheckingEnabled, isSelected, moveToBack, moveToFront, pack, paintComponent, paramString, remove, removeInternalFrameListener, reshape, restoreSubcomponentFocus, setClosable, setClosed, setContentPane, setDefaultCloseOperation, setDesktopIcon, setFocusCycleRoot, setFrameIcon, setGlassPane, setIcon, setIconifiable, setJMenuBar, setLayer, setLayer, setLayeredPane, setLayout, setMaximizable, setMaximum, setMenuBar, setNormalBounds, setResizable, setRootPane, setRootPaneCheckingEnabled, setSelected, setTitle, setUI, show, toBack, toFront, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, 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

wp

arlut.csd.ganymede.client.windowPanel wp
Reference to the desktop pane containing the client's internal windows. Used to access some GUI resources.


session

arlut.csd.ganymede.Session session
Main remote interface for communications with the server. Used to resubmit the query on query refresh.


query

arlut.csd.ganymede.Query query
The actual Query used to create this gResultTable. Used if the user asks that the query be refreshed.


table

arlut.csd.JTable.rowTable table
The GUI table component.


contentPane

java.awt.Container contentPane
The contentPane for this internal window. We place the rowTable in this container.


popMenu

javax.swing.JPopupMenu popMenu

viewMI

javax.swing.JMenuItem viewMI

editMI

javax.swing.JMenuItem editMI

deleteMI

javax.swing.JMenuItem deleteMI

inactivateMI

javax.swing.JMenuItem inactivateMI

cloneMI

javax.swing.JMenuItem cloneMI

toolbar

javax.swing.JToolBar toolbar
Constructor Detail

gResultTable

public gResultTable(arlut.csd.ganymede.client.windowPanel wp,
                    arlut.csd.ganymede.Session session,
                    arlut.csd.ganymede.Query query,
                    arlut.csd.ganymede.DumpResult results)
             throws java.rmi.RemoteException
Constructor for gResultTable. Creates the GUI table, loads it, and presents it. DumpResult is dissociated when this constructor is through with it, to aid GC.

Method Detail

actionPerformed

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

sendReport

public void sendReport(boolean mailit)

refreshQuery

public void refreshQuery()

loadResults

public void loadResults(arlut.csd.ganymede.DumpResult results)
This method loads the DumpResult into a table. The DumpResult is dissociated when this method is through with it, to aid GC.


rowSelected

public void rowSelected(java.lang.Object key)
Description copied from interface: rowSelectCallback
Called when a row is selected in rowTable

Specified by:
rowSelected in interface rowSelectCallback
Parameters:
key - Hash key for the selected row

rowDoubleSelected

public void rowDoubleSelected(java.lang.Object key)
Description copied from interface: rowSelectCallback
Called when a row is double selected (double clicked) in rowTable

Specified by:
rowDoubleSelected in interface rowSelectCallback
Parameters:
key - Hash key for the selected row

rowUnSelected

public void rowUnSelected(java.lang.Object key,
                          boolean endSelected)
Description copied from interface: rowSelectCallback
Called when a row is unselected in rowTable

Specified by:
rowUnSelected in interface rowSelectCallback
Parameters:
key - Hash key for the unselected row
endSelected - false if the callback should assume that the final state of the system due to the user's present action will have no row selected

rowMenuPerformed

public void rowMenuPerformed(java.lang.Object key,
                             java.awt.event.ActionEvent event)
Description copied from interface: rowSelectCallback
Called when a row is unselected in rowTable

Specified by:
rowMenuPerformed in interface rowSelectCallback
Parameters:
key - Hash key for the row on which the popup menu item was performed
event - the original ActionEvent from the popupmenu. See event.getSource() to identify the menu item performed.

generateHTMLRep

java.lang.StringBuffer generateHTMLRep()
This method generates an HTML representation of the table's contents.


generateTextRep

java.lang.StringBuffer generateTextRep(char sepChar)
This method generates a sepChar-separated dump of the table's contents, one line per row of the table.


escapeString

java.lang.String escapeString(java.lang.String string,
                              char sepChar)
This helper method makes a field string safe to emit to a sepChar separated text file.


escapeHTML

java.lang.String escapeHTML(java.lang.String string)
This helper method makes a field string safe to emit to an HTML file.


setStatus

private final void setStatus(java.lang.String s)

setStatus

private final void setStatus(java.lang.String s,
                             int timeLimit)

createToolBar

private javax.swing.JToolBar createToolBar()
Creates and initializes the JInternalFrame's toolbar.


getToolBar

javax.swing.JToolBar getToolBar()