weka.gui
Class GenericObjectEditor.GOEPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended byweka.gui.GenericObjectEditor.GOEPanel
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Enclosing class:
GenericObjectEditor

public class GenericObjectEditor.GOEPanel
extends javax.swing.JPanel

Handles the GUI side of editing values.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
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
protected  javax.swing.JButton m_cancelBut
          cancel button
protected  PropertySheetPanel m_ChildPropertySheet
          The component that performs classifier customization
protected  javax.swing.JLabel m_ClassNameLabel
          The name of the current class
protected  javax.swing.JFileChooser m_FileChooser
          The filechooser for opening and saving object files
protected  javax.swing.JButton m_okBut
          ok button
protected  javax.swing.JButton m_OpenBut
          Open object from disk
protected  javax.swing.JButton m_SaveBut
          Save object to disk
 
Fields inherited from class javax.swing.JPanel
 
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
GenericObjectEditor.GOEPanel()
          Creates the GUI editor component
 
Method Summary
 void addCancelListener(java.awt.event.ActionListener a)
          This is used to hook an action listener to the cancel button
 void addOkListener(java.awt.event.ActionListener a)
          This is used to hook an action listener to the ok button
protected  java.lang.Object copyObject(java.lang.Object source)
          Makes a copy of an object using serialization
protected  void createFileChooser()
          Creates the file chooser the user will use to save/load files with.
protected  java.lang.Object openObject()
          Opens an object from a file selected by the user.
 void removeCancelListener(java.awt.event.ActionListener a)
          This is used to remove an action listener from the cancel button
 void removeOkListener(java.awt.event.ActionListener a)
          This is used to remove an action listener from the ok button
protected  void saveObject(java.lang.Object object)
          Opens an object from a file selected by the user.
protected  void setCancelButton(boolean flag)
          Enables/disables the cancel button.
 void setOkButtonText(java.lang.String newLabel)
          Allows customization of the action label on the dialog.
 void updateChildPropertySheet()
          Updates the child property sheet, and creates if needed
 
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, getName, 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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_ChildPropertySheet

protected PropertySheetPanel m_ChildPropertySheet
The component that performs classifier customization


m_ClassNameLabel

protected javax.swing.JLabel m_ClassNameLabel
The name of the current class


m_OpenBut

protected javax.swing.JButton m_OpenBut
Open object from disk


m_SaveBut

protected javax.swing.JButton m_SaveBut
Save object to disk


m_okBut

protected javax.swing.JButton m_okBut
ok button


m_cancelBut

protected javax.swing.JButton m_cancelBut
cancel button


m_FileChooser

protected javax.swing.JFileChooser m_FileChooser
The filechooser for opening and saving object files

Constructor Detail

GenericObjectEditor.GOEPanel

public GenericObjectEditor.GOEPanel()
Creates the GUI editor component

Method Detail

setCancelButton

protected void setCancelButton(boolean flag)
Enables/disables the cancel button.

Parameters:
flag - true to enable cancel button, false to disable it

openObject

protected java.lang.Object openObject()
Opens an object from a file selected by the user.

Returns:
the loaded object, or null if the operation was cancelled

saveObject

protected void saveObject(java.lang.Object object)
Opens an object from a file selected by the user.

Returns:
the loaded object, or null if the operation was cancelled

createFileChooser

protected void createFileChooser()
Creates the file chooser the user will use to save/load files with.


copyObject

protected java.lang.Object copyObject(java.lang.Object source)
Makes a copy of an object using serialization

Parameters:
source - the object to copy
Returns:
a copy of the source object

setOkButtonText

public void setOkButtonText(java.lang.String newLabel)
Allows customization of the action label on the dialog.

Parameters:
newLabel - the new string for the ok button

addOkListener

public void addOkListener(java.awt.event.ActionListener a)
This is used to hook an action listener to the ok button

Parameters:
a - The action listener.

addCancelListener

public void addCancelListener(java.awt.event.ActionListener a)
This is used to hook an action listener to the cancel button

Parameters:
a - The action listener.

removeOkListener

public void removeOkListener(java.awt.event.ActionListener a)
This is used to remove an action listener from the ok button

Parameters:
a - The action listener

removeCancelListener

public void removeCancelListener(java.awt.event.ActionListener a)
This is used to remove an action listener from the cancel button

Parameters:
a - The action listener

updateChildPropertySheet

public void updateChildPropertySheet()
Updates the child property sheet, and creates if needed