Package adams.gui.core.spreadsheettable
Class AbstractProcessSelectedRows
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.gui.core.spreadsheettable.AbstractProcessSelectedRows
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,ProcessSelectedRows
,SpreadSheetTablePopupMenuItem
,Serializable
,Comparable<SpreadSheetTablePopupMenuItem>
- Direct Known Subclasses:
ArrayStatistic
,CopySelectedFiles
public abstract class AbstractProcessSelectedRows extends 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.-
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 AbstractProcessSelectedRows()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected String
check(SpreadSheetTablePopupMenuItemHelper.TableState state)
Hook method for checks before attempting processing.int
compareTo(SpreadSheetTablePopupMenuItem o)
For sorting the menu items.void
defineOptions()
Adds options to the internal list of options.protected abstract boolean
doProcessSelectedRows(SpreadSheetTablePopupMenuItemHelper.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.String
menuItemTextTipText()
Returns the tip text for this property.boolean
processSelectedRows(SpreadSheetTablePopupMenuItemHelper.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.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.gui.core.spreadsheettable.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 interfaceOptionHandler
- Overrides:
defineOptions
in 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:
getIconName
in interfaceSpreadSheetTablePopupMenuItem
- Returns:
- the name, null if none 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 interfaceSpreadSheetTablePopupMenuItem
- Returns:
- the name
-
compareTo
public int compareTo(SpreadSheetTablePopupMenuItem o)
For sorting the menu items.- Specified by:
compareTo
in interfaceComparable<SpreadSheetTablePopupMenuItem>
- 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(SpreadSheetTablePopupMenuItemHelper.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(SpreadSheetTablePopupMenuItemHelper.TableState state)
Processes the specified rows.- Parameters:
state
- the table state- Returns:
- true if successful
-
processSelectedRows
public boolean processSelectedRows(SpreadSheetTablePopupMenuItemHelper.TableState state)
Processes the specified rows.- Specified by:
processSelectedRows
in interfaceProcessSelectedRows
- Parameters:
state
- the table state- Returns:
- true if successful
-
-