weka.gui.explorer
Class SqlPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by weka.gui.explorer.SqlPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, weka.gui.explorer.Explorer.ExplorerPanel, weka.gui.explorer.Explorer.LogHandler

public class SqlPanel
extends JPanel
implements weka.gui.explorer.Explorer.ExplorerPanel, weka.gui.explorer.Explorer.LogHandler

A simple demonstration for extending the Explorer by another tab, in this case the SqlViewer (as an extra tab instead of only the button in the PreprocessPanel).
The Explorer.props file needs to edited to make it available and since this tab does not rely on the PreprocessPanel, one should add the "standalone" option. In other words, this would be the string to be added to the list of tabs in the Explorer.props file:
weka.gui.explorer.SqlPanel:standalone

Version:
$Revision: 4521 $
Author:
fracpete (fracpete at waikato dot ac dot nz)
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  JButton m_ButtonLoad
          the Load button
protected  weka.gui.explorer.Explorer m_Explorer
          the parent frame
protected  JLabel m_LabelQuery
          displays the current query
protected  weka.gui.Logger m_Log
          The destination for log/status messages
protected  JPanel m_PanelButtons
          the panel for the buttons
protected  PropertyChangeSupport m_Support
          Manages sending notifications to people when we change the set of working instances.
protected  weka.gui.sql.SqlViewer m_Viewer
          the SQL panel
 
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.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
SqlPanel()
          initializes the panel
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
          Adds a PropertyChangeListener who will be notified of value changes.
 weka.gui.explorer.Explorer getExplorer()
          returns the parent Explorer frame
 String getTabTitle()
          Returns the title for the tab in the Explorer
 String getTabTitleToolTip()
          Returns the tooltip for the tab in the Explorer
protected  void initGUI()
          initializes the GUI
static void main(String[] args)
          For testing only.
 void removePropertyChangeListener(PropertyChangeListener l)
          Removes a PropertyChangeListener.
 void setExplorer(weka.gui.explorer.Explorer parent)
          Sets the Explorer to use as parent frame (used for sending notifications about changes in the data)
 void setInstances(weka.core.Instances inst)
          ignored
 void setLog(weka.gui.Logger newLog)
          Sets the Logger to receive informational messages
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, 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, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, 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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_Explorer

protected weka.gui.explorer.Explorer m_Explorer
the parent frame


m_Support

protected PropertyChangeSupport m_Support
Manages sending notifications to people when we change the set of working instances.


m_Log

protected weka.gui.Logger m_Log
The destination for log/status messages


m_Viewer

protected weka.gui.sql.SqlViewer m_Viewer
the SQL panel


m_PanelButtons

protected JPanel m_PanelButtons
the panel for the buttons


m_ButtonLoad

protected JButton m_ButtonLoad
the Load button


m_LabelQuery

protected JLabel m_LabelQuery
displays the current query

Constructor Detail

SqlPanel

public SqlPanel()
initializes the panel

Method Detail

initGUI

protected void initGUI()
initializes the GUI


setExplorer

public void setExplorer(weka.gui.explorer.Explorer parent)
Sets the Explorer to use as parent frame (used for sending notifications about changes in the data)

Specified by:
setExplorer in interface weka.gui.explorer.Explorer.ExplorerPanel
Parameters:
parent - the parent frame

getExplorer

public weka.gui.explorer.Explorer getExplorer()
returns the parent Explorer frame

Specified by:
getExplorer in interface weka.gui.explorer.Explorer.ExplorerPanel
Returns:
the parent

getTabTitle

public String getTabTitle()
Returns the title for the tab in the Explorer

Specified by:
getTabTitle in interface weka.gui.explorer.Explorer.ExplorerPanel
Returns:
the title of this tab

getTabTitleToolTip

public String getTabTitleToolTip()
Returns the tooltip for the tab in the Explorer

Specified by:
getTabTitleToolTip in interface weka.gui.explorer.Explorer.ExplorerPanel
Returns:
the tooltip of this tab

setInstances

public void setInstances(weka.core.Instances inst)
ignored

Specified by:
setInstances in interface weka.gui.explorer.Explorer.ExplorerPanel
Parameters:
inst - ignored

setLog

public void setLog(weka.gui.Logger newLog)
Sets the Logger to receive informational messages

Specified by:
setLog in interface weka.gui.explorer.Explorer.LogHandler
Parameters:
newLog - the Logger that will now get info messages

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Adds a PropertyChangeListener who will be notified of value changes.

Overrides:
addPropertyChangeListener in class Container
Parameters:
l - a value of type 'PropertyChangeListener'

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Removes a PropertyChangeListener.

Overrides:
removePropertyChangeListener in class Component
Parameters:
l - a value of type 'PropertyChangeListener'

main

public static void main(String[] args)
For testing only.

Parameters:
args - commandline arguments - ignored


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.