Package weka.gui.explorer
Class SqlPanel
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- 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).
TheExplorer.propsfile 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 theExplorer.propsfile:
weka.gui.explorer.SqlPanel:standalone- Version:
- $Revision$
- 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
Fields Modifier and Type Field Description protected BaseButtonm_ButtonLoadthe Load buttonprotected weka.gui.explorer.Explorerm_Explorerthe parent frameprotected JLabelm_LabelQuerydisplays the current queryprotected weka.gui.Loggerm_LogThe destination for log/status messagesprotected JPanelm_PanelButtonsthe panel for the buttonsprotected PropertyChangeSupportm_SupportManages sending notifications to people when we change the set of working instances.protected weka.gui.sql.SqlViewerm_Viewerthe SQL panel-
Fields inherited from class javax.swing.JComponent
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
accessibleContext, 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
Constructors Constructor Description SqlPanel()initializes the panel
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPropertyChangeListener(PropertyChangeListener l)Adds a PropertyChangeListener who will be notified of value changes.weka.gui.explorer.ExplorergetExplorer()returns the parent Explorer frameStringgetTabTitle()Returns the title for the tab in the ExplorerStringgetTabTitleToolTip()Returns the tooltip for the tab in the Explorerprotected voidinitGUI()initializes the GUIstatic voidmain(String[] args)For testing only.voidremovePropertyChangeListener(PropertyChangeListener l)Removes a PropertyChangeListener.voidsetExplorer(weka.gui.explorer.Explorer parent)Sets the Explorer to use as parent frame (used for sending notifications about changes in the data)voidsetInstances(weka.core.Instances inst)ignoredvoidsetLog(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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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, 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
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 BaseButton m_ButtonLoad
the Load button
-
m_LabelQuery
protected JLabel m_LabelQuery
displays the current query
-
-
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:
setExplorerin interfaceweka.gui.explorer.Explorer.ExplorerPanel- Parameters:
parent- the parent frame
-
getExplorer
public weka.gui.explorer.Explorer getExplorer()
returns the parent Explorer frame- Specified by:
getExplorerin interfaceweka.gui.explorer.Explorer.ExplorerPanel- Returns:
- the parent
-
getTabTitle
public String getTabTitle()
Returns the title for the tab in the Explorer- Specified by:
getTabTitlein interfaceweka.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:
getTabTitleToolTipin interfaceweka.gui.explorer.Explorer.ExplorerPanel- Returns:
- the tooltip of this tab
-
setInstances
public void setInstances(weka.core.Instances inst)
ignored- Specified by:
setInstancesin interfaceweka.gui.explorer.Explorer.ExplorerPanel- Parameters:
inst- ignored
-
setLog
public void setLog(weka.gui.Logger newLog)
Sets the Logger to receive informational messages- Specified by:
setLogin interfaceweka.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:
addPropertyChangeListenerin classContainer- Parameters:
l- a value of type 'PropertyChangeListener'
-
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener l)
Removes a PropertyChangeListener.- Overrides:
removePropertyChangeListenerin classComponent- Parameters:
l- a value of type 'PropertyChangeListener'
-
main
public static void main(String[] args)
For testing only.- Parameters:
args- commandline arguments - ignored
-
-