org.jsqltool.gui.tableplugins
Class DataTablePanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--org.jsqltool.gui.tableplugins.DataTablePanel
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.swing.event.TableModelListener, TablePlugin

public class DataTablePanel
extends javax.swing.JPanel
implements javax.swing.event.TableModelListener, TablePlugin

Title: JSqlTool Project

Description: Panel used to show the table content.

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

Nested Class Summary
(package private)  class DataTablePanel.DataTablePanel_delButton_actionAdapter
           
(package private)  class DataTablePanel.DataTablePanel_findButton_actionAdapter
           
(package private)  class DataTablePanel.DataTablePanel_insertButton_actionAdapter
           
(package private)  class DataTablePanel.DataTablePanel_refreshButton_actionAdapter
           
 
Field Summary
(package private)  java.awt.BorderLayout borderLayout1
           
(package private)  java.awt.BorderLayout borderLayout2
           
(package private)  javax.swing.JPanel buttonsPanel
           
(package private)  javax.swing.JButton cancelEditButton
           
(package private)  javax.swing.ImageIcon cancelEditImage
           
(package private)  javax.swing.ImageIcon commitImage
           
(package private)  DataPanel dataPanel
           
(package private)  javax.swing.JButton delButton
           
(package private)  javax.swing.ImageIcon delImage
           
(package private)  javax.swing.ImageIcon find2Image
           
(package private)  javax.swing.JButton findButton
           
(package private)  javax.swing.ImageIcon findImage
           
(package private)  javax.swing.JButton firstButton
           
(package private)  javax.swing.ImageIcon firstImage
           
(package private)  java.awt.FlowLayout flowLayout1
           
(package private)  javax.swing.JButton insertButton
           
(package private)  javax.swing.ImageIcon insertImage
           
(package private)  javax.swing.JButton lastButton
           
(package private)  javax.swing.ImageIcon lastImage
           
(package private)  javax.swing.JButton leftButton
           
(package private)  javax.swing.ImageIcon leftImage
           
(package private)  javax.swing.JButton refreshButton
           
(package private)  javax.swing.ImageIcon refreshImage
           
(package private)  javax.swing.JButton rightButton
           
(package private)  javax.swing.ImageIcon rightImage
           
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DataTablePanel()
           
 
Method Summary
(package private)  void cancelEditButton_actionPerformed(java.awt.event.ActionEvent e)
           
(package private)  void delButton_actionPerformed(java.awt.event.ActionEvent e)
           
 boolean equals(java.lang.Object o)
           
(package private)  void findButton_actionPerformed(java.awt.event.ActionEvent e)
           
(package private)  void firstButton_actionPerformed(java.awt.event.ActionEvent e)
           
 java.lang.String getAuthor()
           
 int getEditMode()
           
 java.lang.String getName()
           
 java.lang.String getTabbedName()
           
 int getTabbedPosition()
           
 java.lang.String getTableName()
           
 java.lang.String getVersion()
           
 void initPanel(MainFrame parent, DbConnectionUtil dbConnUtil)
          Metodo chiamato in automatico dal dettaglio tabella per iniziazzare il plugin
(package private)  void insertButton_actionPerformed(java.awt.event.ActionEvent e)
           
(package private)  void lastButton_actionPerformed(java.awt.event.ActionEvent e)
           
(package private)  void leftButton_actionPerformed(java.awt.event.ActionEvent e)
           
(package private)  void refreshButton_actionPerformed(java.awt.event.ActionEvent e)
           
 void resetPanel()
           
(package private)  void rightButton_actionPerformed(java.awt.event.ActionEvent e)
           
 void setEditMode(int editMode)
           
 void setQuery(java.lang.String tableName)
           
 void setTableName(java.lang.String tableName)
          This method is called from the table detail to set entity name.
 void tableChanged(javax.swing.event.TableModelEvent e)
          This fine grain notification tells listeners the exact range of cells, rows, or columns that changed.
 void updateContent()
          Metodo chiamato dal dettaglio tabella per aggiornare il contenuto del pannello del plugin.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, 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, getRootPane, 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, paintComponent, 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, reshape, 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, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, 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, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

buttonsPanel

javax.swing.JPanel buttonsPanel

insertButton

javax.swing.JButton insertButton

delButton

javax.swing.JButton delButton

findButton

javax.swing.JButton findButton

cancelEditButton

javax.swing.JButton cancelEditButton

refreshButton

javax.swing.JButton refreshButton

firstButton

javax.swing.JButton firstButton

leftButton

javax.swing.JButton leftButton

rightButton

javax.swing.JButton rightButton

lastButton

javax.swing.JButton lastButton

insertImage

javax.swing.ImageIcon insertImage

delImage

javax.swing.ImageIcon delImage

findImage

javax.swing.ImageIcon findImage

find2Image

javax.swing.ImageIcon find2Image

refreshImage

javax.swing.ImageIcon refreshImage

cancelEditImage

javax.swing.ImageIcon cancelEditImage

commitImage

javax.swing.ImageIcon commitImage

firstImage

javax.swing.ImageIcon firstImage

leftImage

javax.swing.ImageIcon leftImage

rightImage

javax.swing.ImageIcon rightImage

lastImage

javax.swing.ImageIcon lastImage

flowLayout1

java.awt.FlowLayout flowLayout1

dataPanel

DataPanel dataPanel

borderLayout1

java.awt.BorderLayout borderLayout1

borderLayout2

java.awt.BorderLayout borderLayout2
Constructor Detail

DataTablePanel

public DataTablePanel()
Method Detail

setQuery

public void setQuery(java.lang.String tableName)

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

getTableName

public java.lang.String getTableName()
Specified by:
getTableName in interface TablePlugin
Returns:
entity name

setTableName

public final void setTableName(java.lang.String tableName)
This method is called from the table detail to set entity name.

Specified by:
setTableName in interface TablePlugin
Parameters:
tableName - table name (edventualy including catalog name) that table plugin have to show

setEditMode

public void setEditMode(int editMode)

getEditMode

public int getEditMode()

insertButton_actionPerformed

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

delButton_actionPerformed

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

refreshButton_actionPerformed

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

resetPanel

public void resetPanel()

findButton_actionPerformed

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

firstButton_actionPerformed

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

leftButton_actionPerformed

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

rightButton_actionPerformed

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

lastButton_actionPerformed

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

cancelEditButton_actionPerformed

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

getTabbedPosition

public int getTabbedPosition()
Specified by:
getTabbedPosition in interface TablePlugin
Returns:
indica la posizione del pannello all'interno del JTabbedPane associato al dettaglio tabella

getTabbedName

public java.lang.String getTabbedName()
Specified by:
getTabbedName in interface TablePlugin
Returns:
indica il nome del folder che ospita il pannello del plugin, all'interno del JTabbedPane associato al dettaglio tabella

initPanel

public void initPanel(MainFrame parent,
                      DbConnectionUtil dbConnUtil)
Metodo chiamato in automatico dal dettaglio tabella per iniziazzare il plugin

Specified by:
initPanel in interface TablePlugin

updateContent

public void updateContent()
Metodo chiamato dal dettaglio tabella per aggiornare il contenuto del pannello del plugin.

Specified by:
updateContent in interface TablePlugin

getAuthor

public java.lang.String getAuthor()
Specified by:
getAuthor in interface TablePlugin
Returns:
informazioni relative all'autore del plugin; "" oppure null non riportera' tali informazioni nella finestra di about

getVersion

public java.lang.String getVersion()
Specified by:
getVersion in interface TablePlugin
Returns:
indica la versione del plugin

getName

public java.lang.String getName()
Specified by:
getName in interface TablePlugin
Overrides:
getName in class java.awt.Component
Returns:
nome del plugin, riportato nella finestra di about

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object