com.linxpda.dbaware.awt
Class DBRootPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--com.linxpda.dbaware.awt.DBContainer
                          |
                          +--com.linxpda.dbaware.awt.DBRootPanel
All Implemented Interfaces:
javax.accessibility.Accessible, DBAware, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class DBRootPanel
extends DBContainer

Top-most parent for all DBAware components. All DBAware components in an application should be a child to a single instance of DBRootPanel.

See Also:
Serialized Form

Inner classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
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
DBRootPanel()
          Create a new DBRootPanel with the default LayoutManager, FlowLayout.
DBRootPanel(java.awt.LayoutManager layout)
          Create a new DBRootPanel with the specified LayoutManager.
 
Method Summary
 void addEntry()
          Adds the current Entry the database as a new Entry.
 void close()
          Closes the PJODe database.
 void connect()
          Connects the DBRootPanel to the PJODe database.
 void deleteEntry()
          Deletes the currentEntry from the database.
 int getCurrentIndex()
          Returns the index of the currently displayed entry.
 java.lang.String getFileName()
          Return the filename of the PJODe database administered by this DBRootPanel.
 int getObjectCount()
          Returns the total number of entries in the current ResultSet held by this DBRootPane.
 java.lang.String getRemoteURL()
          Return the remote url of the PJODeRMIServer that will be supplying access to the PJODe database.
 boolean isRemote()
          Returns true if this DBRootPanel stores data to a remote PJODeRMIServer or false if it reads/writes to a local file.
 void reset()
          Clears the screen by clearing all text components and checkboxes and returning choice, list and radio components to their default values.
 void search()
          Uses the current data as a search Entry.
 void setFileName(java.lang.String filename)
          Set the PJODe database from which this DBRootPanel will read and write it's data.
 void setRemoteURL(java.lang.String url)
          Set the remote url of the PJODeRMIServer that povides access to the PJODe database.
 void showFirstEntry()
          Shows the first Entry in the current ResultSet.
 void showLastEntry()
          Shows the last Entry in the current ResultSet.
 void showNextEntry()
          Shows the next available Entry in the current ResultSet if available.
 void showPreviousEntry()
          Shows the previous Entry in the currentResultSet if available.
 void updateEntry()
          Updates the current Entry with the currently displayed data.
 
Methods inherited from class com.linxpda.dbaware.awt.DBContainer
getColumnLabel, getValue, setColumnLabel, setValue
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DBRootPanel

public DBRootPanel()
Create a new DBRootPanel with the default LayoutManager, FlowLayout.

DBRootPanel

public DBRootPanel(java.awt.LayoutManager layout)
Create a new DBRootPanel with the specified LayoutManager.
Method Detail

getFileName

public java.lang.String getFileName()
Return the filename of the PJODe database administered by this DBRootPanel.

setFileName

public void setFileName(java.lang.String filename)
Set the PJODe database from which this DBRootPanel will read and write it's data.

getRemoteURL

public java.lang.String getRemoteURL()
Return the remote url of the PJODeRMIServer that will be supplying access to the PJODe database. Used only with PJODe C/S.

setRemoteURL

public void setRemoteURL(java.lang.String url)
Set the remote url of the PJODeRMIServer that povides access to the PJODe database. Used only with PJODe C/S

connect

public void connect()
             throws com.linxpda.PJODe.DBException,
                    java.rmi.RemoteException,
                    java.io.IOException,
                    java.lang.ClassNotFoundException,
                    java.rmi.NotBoundException
Connects the DBRootPanel to the PJODe database. If a remote url has been set (through setRemoteURL then a remote connection is made automatically. The current Entry list is set to all database objects.

showNextEntry

public void showNextEntry()
Shows the next available Entry in the current ResultSet if available.

showPreviousEntry

public void showPreviousEntry()
Shows the previous Entry in the currentResultSet if available.

showFirstEntry

public void showFirstEntry()
Shows the first Entry in the current ResultSet.

showLastEntry

public void showLastEntry()
Shows the last Entry in the current ResultSet.

reset

public void reset()
Clears the screen by clearing all text components and checkboxes and returning choice, list and radio components to their default values.
Overrides:
reset in class DBContainer

deleteEntry

public void deleteEntry()
                 throws java.lang.ClassNotFoundException,
                        com.linxpda.PJODe.DBException,
                        java.io.IOException
Deletes the currentEntry from the database.
Throws:
java.lang.ClassNotFoundException - if the class file for the Entry cannot be found.
com.linxpda.PJODe.DBException - if there is a database access error or the Entry cannot be found for deletion.
java.io.IOException - if there is a general I/O error.

addEntry

public void addEntry()
              throws java.lang.ClassNotFoundException,
                     java.io.IOException,
                     com.linxpda.PJODe.DBException
Adds the current Entry the database as a new Entry.
Throws:
java.lang.ClassNotFoundException - if the class file for the Entry cannot be found.
com.linxpda.PJODe.DBException - if there is a database access error or the Entry already exists..
java.io.IOException - if there is a general I/O error.

updateEntry

public void updateEntry()
                 throws java.lang.ClassNotFoundException,
                        java.io.IOException,
                        com.linxpda.PJODe.DBException
Updates the current Entry with the currently displayed data.
Throws:
java.lang.ClassNotFoundException - if the class file for the Entry cannot be found.
com.linxpda.PJODe.DBException - if there is a database access error or the Entry cannot be found for update.
java.io.IOException - if there is a general I/O error.

search

public void search()
            throws java.lang.ClassNotFoundException,
                   java.io.IOException,
                   com.linxpda.PJODe.DBException
Uses the current data as a search Entry.
Throws:
java.lang.ClassNotFoundException - if the class file for the Entry cannot be found.
com.linxpda.PJODe.DBException - if there is a database access error.
java.io.IOException - if there is a general I/O error.

close

public void close()
           throws java.io.IOException,
                  com.linxpda.PJODe.DBException
Closes the PJODe database.
Throws:
java.io.IOException - on a general I/O Error.
com.linxpda.PJODe.DBException - on a database access error.

isRemote

public boolean isRemote()
Returns true if this DBRootPanel stores data to a remote PJODeRMIServer or false if it reads/writes to a local file.

getCurrentIndex

public int getCurrentIndex()
Returns the index of the currently displayed entry.

getObjectCount

public int getObjectCount()
Returns the total number of entries in the current ResultSet held by this DBRootPane.