Package adams.gui.wizard
Class WekaPropertySheetPanelPage
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- adams.gui.core.BasePanel
-
- adams.gui.wizard.AbstractWizardPage
-
- adams.gui.wizard.WekaPropertySheetPanelPage
-
- All Implemented Interfaces:
adams.core.logging.LoggingSupporter,ImageObserver,MenuContainer,Serializable,Accessible
public class WekaPropertySheetPanelPage extends adams.gui.wizard.AbstractWizardPageWizard page that use aPropertySheetPanelfor displaying the properties of an object.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWekaPropertySheetPanelPage.CustomPropertySheetPanelAllowing better access to property sheet panel.-
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 adams.gui.core.BaseButtonm_ButtonLoadthe load props button.protected adams.gui.core.BaseButtonm_ButtonSavethe save props button.protected adams.gui.chooser.BaseFileChooserm_FileChooserthe filechooser for loading/saving properties.protected JPanelm_PanelButtonsthe panel for the buttons.protected WekaPropertySheetPanelPage.CustomPropertySheetPanelm_PanelSheetthe parameter panel for displaying the parameters.protected Objectm_Targetthe current target.static StringPROPERTY_CMDLINEthe identifier for the commandline of the object.-
Fields inherited from class adams.gui.wizard.AbstractWizardPage
m_Owner, m_PageCheck, m_PageName, m_ProceedAction, m_ScrollPaneDescription, m_TextDescription, m_Valid
-
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 WekaPropertySheetPanelPage()Default constructor.WekaPropertySheetPanelPage(String pageName)Initializes the page with the given page name.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfinishInit()finishes the initialization.protected adams.gui.chooser.BaseFileChoosergetFileChooser()Returns the file chooser to use for loading/saving of props files.weka.gui.PropertySheetPanelgetParameterPanel()Returns the underlying property sheet panel.adams.core.PropertiesgetProperties()Returns the content of the page (ie parameters) as properties.ObjectgetTarget()Returns the current object.protected voidinitGUI()Initializes the widets.booleanisButtonPanelVisible()Returns the visibility state of the buttons panel (load/save).protected voidloadProperties()Loads properties from a file, prompts the user to select props file.static voidmain(String[] args)For testing only.protected voidsaveProperties()Saves properties to a file, prompts the user to select props file.voidsetButtonPanelVisible(boolean value)Sets the visibility state of the buttons panel (load/save).voidsetProperties(adams.core.Properties value)Sets the properties to base the properties on.voidsetTarget(Object value)Sets the object to display the properties for.-
Methods inherited from class adams.gui.wizard.AbstractWizardPage
canProceed, getDescription, getDescriptionHeight, getLogger, getOwner, getPageCheck, getPageName, getProceedAction, initialize, invalidate, isLoggingEnabled, isValid, setDescription, setDescription, setDescriptionHeight, setOwner, setPageCheck, setPageName, setProceedAction, update, updateButtons, validate
-
Methods inherited from class adams.gui.core.BasePanel
afterHide, afterShow, beforeHide, beforeShow, closeParent, getParentChild, getParentDialog, getParentFrame, getParentInternalFrame, getParentTitle, initFileChooser, printErrorMessage, printException, saveComponent, setEnabledCascade, setEnabledCascade, setParentTitle, setVisible
-
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, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, 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, 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, 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, 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
-
PROPERTY_CMDLINE
public static final String PROPERTY_CMDLINE
the identifier for the commandline of the object.- See Also:
- Constant Field Values
-
m_PanelSheet
protected WekaPropertySheetPanelPage.CustomPropertySheetPanel m_PanelSheet
the parameter panel for displaying the parameters.
-
m_Target
protected transient Object m_Target
the current target.
-
m_PanelButtons
protected JPanel m_PanelButtons
the panel for the buttons.
-
m_ButtonLoad
protected adams.gui.core.BaseButton m_ButtonLoad
the load props button.
-
m_ButtonSave
protected adams.gui.core.BaseButton m_ButtonSave
the save props button.
-
m_FileChooser
protected adams.gui.chooser.BaseFileChooser m_FileChooser
the filechooser for loading/saving properties.
-
-
Constructor Detail
-
WekaPropertySheetPanelPage
public WekaPropertySheetPanelPage()
Default constructor.
-
WekaPropertySheetPanelPage
public WekaPropertySheetPanelPage(String pageName)
Initializes the page with the given page name.- Parameters:
pageName- the page name to use
-
-
Method Detail
-
initGUI
protected void initGUI()
Initializes the widets.- Overrides:
initGUIin classadams.gui.wizard.AbstractWizardPage
-
finishInit
protected void finishInit()
finishes the initialization.- Overrides:
finishInitin classadams.gui.core.BasePanel
-
getParameterPanel
public weka.gui.PropertySheetPanel getParameterPanel()
Returns the underlying property sheet panel.- Returns:
- the property sheet panel
-
setTarget
public void setTarget(Object value)
Sets the object to display the properties for.- Parameters:
value- the object
-
getTarget
public Object getTarget()
Returns the current object.- Returns:
- the object
-
setProperties
public void setProperties(adams.core.Properties value)
Sets the properties to base the properties on.- Specified by:
setPropertiesin classadams.gui.wizard.AbstractWizardPage- Parameters:
value- the properties to use
-
getProperties
public adams.core.Properties getProperties()
Returns the content of the page (ie parameters) as properties.- Specified by:
getPropertiesin classadams.gui.wizard.AbstractWizardPage- Returns:
- the parameters as properties
-
getFileChooser
protected adams.gui.chooser.BaseFileChooser getFileChooser()
Returns the file chooser to use for loading/saving of props files.- Overrides:
getFileChooserin classadams.gui.wizard.AbstractWizardPage- Returns:
- the file chooser
-
loadProperties
protected void loadProperties()
Loads properties from a file, prompts the user to select props file.- Overrides:
loadPropertiesin classadams.gui.wizard.AbstractWizardPage
-
saveProperties
protected void saveProperties()
Saves properties to a file, prompts the user to select props file.- Overrides:
savePropertiesin classadams.gui.wizard.AbstractWizardPage
-
setButtonPanelVisible
public void setButtonPanelVisible(boolean value)
Sets the visibility state of the buttons panel (load/save).- Overrides:
setButtonPanelVisiblein classadams.gui.wizard.AbstractWizardPage- Parameters:
value- true if to show buttons
-
isButtonPanelVisible
public boolean isButtonPanelVisible()
Returns the visibility state of the buttons panel (load/save).- Overrides:
isButtonPanelVisiblein classadams.gui.wizard.AbstractWizardPage- Returns:
- true if buttons displayed
-
main
public static void main(String[] args)
For testing only.- Parameters:
args- ignored
-
-