Class AbstractProcessSelectedRows
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.visualization.instances.instancestable.AbstractProcessSelectedRows
-
- All Implemented Interfaces:
adams.core.Destroyable,adams.core.GlobalInfoSupporter,adams.core.logging.LoggingLevelHandler,adams.core.logging.LoggingSupporter,adams.core.option.OptionHandler,adams.core.SizeOfHandler,InstancesTablePopupMenuItem,ProcessSelectedRows,Serializable,Comparable<InstancesTablePopupMenuItem>
- Direct Known Subclasses:
ArrayStatistic,ChangeInstanceWeights,InvestigatorAsNewDataset
public abstract class AbstractProcessSelectedRows extends adams.core.option.AbstractOptionHandler implements ProcessSelectedRows
Ancestor for plugins that process a row.- 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.
-
Constructor Summary
Constructors Constructor Description AbstractProcessSelectedRows()
-
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 booleandoProcessSelectedRows(InstancesTablePopupMenuItemHelper.TableState state)Processes 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)Processes 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.gui.visualization.instances.instancestable.ProcessSelectedRows
maxNumRows, minNumRows
-
-
-
-
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 interfaceadams.core.option.OptionHandler- Overrides:
defineOptionsin classadams.core.option.AbstractOptionHandler
-
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
-
doProcessSelectedRows
protected abstract boolean doProcessSelectedRows(InstancesTablePopupMenuItemHelper.TableState state)
Processes the specified rows.- Parameters:
state- the table state- Returns:
- true if successful
-
processSelectedRows
public boolean processSelectedRows(InstancesTablePopupMenuItemHelper.TableState state)
Processes the specified rows.- Specified by:
processSelectedRowsin interfaceProcessSelectedRows- Parameters:
state- the table state- Returns:
- true if successful
-
-