Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.hsqldb.util
Class DatabaseManager  view DatabaseManager download DatabaseManager.java

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended byjava.applet.Applet
                  extended byorg.hsqldb.util.DatabaseManager
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.event.KeyListener, java.awt.MenuContainer, java.io.Serializable, java.awt.event.WindowListener
Direct Known Subclasses:
ZaurusDatabaseManager

public class DatabaseManager
extends java.applet.Applet
implements java.awt.event.ActionListener, java.awt.event.WindowListener, java.awt.event.KeyListener

AWT 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 Class Summary
 
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
 
Field Summary
(package private)  boolean bHelp
           
(package private) static boolean bMustExit
           
(package private)  java.awt.Button butClear
           
(package private)  java.awt.Button butExecute
           
(package private)  java.sql.Connection cConn
           
(package private) static java.lang.String defDirectory
           
(package private) static java.lang.String defDriver
           
(package private) static java.lang.String defPassword
           
(package private) static java.lang.String defScript
           
(package private) static java.lang.String defURL
           
(package private) static java.lang.String defUser
           
(package private)  java.sql.DatabaseMetaData dMeta
           
(package private)  java.awt.Frame fMain
           
(package private)  Grid gResult
           
(package private)  java.lang.String ifHuge
           
(package private) static int iMaxRecent
           
(package private)  java.awt.Image imgEmpty
           
(package private)  int iRecent
           
(package private)  int iResult
           
(package private)  long lTime
           
(package private)  java.awt.Menu mRecent
           
(package private) static java.lang.String NL
           
(package private)  java.awt.Panel pResult
           
(package private)  java.lang.String[] sRecent
           
(package private)  java.sql.Statement sStatement
           
(package private)  Tree tTree
           
(package private)  java.awt.TextArea txtCommand
           
(package private)  java.awt.TextArea txtResult
           
 
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
DatabaseManager()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent ev)
          Method declaration
(package private)  void addMenu(java.awt.MenuBar b, java.lang.String name, java.lang.String[] items)
          Method declaration
(package private)  void addMenuItems(java.awt.Menu f, java.lang.String[] m)
          Method declaration
private  void addToRecent(java.lang.String s)
          Method declaration
(package private)  void clear()
          Method declaration Clear SQL Statements.
(package private)  void connect(java.sql.Connection c)
          Method declaration
(package private)  void execute()
          Method declaration Adjust this method for large strings...ie multi megabtypes.
(package private)  void formatResultSet(java.sql.ResultSet r)
          Method declaration
 void init()
          Method declaration
private  void initGUI()
          Method declaration
(package private)  void insertTestData()
          Method declaration
 void keyPressed(java.awt.event.KeyEvent k)
          Method declaration
 void keyReleased(java.awt.event.KeyEvent k)
          Method declaration
 void keyTyped(java.awt.event.KeyEvent k)
          Method declaration
(package private)  void main()
          Method declaration
static void main(java.lang.String[] arg)
          Method declaration
protected  void refreshTree()
          Method declaration
(package private)  void showHelp(java.lang.String[] help)
          Method declaration
(package private)  void showResultInText()
          Method declaration
private static void showUsage()
           
(package private)  void testPerformance()
          Method declaration
(package private)  void updateResult()
          Method declaration
 void windowActivated(java.awt.event.WindowEvent e)
          Method declaration
 void windowClosed(java.awt.event.WindowEvent e)
          Method declaration
 void windowClosing(java.awt.event.WindowEvent ev)
          Method declaration
 void windowDeactivated(java.awt.event.WindowEvent e)
          Method declaration
 void windowDeiconified(java.awt.event.WindowEvent e)
          Method declaration
 void windowIconified(java.awt.event.WindowEvent e)
          Method declaration
 void windowOpened(java.awt.event.WindowEvent e)
          Method declaration
 
Methods inherited from class java.applet.Applet
destroy, getAccessibleContext, 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.Panel
addNotify
 
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, 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, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NL

static final java.lang.String NL

iMaxRecent

static final int iMaxRecent
See Also:
Constant Field Values

cConn

java.sql.Connection cConn

dMeta

java.sql.DatabaseMetaData dMeta

sStatement

java.sql.Statement sStatement

mRecent

java.awt.Menu mRecent

sRecent

java.lang.String[] sRecent

iRecent

int iRecent

txtCommand

java.awt.TextArea txtCommand

butExecute

java.awt.Button butExecute

butClear

java.awt.Button butClear

tTree

Tree tTree

pResult

java.awt.Panel pResult

lTime

long lTime

iResult

int iResult

gResult

Grid gResult

txtResult

java.awt.TextArea txtResult

bHelp

boolean bHelp

fMain

java.awt.Frame fMain

imgEmpty

java.awt.Image imgEmpty

bMustExit

static boolean bMustExit

ifHuge

java.lang.String ifHuge

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
Constructor Detail

DatabaseManager

public DatabaseManager()
Method Detail

connect

void connect(java.sql.Connection c)
Method declaration


init

public void init()
Method declaration


main

public static void main(java.lang.String[] arg)
Method declaration


showUsage

private static void showUsage()

insertTestData

void insertTestData()
Method declaration


main

void main()
Method declaration


addMenu

void addMenu(java.awt.MenuBar b,
             java.lang.String name,
             java.lang.String[] items)
Method declaration


addMenuItems

void addMenuItems(java.awt.Menu f,
                  java.lang.String[] m)
Method declaration


keyPressed

public void keyPressed(java.awt.event.KeyEvent k)
Method declaration

Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent k)
Method declaration

Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent k)
Method declaration

Specified by:
keyTyped in interface java.awt.event.KeyListener

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ev)
Method declaration

Specified by:
actionPerformed in interface java.awt.event.ActionListener

showHelp

void showHelp(java.lang.String[] help)
Method declaration


windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Method declaration

Specified by:
windowActivated in interface java.awt.event.WindowListener

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
Method declaration

Specified by:
windowDeactivated in interface java.awt.event.WindowListener

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Method declaration

Specified by:
windowClosed in interface java.awt.event.WindowListener

windowClosing

public void windowClosing(java.awt.event.WindowEvent ev)
Method declaration

Specified by:
windowClosing in interface java.awt.event.WindowListener

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
Method declaration

Specified by:
windowDeiconified in interface java.awt.event.WindowListener

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
Method declaration

Specified by:
windowIconified in interface java.awt.event.WindowListener

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
Method declaration

Specified by:
windowOpened in interface java.awt.event.WindowListener

clear

void clear()
Method declaration Clear SQL Statements.


execute

void execute()
Method declaration Adjust this method for large strings...ie multi megabtypes.


updateResult

void updateResult()
Method declaration


formatResultSet

void formatResultSet(java.sql.ResultSet r)
Method declaration


testPerformance

void testPerformance()
Method declaration


showResultInText

void showResultInText()
Method declaration


addToRecent

private void addToRecent(java.lang.String s)
Method declaration


initGUI

private void initGUI()
Method declaration


refreshTree

protected void refreshTree()
Method declaration