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 String
m_MenuItemText
the 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 String
check(InstancesTablePopupMenuItemHelper.TableState state)
Hook method for checks before attempting processing.int
compareTo(InstancesTablePopupMenuItem o)
For sorting the menu items.void
defineOptions()
Adds options to the internal list of options.protected abstract boolean
doProcessSelectedRows(InstancesTablePopupMenuItemHelper.TableState state)
Processes the specified rows.protected abstract String
getDefaultMenuItem()
Returns the default name for the menu item.String
getIconName()
Returns the name of the icon.String
getMenuItem()
Returns the name for the menu item.String
getMenuItemText()
Returns the (optional) cuistom menu item text.boolean
isAvailable(InstancesTablePopupMenuItemHelper.TableState state)
Returns whether the menu item is available.String
menuItemTextTipText()
Returns the tip text for this property.boolean
processSelectedRows(InstancesTablePopupMenuItemHelper.TableState state)
Processes the specified rows.void
setMenuItemText(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:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in 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:
getIconName
in interfaceInstancesTablePopupMenuItem
- Returns:
- the name, null if none available
-
isAvailable
public boolean isAvailable(InstancesTablePopupMenuItemHelper.TableState state)
Returns whether the menu item is available.- Specified by:
isAvailable
in 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:
getMenuItem
in interfaceInstancesTablePopupMenuItem
- Returns:
- the name
-
compareTo
public int compareTo(InstancesTablePopupMenuItem o)
For sorting the menu items.- Specified by:
compareTo
in 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:
processSelectedRows
in interfaceProcessSelectedRows
- Parameters:
state
- the table state- Returns:
- true if successful
-
-