org.jsqltool.gui
Class SQLFrame

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JInternalFrame
                          |
                          +--org.jsqltool.gui.SQLFrame
All Implemented Interfaces:
javax.accessibility.Accessible, DbConnWindow, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.event.TableModelListener, javax.swing.WindowConstants

public class SQLFrame
extends javax.swing.JInternalFrame
implements DbConnWindow, javax.swing.event.TableModelListener

Title: JSqlTool Project

Description: Window used to write and execute a SQL script.

Copyright: Copyright (C) 2006 Mauro Carniel

This file is part of JSqlTool project. This library is free software; you can redistribute it and/or modify it under the terms of the (LGPL) Lesser General Public License as published by the Free Software Foundation; GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author may be contacted at: maurocarniel@tin.it

See Also:
Serialized Form

Field Summary
(package private)  java.awt.BorderLayout borderLayout1
           
(package private)  java.awt.BorderLayout borderLayout2
           
(package private)  javax.swing.JPanel buttonsPanel
           
(package private)  javax.swing.JWindow colMenu
           
(package private)  javax.swing.JList cols
           
(package private)  javax.swing.JScrollPane colScrollPane
           
(package private)  javax.swing.DefaultListModel colsModel
           
(package private)  DataPanel dataPanel
           
(package private)  SQLTextArea editor
           
(package private)  javax.swing.JButton executeButton
           
(package private)  javax.swing.JButton executeHistoryButton
           
(package private)  javax.swing.ImageIcon executeHistoryImage
           
(package private)  javax.swing.ImageIcon executeImage
           
(package private)  javax.swing.JButton explainPlanButton
           
(package private)  javax.swing.ImageIcon explainPlanImage
           
(package private)  java.awt.FlowLayout flowLayout1
           
(package private)  javax.swing.JButton importSQLButton
           
(package private)  javax.swing.ImageIcon importSQLImage
           
(package private)  javax.swing.JPanel mainPanel
           
(package private)  javax.swing.JSplitPane splitPane
           
(package private)  javax.swing.JPanel statePanel
           
(package private)  javax.swing.JLabel statusLabel
           
(package private)  javax.swing.JWindow tableMenu
           
(package private)  javax.swing.JList tables
           
(package private)  javax.swing.JScrollPane tableScrollPane
           
(package private)  javax.swing.DefaultListModel tablesModel
           
 
Fields inherited from class javax.swing.JInternalFrame
closable, CONTENT_PANE_PROPERTY, desktopIcon, FRAME_ICON_PROPERTY, frameIcon, GLASS_PANE_PROPERTY, iconable, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, isClosed, isIcon, isMaximum, isSelected, LAYERED_PANE_PROPERTY, maximizable, MENU_BAR_PROPERTY, resizable, ROOT_PANE_PROPERTY, rootPane, rootPaneCheckingEnabled, title, TITLE_PROPERTY
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_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
SQLFrame()
           
SQLFrame(javax.swing.JFrame parent, DbConnectionUtil dbConnUtil)
           
 
Method Summary
(package private)  void editor_focusLost(java.awt.event.FocusEvent e)
           
(package private)  void editor_keyPressed(java.awt.event.KeyEvent e)
           
(package private)  void editor_keyTyped(java.awt.event.KeyEvent e)
           
(package private)  void editor_mouseClicked(java.awt.event.MouseEvent e)
           
(package private)  void executeButton_actionPerformed(java.awt.event.ActionEvent e)
           
(package private)  void executeHistoryButton_actionPerformed(java.awt.event.ActionEvent e)
           
 void executeSQLWithValues(java.lang.String newsql, java.util.Vector values)
          Execute the sql with parameters.
(package private)  void explainPlanButton_actionPerformed(java.awt.event.ActionEvent e)
           
 DbConnectionUtil getDbConnectionUtil()
           
 void importSQLButton_actionPerformed(java.awt.event.ActionEvent e)
          Import a SQL Script from file and execute it in batch mode.
 void setEditorContent(java.lang.String content)
           
 void tableChanged(javax.swing.event.TableModelEvent e)
          This fine grain notification tells listeners the exact range of cells, rows, or columns that changed.
 
Methods inherited from class javax.swing.JInternalFrame
addImpl, addInternalFrameListener, createRootPane, dispose, doDefaultCloseAction, fireInternalFrameEvent, getAccessibleContext, getContentPane, getDefaultCloseOperation, getDesktopIcon, getDesktopPane, getFocusCycleRootAncestor, getFocusOwner, getFrameIcon, getGlassPane, getInternalFrameListeners, getJMenuBar, getLayer, getLayeredPane, getMenuBar, getMostRecentFocusOwner, getNormalBounds, getRootPane, getTitle, getUI, getUIClassID, getWarningString, hide, isClosable, isClosed, isFocusCycleRoot, isIcon, isIconifiable, isMaximizable, isMaximum, isResizable, isRootPaneCheckingEnabled, isSelected, moveToBack, moveToFront, pack, paintComponent, paramString, remove, removeInternalFrameListener, reshape, restoreSubcomponentFocus, setClosable, setClosed, setContentPane, setDefaultCloseOperation, setDesktopIcon, setFocusCycleRoot, setFrameIcon, setGlassPane, setIcon, setIconifiable, setJMenuBar, setLayer, setLayer, setLayeredPane, setLayout, setMaximizable, setMaximum, setMenuBar, setNormalBounds, setResizable, setRootPane, setRootPaneCheckingEnabled, setSelected, setTitle, setUI, show, toBack, toFront, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, transferFocusBackward, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mainPanel

javax.swing.JPanel mainPanel

buttonsPanel

javax.swing.JPanel buttonsPanel

borderLayout1

java.awt.BorderLayout borderLayout1

splitPane

javax.swing.JSplitPane splitPane

statePanel

javax.swing.JPanel statePanel

editor

SQLTextArea editor

dataPanel

DataPanel dataPanel

executeButton

javax.swing.JButton executeButton

executeHistoryButton

javax.swing.JButton executeHistoryButton

explainPlanButton

javax.swing.JButton explainPlanButton

importSQLButton

javax.swing.JButton importSQLButton

executeImage

javax.swing.ImageIcon executeImage

executeHistoryImage

javax.swing.ImageIcon executeHistoryImage

explainPlanImage

javax.swing.ImageIcon explainPlanImage

importSQLImage

javax.swing.ImageIcon importSQLImage

flowLayout1

java.awt.FlowLayout flowLayout1

statusLabel

javax.swing.JLabel statusLabel

borderLayout2

java.awt.BorderLayout borderLayout2

tableMenu

javax.swing.JWindow tableMenu

colMenu

javax.swing.JWindow colMenu

tables

javax.swing.JList tables

cols

javax.swing.JList cols

tableScrollPane

javax.swing.JScrollPane tableScrollPane

colScrollPane

javax.swing.JScrollPane colScrollPane

tablesModel

javax.swing.DefaultListModel tablesModel

colsModel

javax.swing.DefaultListModel colsModel
Constructor Detail

SQLFrame

public SQLFrame(javax.swing.JFrame parent,
                DbConnectionUtil dbConnUtil)

SQLFrame

public SQLFrame()
Method Detail

getDbConnectionUtil

public DbConnectionUtil getDbConnectionUtil()
Specified by:
getDbConnectionUtil in interface DbConnWindow

tableChanged

public void tableChanged(javax.swing.event.TableModelEvent e)
This fine grain notification tells listeners the exact range of cells, rows, or columns that changed.

Specified by:
tableChanged in interface javax.swing.event.TableModelListener

executeButton_actionPerformed

void executeButton_actionPerformed(java.awt.event.ActionEvent e)

executeHistoryButton_actionPerformed

void executeHistoryButton_actionPerformed(java.awt.event.ActionEvent e)

executeSQLWithValues

public final void executeSQLWithValues(java.lang.String newsql,
                                       java.util.Vector values)
Execute the sql with parameters.


editor_keyPressed

void editor_keyPressed(java.awt.event.KeyEvent e)

setEditorContent

public final void setEditorContent(java.lang.String content)

explainPlanButton_actionPerformed

void explainPlanButton_actionPerformed(java.awt.event.ActionEvent e)

editor_mouseClicked

void editor_mouseClicked(java.awt.event.MouseEvent e)

editor_focusLost

void editor_focusLost(java.awt.event.FocusEvent e)

editor_keyTyped

void editor_keyTyped(java.awt.event.KeyEvent e)

importSQLButton_actionPerformed

public void importSQLButton_actionPerformed(java.awt.event.ActionEvent e)
Import a SQL Script from file and execute it in batch mode.