Class AbstractPlotSelectedRows
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.instances.instancestable.AbstractPlotSelectedRows
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,InstancesTablePopupMenuItem,PlotSelectedRows,Serializable,Comparable<InstancesTablePopupMenuItem>
public abstract class AbstractPlotSelectedRows extends AbstractOptionHandler implements PlotSelectedRows
Ancestor for plugins that plot rows.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringm_MenuItemTextthe menu item caption.-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractPlotSelectedRows()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Stringcheck(InstancesTablePopupMenuItemHelper.TableState state)Hook method for checks before attempting processing.intcompareTo(InstancesTablePopupMenuItem o)For sorting the menu items.voiddefineOptions()Adds options to the internal list of options.protected abstract booleandoPlotSelectedRows(InstancesTablePopupMenuItemHelper.TableState state)Plots the specified rows.protected abstract StringgetDefaultMenuItem()Returns the default name for the menu item.StringgetIconName()Returns the name of the icon.StringgetMenuItem()Returns the name for the menu item.StringgetMenuItemText()Returns the (optional) cuistom menu item text.booleanisAvailable(InstancesTablePopupMenuItemHelper.TableState state)Returns whether the menu item is available.StringmenuItemTextTipText()Returns the tip text for this property.booleanprocessSelectedRows(InstancesTablePopupMenuItemHelper.TableState state)Plots the specified rows.voidsetMenuItemText(String value)Sets the (optional) custom menu item text.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.gui.visualization.instances.instancestable.PlotSelectedRows
maxNumRows, minNumRows, plotSelectedRows
-
-
-
-
Field Detail
-
m_MenuItemText
protected String m_MenuItemText
the menu item caption.
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractOptionHandler
-
setMenuItemText
public void setMenuItemText(String value)
Sets the (optional) custom menu item text.- Parameters:
value- the text
-
getMenuItemText
public String getMenuItemText()
Returns the (optional) cuistom menu item text.- Returns:
- the text
-
menuItemTextTipText
public String menuItemTextTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
getIconName
public String getIconName()
Returns the name of the icon.- Specified by:
getIconNamein interfaceInstancesTablePopupMenuItem- Returns:
- the name, null if none available
-
isAvailable
public boolean isAvailable(InstancesTablePopupMenuItemHelper.TableState state)
Returns whether the menu item is available.- Specified by:
isAvailablein interfaceInstancesTablePopupMenuItem- Parameters:
state- the state to use- Returns:
- true if available
-
getDefaultMenuItem
protected abstract String getDefaultMenuItem()
Returns the default name for the menu item.- Returns:
- the name
-
getMenuItem
public String getMenuItem()
Returns the name for the menu item.- Specified by:
getMenuItemin interfaceInstancesTablePopupMenuItem- Returns:
- the name
-
compareTo
public int compareTo(InstancesTablePopupMenuItem o)
For sorting the menu items.- Specified by:
compareToin interfaceComparable<InstancesTablePopupMenuItem>- Parameters:
o- the other item- Returns:
- -1 if less than, 0 if equal, +1 if larger than this menu item name
-
check
protected String check(InstancesTablePopupMenuItemHelper.TableState state)
Hook method for checks before attempting processing.- Parameters:
state- the table state- Returns:
- null if passed, otherwise error message
-
doPlotSelectedRows
protected abstract boolean doPlotSelectedRows(InstancesTablePopupMenuItemHelper.TableState state)
Plots the specified rows.- Parameters:
state- the table state- Returns:
- true if successful
-
processSelectedRows
public boolean processSelectedRows(InstancesTablePopupMenuItemHelper.TableState state)
Plots the specified rows.- Parameters:
state- the table state- Returns:
- true if successful
-
-