org.hsqldb.util
Class ZaurusEditor

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended byorg.hsqldb.util.ZaurusEditor
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class ZaurusEditor
extends java.awt.Panel
implements java.awt.event.ActionListener

ZaurusEditor implements an search/input/edit form to search/view/update/insert table records.

Author:
ulrivo@users
See Also:
Serialized Form

Field Summary
 
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
ZaurusEditor()
          Constructor declaration
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          actionPerformed method is the main entry point which interprets the buttons and initiates the actions.
static void clearStatus()
          The class method clearStatus deletes the status line.
static void printStatus(java.lang.String text)
          printStatus prints a text into the status line below the panel.
 void refresh(java.sql.Connection c)
          refresh will read again the meta data of the actual database.
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
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, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ZaurusEditor

public ZaurusEditor()
Constructor declaration

Method Detail

printStatus

public static void printStatus(java.lang.String text)
printStatus prints a text into the status line below the panel.

Parameters:
text - a String value will be shown

clearStatus

public static void clearStatus()
The class method clearStatus deletes the status line.


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed method is the main entry point which interprets the buttons and initiates the actions.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - an ActionEvent value is been sent to ZaurusEditor as ActionListener

The possible events are:

  • Buttons on the search panel:
    Search Row
    Starts the search of rows in the choosen table with the given search words and search options. Without any search words, all rows will be found.
    If no row meets the criteria, there will be a message in the status line.
    New Row
    An empty input panel for the choosen table is given. Any search words are ignored.
  • Buttons on the edit panel:
    Any changes to field values on this panel will be updated to the table when the actual row is left, i. e. when pressing one of the buttons 'Prev', 'Next' or 'Search'.
    Cancel
    Any changes to field contents are canceled and reset to the previous values.
    Prev
    Show the previous row which meets the search criteria.
    Next
    Show the next row which meets the search criteria.
    Delete
    This button has to be clicked twice and the shown row will be deleted from the table
    Search
    With this button a new search is initiated. Any changes made to field contents are saved
  • Buttons on the insert panel:
    Cancel Insert
    After beginning to fill a new row, the insert may be cancelled. The search panel will be shown next.
    New Insert
    The new row is inserted into the table and a new empty insert panel is shown.
    New Search
    The new row is inserted into the table and the search panel is shown again.

refresh

public void refresh(java.sql.Connection c)
refresh will read again the meta data of the actual database. This is useful after changes of the table structures for instance creating or dropping tables, or altering tabel. The method will be called if one asks to refresh the tree or if the connection to the database is changed.

Parameters:
c - a Connection is the actual connection to the database


Copyright © 2001 - 2002 HSQL Development Group. All Rights Reserved.