java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Panel
org.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.
- Version:
- 1.0
Starting on a search panel, one can choose a table from the actual
database. The list contains only tables which have a primary key
defined.
One may provide one or more words which are to be contained in the
rows of the table.
There are three options in searching these words:
- Use search words: all or any
Only rows which contain all words in any column will be
found. Alternatively, it is sufficient when any of the
words is contained in one of the columns.
- Ignore case :
While searching, there is no difference between lower or upper case
letters, if this optioned is set to 'yes',
- Match whole column:
It is sufficient that the given word is just a part of any
column. For instance, the word 'ring' will be found as part of
'Stringer'. Alternatively, the column content must match the search
word completely.
After choosing a table, typing one or more search words and
choosing some search options, the button Search Rows initiates
the search through the table.
Alternatively, the button New Row will open an empty input
panel for inserting a new row for the choosen table.
In both cases,
a table specific panel with an entry field per column is shown.
| Nested classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Fields inherited from class java.awt.Panel |
|
| Fields inherited from class java.awt.Container |
|
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusDownCycle, update, 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, firePropertyChange, firePropertyChange, firePropertyChange, 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, 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, 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, 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, transferFocusBackward, transferFocusUpCycle |
tStatus
static java.awt.TextField tStatus
cConn
java.sql.Connection cConn
dbmeta
java.sql.DatabaseMetaData dbmeta
bSearchRow
java.awt.Button bSearchRow
bNewRow
java.awt.Button bNewRow
bCancel1
java.awt.Button bCancel1
bPrev
java.awt.Button bPrev
bNext
java.awt.Button bNext
bDelete
java.awt.Button bDelete
bNewSearch
java.awt.Button bNewSearch
bCancel2
java.awt.Button bCancel2
bNewInsert
java.awt.Button bNewInsert
bNewSearch1
java.awt.Button bNewSearch1
pSearchButs
java.awt.Panel pSearchButs
pEditButs
java.awt.Panel pEditButs
pInsertButs
java.awt.Panel pInsertButs
vHoldTableNames
java.util.Vector vHoldTableNames
vHoldForms
java.util.Vector vHoldForms
aktHoldNr
int aktHoldNr
pForm
java.awt.Panel pForm
pButton
java.awt.Panel pButton
lForm
java.awt.CardLayout lForm
lButton
java.awt.CardLayout lButton
fSearchWords
java.awt.TextField fSearchWords
cTables
java.awt.Choice cTables
gAllWords
java.awt.CheckboxGroup gAllWords
gIgnoreCase
java.awt.CheckboxGroup gIgnoreCase
gNoMatchWhole
java.awt.CheckboxGroup gNoMatchWhole
lastButtonDelete
boolean lastButtonDelete
ZaurusEditor
public ZaurusEditor()
- Constructor declaration
printStatus
public static void printStatus(java.lang.String text)
printStatus prints a text into the status line below the panel.
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
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.
initGUI
private void initGUI()
getAllTables
private java.util.Vector getAllTables()
getChoosenTableIndex
private int getChoosenTableIndex()
getTableIndex
private int getTableIndex(java.lang.String tableName)
getWords
private java.lang.String[] getWords()
initButtons
private void initButtons()
resetLastButtonDelete
private void resetLastButtonDelete()
resetTableForms
private void resetTableForms()