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

Quick Search    Search Deep

com.lutris.dods.gui.importer
Class TableBrowser  view TableBrowser download TableBrowser.java

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Dialog
                  extended byjavax.swing.JDialog
                      extended bycom.lutris.dods.gui.importer.TableBrowser
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants

public final class TableBrowser
extends javax.swing.JDialog

This class is a pop-up window which imports database tables and attributes.

Version:
$Revision: 1.7.14.1 $

Nested Class Summary
(package private)  class TableBrowser.SymAction
           
(package private)  class TableBrowser.SymChange
           
 
Nested classes inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
 
Nested classes inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog
 
Nested classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
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
private  javax.swing.JPanel buttonPanel
           
private  javax.swing.JButton cancelButton
           
private  javax.swing.JPanel classPanel
           
private  DatabaseAdapter database
           
private  java.util.Vector dataCatalogs
           
private  javax.swing.JButton datasourceButton
           
private  java.lang.String dataSourceName
           
private  java.util.Vector dataTables
           
private  javax.swing.JPanel dbPanel
           
private  javax.swing.JPanel dbTypePanel
           
private static boolean DEBUG
           
private  java.lang.String defaultDriver
           
private  java.lang.String defaultURL
           
private  com.lutris.dods.gui.DataObjectApplication doa
           
private  javax.swing.JTextField driverField
           
private  com.lutris.dods.store.doa.DataObject editObject
           
private  javax.swing.JLabel extendsLabel
           
private  javax.swing.JComboBox extensionOf
           
private  javax.swing.JButton helpButton
           
private  javax.swing.JCheckBox isAbstract
           
private  javax.swing.JRadioButton isCaching
           
private  javax.swing.JRadioButton isConcreteClass
           
private  javax.swing.JRadioButton isEveryClass
           
private  javax.swing.JCheckBox isFinal
           
private  javax.swing.JRadioButton isFullCaching
           
private  javax.swing.JRadioButton isHierarchy
           
private  javax.swing.JRadioButton isLazyLoading
           
private  boolean isNotBusy
           
private  javax.swing.JTabbedPane jtp
           
private  javax.swing.JLabel label4
           
private  javax.swing.JLabel label5
           
private  javax.swing.JLabel label6
           
private  com.lutris.dods.gui.tree.PackageTreeSelectionListener listener
           
private  javax.swing.JLabel nameLabel
           
private  java.awt.Cursor normal
           
private  javax.swing.JButton okButton
           
private  javax.swing.JLabel packageLabel
           
private  javax.swing.JTextField packageName
           
private  javax.swing.JPasswordField passwordField
           
(package private) static java.util.ResourceBundle res
           
private  javax.swing.tree.DefaultTreeModel schemaModel
           
private  javax.swing.JTree schemaTree
           
private  javax.swing.JPanel scrollPanePanel
           
private  javax.swing.JTextField serverField
           
private  javax.swing.JTree structTree
           
private  javax.swing.JList tableList
           
private  javax.swing.DefaultListModel tableListModel
           
private  javax.swing.JTextField tableName
           
private  javax.swing.JLabel tableNameLabel
           
private  com.lutris.dods.store.doa.Attribute tempAttrib
           
private  java.util.Vector tempListOfAttribs
           
private  javax.swing.JTextField textName
           
private  javax.swing.tree.DefaultMutableTreeNode top
           
private  com.lutris.dods.gui.tree.PackageTree tree
           
private  javax.swing.JScrollPane treeView
           
private  javax.swing.JPanel typePanel
           
private  javax.swing.JTextField userNameField
           
private  java.awt.Cursor wait
           
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Dialog
 
Fields inherited from class java.awt.Window
 
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 javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TableBrowser(javax.swing.JTree tre, com.lutris.dods.gui.DataObjectApplication da)
          This Constructor lays out all of the input devices.
 
Method Summary
(package private)  void activateConnectionDialog()
          Brigs up a JDialog using JOptionPane containing the connectionPanel.
private  void cancelButton_actionPerformed(java.awt.event.ActionEvent event)
           
private  void checkEnabledMapping()
           
 void clearTree(java.util.Vector useTheseCatalogs)
           
 DatabaseAdapter connectDatabase(DatabaseAdapter thisDatabase)
          This method checks the state of the DatabaseAdapter and connects if needed
private  void createCatalogs(javax.swing.tree.DefaultMutableTreeNode top, java.util.Vector catalogs)
           
private  void createNodes(javax.swing.tree.DefaultMutableTreeNode top, java.util.Vector catalogs, java.lang.String[][] tables)
           
private  void createTables(int insertAtLevel, java.util.Vector theseTables)
           
private  void datasourceButton_actionPerformed(java.awt.event.ActionEvent event)
           
 void displayDatasource(DatabaseAdapter thisDatabase)
          This method takes the newly connected DatabaseAdapter and displays the results into the various windows panes.
private  void extensionOf_actionPerformed(java.awt.event.ActionEvent event)
           
 void getAttributes()
          This method pulls the attributes from the table that is currently selected
 javax.swing.JPanel getConnectionPanel()
          Creates the connectionPanel, which will contain all the fields for the connection information.
 java.lang.String getMapType(java.lang.String thisType)
          This method takes the SQL type name and returns the JavaType
 javax.swing.JPanel getTreePanel()
          This method creates and returns a fully initialized schema tree.
private  void isAbstract_stateChanged(javax.swing.event.ChangeEvent event)
           
private  void isCaching_stateChanged(javax.swing.event.ChangeEvent event)
           
private  void isConcreteClass_stateChanged(javax.swing.event.ChangeEvent event)
           
private  void isEveryClass_stateChanged(javax.swing.event.ChangeEvent event)
           
private  void isFullCaching_stateChanged(javax.swing.event.ChangeEvent event)
           
private  void isHierarchy_stateChanged(javax.swing.event.ChangeEvent event)
           
private  void isLazyLoading_stateChanged(javax.swing.event.ChangeEvent event)
           
private  boolean isTableUnique()
          Method declaration
private  boolean isUpdateValid()
           
private  void name_actionPerformed(java.awt.event.ActionEvent event)
           
private  void okButton_actionPerformed(java.awt.event.ActionEvent event)
           
 void setDataObject(com.lutris.dods.store.doa.DataObject Do)
          This method sets up the DataObject which will be edited by the DOE.
 void setStatus(java.lang.String statString)
          This method takes a string message and displays it in the status label.
 void showDBErrors(java.lang.ClassNotFoundException e)
           
 void showDBErrors(java.sql.SQLException e)
           
private  void tableName_actionPerformed(java.awt.event.ActionEvent event)
           
private  void updateDataObject()
           
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getPreferredSize, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Dialog
addNotify, dispose, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show
 
Methods inherited from class java.awt.Window
addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getGraphicsConfiguration, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, toBack, toFront
 
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, getMaximumSize, getMinimumSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, 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, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, 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, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, 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

res

static java.util.ResourceBundle res

isNotBusy

private boolean isNotBusy

defaultURL

private java.lang.String defaultURL

defaultDriver

private java.lang.String defaultDriver

tableListModel

private javax.swing.DefaultListModel tableListModel

tableList

private javax.swing.JList tableList

tempListOfAttribs

private java.util.Vector tempListOfAttribs

tempAttrib

private com.lutris.dods.store.doa.Attribute tempAttrib

top

private javax.swing.tree.DefaultMutableTreeNode top

schemaModel

private javax.swing.tree.DefaultTreeModel schemaModel

schemaTree

private javax.swing.JTree schemaTree

dataCatalogs

private java.util.Vector dataCatalogs

dataTables

private java.util.Vector dataTables

database

private DatabaseAdapter database

editObject

private com.lutris.dods.store.doa.DataObject editObject

tree

private com.lutris.dods.gui.tree.PackageTree tree

structTree

private javax.swing.JTree structTree

doa

private com.lutris.dods.gui.DataObjectApplication doa

jtp

private javax.swing.JTabbedPane jtp

listener

private com.lutris.dods.gui.tree.PackageTreeSelectionListener listener

scrollPanePanel

private javax.swing.JPanel scrollPanePanel

treeView

private javax.swing.JScrollPane treeView

packageName

private javax.swing.JTextField packageName

packageLabel

private javax.swing.JLabel packageLabel

dbPanel

private javax.swing.JPanel dbPanel

tableNameLabel

private javax.swing.JLabel tableNameLabel

tableName

private javax.swing.JTextField tableName

dbTypePanel

private javax.swing.JPanel dbTypePanel

isEveryClass

private javax.swing.JRadioButton isEveryClass

isConcreteClass

private javax.swing.JRadioButton isConcreteClass

isHierarchy

private javax.swing.JRadioButton isHierarchy

isLazyLoading

private javax.swing.JRadioButton isLazyLoading

isCaching

private javax.swing.JRadioButton isCaching

isFullCaching

private javax.swing.JRadioButton isFullCaching

buttonPanel

private javax.swing.JPanel buttonPanel

okButton

private javax.swing.JButton okButton

cancelButton

private javax.swing.JButton cancelButton

helpButton

private javax.swing.JButton helpButton

classPanel

private javax.swing.JPanel classPanel

nameLabel

private javax.swing.JLabel nameLabel

extendsLabel

private javax.swing.JLabel extendsLabel

textName

private javax.swing.JTextField textName

extensionOf

private javax.swing.JComboBox extensionOf

typePanel

private javax.swing.JPanel typePanel

isAbstract

private javax.swing.JCheckBox isAbstract

isFinal

private javax.swing.JCheckBox isFinal

driverField

private javax.swing.JTextField driverField

userNameField

private javax.swing.JTextField userNameField

serverField

private javax.swing.JTextField serverField

passwordField

private javax.swing.JPasswordField passwordField

DEBUG

private static boolean DEBUG

dataSourceName

private java.lang.String dataSourceName

label4

private javax.swing.JLabel label4

label5

private javax.swing.JLabel label5

label6

private javax.swing.JLabel label6

datasourceButton

private javax.swing.JButton datasourceButton

wait

private java.awt.Cursor wait

normal

private java.awt.Cursor normal
Constructor Detail

TableBrowser

public TableBrowser(javax.swing.JTree tre,
                    com.lutris.dods.gui.DataObjectApplication da)
This Constructor lays out all of the input devices.

Method Detail

cancelButton_actionPerformed

private void cancelButton_actionPerformed(java.awt.event.ActionEvent event)

datasourceButton_actionPerformed

private void datasourceButton_actionPerformed(java.awt.event.ActionEvent event)

okButton_actionPerformed

private void okButton_actionPerformed(java.awt.event.ActionEvent event)

isUpdateValid

private boolean isUpdateValid()

updateDataObject

private void updateDataObject()
                       throws com.lutris.dods.exceptions.DataObjectNameException,
                              com.lutris.dods.exceptions.DataObjectTypeException

isTableUnique

private boolean isTableUnique()
Method declaration


name_actionPerformed

private void name_actionPerformed(java.awt.event.ActionEvent event)

tableName_actionPerformed

private void tableName_actionPerformed(java.awt.event.ActionEvent event)

checkEnabledMapping

private void checkEnabledMapping()

setDataObject

public void setDataObject(com.lutris.dods.store.doa.DataObject Do)
This method sets up the DataObject which will be edited by the DOE. It also initializes all of the fields to what the value is in the editObject.


isEveryClass_stateChanged

private void isEveryClass_stateChanged(javax.swing.event.ChangeEvent event)

isConcreteClass_stateChanged

private void isConcreteClass_stateChanged(javax.swing.event.ChangeEvent event)

isHierarchy_stateChanged

private void isHierarchy_stateChanged(javax.swing.event.ChangeEvent event)

isLazyLoading_stateChanged

private void isLazyLoading_stateChanged(javax.swing.event.ChangeEvent event)

isCaching_stateChanged

private void isCaching_stateChanged(javax.swing.event.ChangeEvent event)

isFullCaching_stateChanged

private void isFullCaching_stateChanged(javax.swing.event.ChangeEvent event)

isAbstract_stateChanged

private void isAbstract_stateChanged(javax.swing.event.ChangeEvent event)

extensionOf_actionPerformed

private void extensionOf_actionPerformed(java.awt.event.ActionEvent event)

createNodes

private void createNodes(javax.swing.tree.DefaultMutableTreeNode top,
                         java.util.Vector catalogs,
                         java.lang.String[][] tables)

createCatalogs

private void createCatalogs(javax.swing.tree.DefaultMutableTreeNode top,
                            java.util.Vector catalogs)

createTables

private void createTables(int insertAtLevel,
                          java.util.Vector theseTables)

getTreePanel

public javax.swing.JPanel getTreePanel()
This method creates and returns a fully initialized schema tree.


getConnectionPanel

public javax.swing.JPanel getConnectionPanel()
Creates the connectionPanel, which will contain all the fields for the connection information.


activateConnectionDialog

void activateConnectionDialog()
Brigs up a JDialog using JOptionPane containing the connectionPanel. If the user clicks on the 'Connect' button the connection is reset.


connectDatabase

public DatabaseAdapter connectDatabase(DatabaseAdapter thisDatabase)
This method checks the state of the DatabaseAdapter and connects if needed


displayDatasource

public void displayDatasource(DatabaseAdapter thisDatabase)
This method takes the newly connected DatabaseAdapter and displays the results into the various windows panes.


getAttributes

public void getAttributes()
This method pulls the attributes from the table that is currently selected


clearTree

public void clearTree(java.util.Vector useTheseCatalogs)

showDBErrors

public void showDBErrors(java.sql.SQLException e)

showDBErrors

public void showDBErrors(java.lang.ClassNotFoundException e)

setStatus

public void setStatus(java.lang.String statString)
This method takes a string message and displays it in the status label.


getMapType

public java.lang.String getMapType(java.lang.String thisType)
This method takes the SQL type name and returns the JavaType