java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
javax.swing.JApplet
org.hsqldb.util.DatabaseManagerSwing
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.event.KeyListener, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, java.awt.event.WindowListener
- public class DatabaseManagerSwing
- extends javax.swing.JApplet
- implements java.awt.event.ActionListener, java.awt.event.WindowListener, java.awt.event.KeyListener
Swing Tool for manageing a JDBC database.
Usage: java DatabaseManagerSwing [-options]
where options include:
-driver jdbc driver class
-url jdbc url
-user username used for connection
-password password for this user
-dir default directory
-script reads from script file
- Version:
- 1.7.0
| Nested classes inherited from class javax.swing.JApplet |
javax.swing.JApplet.AccessibleJApplet |
| Nested classes inherited from class java.applet.Applet |
java.applet.Applet.AccessibleApplet |
| 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.applet.Applet |
|
| Fields inherited from class java.awt.Panel |
|
| Fields inherited from class java.awt.Container |
|
| Methods inherited from class javax.swing.JApplet |
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getPreferredSize, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
| Methods inherited from class java.applet.Applet |
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop |
| 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, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, 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, 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, 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, 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, transferFocusBackward, transferFocusUpCycle |
NL
static final java.lang.String NL
iMaxRecent
static int iMaxRecent
cConn
java.sql.Connection cConn
dMeta
java.sql.DatabaseMetaData dMeta
sStatement
java.sql.Statement sStatement
mRecent
javax.swing.JMenu mRecent
sRecent
java.lang.String[] sRecent
iRecent
int iRecent
txtCommand
javax.swing.JTextArea txtCommand
txtCommandScroll
javax.swing.JScrollPane txtCommandScroll
butExecute
javax.swing.JButton butExecute
tTree
javax.swing.JTree tTree
tScrollPane
javax.swing.JScrollPane tScrollPane
treeModel
javax.swing.tree.DefaultTreeModel treeModel
rootNode
javax.swing.tree.DefaultMutableTreeNode rootNode
pResult
javax.swing.JPanel pResult
lTime
long lTime
iResult
int iResult
gResult
GridSwing gResult
gResultTable
javax.swing.JTable gResultTable
gScrollPane
javax.swing.JScrollPane gScrollPane
txtResult
javax.swing.JTextArea txtResult
txtResultScroll
javax.swing.JScrollPane txtResultScroll
nsSplitPane
javax.swing.JSplitPane nsSplitPane
ewSplitPane
javax.swing.JSplitPane ewSplitPane
bHelp
boolean bHelp
fMain
javax.swing.JFrame fMain
ifHuge
java.lang.String ifHuge
jtoolbar
javax.swing.JToolBar jtoolbar
defDriver
static java.lang.String defDriver
defURL
static java.lang.String defURL
defUser
static java.lang.String defUser
defPassword
static java.lang.String defPassword
defScript
static java.lang.String defScript
defDirectory
static java.lang.String defDirectory
DatabaseManagerSwing
public DatabaseManagerSwing()
init
public void init()
- Description copied from class:
java.applet.Applet
- This method is called when the applet is first loaded, before start().
The default implementation does nothing; override to do any one-time
initialization.
main
public static void main(java.lang.String[] arg)
connect
private void connect(java.sql.Connection c)
showUsage
private static void showUsage()
insertTestData
private void insertTestData()
main
void main()
addMenu
private void addMenu(javax.swing.JMenuBar b,
java.lang.String name,
java.lang.String[] items)
addMenuItems
private void addMenuItems(javax.swing.JMenu f,
java.lang.String[] m)
keyPressed
public void keyPressed(java.awt.event.KeyEvent k)
- Description copied from interface:
java.awt.event.KeyListener
- This method is called when a key is pressed.
- Specified by:
keyPressed in interface java.awt.event.KeyListener
keyReleased
public void keyReleased(java.awt.event.KeyEvent k)
- Description copied from interface:
java.awt.event.KeyListener
- This method is called when a key is released.
- Specified by:
keyReleased in interface java.awt.event.KeyListener
keyTyped
public void keyTyped(java.awt.event.KeyEvent k)
- Description copied from interface:
java.awt.event.KeyListener
- This method is called when a key is typed. A key is considered typed
when it and all modifiers have been pressed and released, mapping to
a single virtual key.
- Specified by:
keyTyped in interface java.awt.event.KeyListener
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent ev)
- Description copied from interface:
java.awt.event.ActionListener
- This method is invoked when an action occurs.
- Specified by:
actionPerformed in interface java.awt.event.ActionListener
showHelp
private void showHelp(java.lang.String[] help)
windowActivated
public void windowActivated(java.awt.event.WindowEvent e)
- Description copied from interface:
java.awt.event.WindowListener
- This method is called when a window is activated. Only Frames and Dialogs
can be active, and the active window always contains the component with
focus.
- Specified by:
windowActivated in interface java.awt.event.WindowListener
windowDeactivated
public void windowDeactivated(java.awt.event.WindowEvent e)
- Description copied from interface:
java.awt.event.WindowListener
- This method is called when the window is deactivated.
- Specified by:
windowDeactivated in interface java.awt.event.WindowListener
windowClosed
public void windowClosed(java.awt.event.WindowEvent e)
- Description copied from interface:
java.awt.event.WindowListener
- This method is called when the window is closed.
- Specified by:
windowClosed in interface java.awt.event.WindowListener
windowDeiconified
public void windowDeiconified(java.awt.event.WindowEvent e)
- Description copied from interface:
java.awt.event.WindowListener
- This method is called when the window is deiconified.
- Specified by:
windowDeiconified in interface java.awt.event.WindowListener
windowIconified
public void windowIconified(java.awt.event.WindowEvent e)
- Description copied from interface:
java.awt.event.WindowListener
- This method is called when the window is iconified.
- Specified by:
windowIconified in interface java.awt.event.WindowListener
windowOpened
public void windowOpened(java.awt.event.WindowEvent e)
- Description copied from interface:
java.awt.event.WindowListener
- This method is called when the window is made visible.
- Specified by:
windowOpened in interface java.awt.event.WindowListener
windowClosing
public void windowClosing(java.awt.event.WindowEvent ev)
- Description copied from interface:
java.awt.event.WindowListener
- This method is called when the user calls the system menu close
function, giving the program a chance to cancel the close.
- Specified by:
windowClosing in interface java.awt.event.WindowListener
clear
private void clear()
execute
private void execute()
updateResult
private void updateResult()
formatResultSet
private void formatResultSet(java.sql.ResultSet r)
testPerformance
private void testPerformance()
showResultInText
private void showResultInText()
- Method declaration
addToRecent
private void addToRecent(java.lang.String s)
initGUI
private void initGUI()
makeNode
private javax.swing.tree.DefaultMutableTreeNode makeNode(java.lang.Object userObject,
javax.swing.tree.MutableTreeNode parent)
refreshTree
protected void refreshTree()
createToolBar
protected javax.swing.JToolBar createToolBar()