Class Merge
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,ShallowCopySupporter<AbstractDataPlugin>
,SizeOfHandler
,Serializable
public class Merge extends AbstractSelectedSheetsDataPluginWithGOE
Merges multiple spreadsheets into a single one.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.gui.tools.spreadsheetviewer.AbstractSelectedSheetsDataPluginWithGOE
m_Editor
-
Fields inherited from class adams.gui.tools.spreadsheetviewer.AbstractSelectedSheetsDataPlugin
m_SelectedPanels
-
Fields inherited from class adams.gui.tools.spreadsheetviewer.AbstractDataPlugin
m_CanceledByUser, m_CurrentPanel, m_LastSetup
-
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 Merge()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canProcess(SpreadSheetPanel panel)
Returns whether the panel can be processed.protected boolean
getCanChangeClassInDialog()
Returns whether the class can be changed in the GOE.protected Object
getDefaultValue()
Returns the default object to use in the GOE if no last setup is yet available.protected Class
getEditorType()
Returns the class to use as type (= superclass) in the GOE.String
getMenuIcon()
Returns the file name of the icon.String
getMenuText()
Returns the text of the menu item.String
globalInfo()
Returns a string describing the object.boolean
isInPlace()
Returns whether the processed sheet should rather get placed ("in-place") in the same tab rather than in a new one.protected SpreadSheet
process()
Processes all the selected panels.-
Methods inherited from class adams.gui.tools.spreadsheetviewer.AbstractSelectedSheetsDataPluginWithGOE
createConfigurationPanel, getDialogSize, hasApprovalButton, hasCancelButton
-
Methods inherited from class adams.gui.tools.spreadsheetviewer.AbstractSelectedSheetsDataPlugin
createDialog, createListPanel, doProcess, getAllPanels
-
Methods inherited from class adams.gui.tools.spreadsheetviewer.AbstractDataPlugin
check, getCanceledByUser, getCurrentPanel, getLastSetup, getPlugins, hasLastSetup, process, setCurrentPanel, setLastSetup, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, 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
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
getMenuText
public String getMenuText()
Returns the text of the menu item.- Specified by:
getMenuText
in classAbstractDataPlugin
- Returns:
- the text
-
getMenuIcon
public String getMenuIcon()
Returns the file name of the icon.- Specified by:
getMenuIcon
in classAbstractDataPlugin
- Returns:
- the filename or null if no icon available
-
canProcess
public boolean canProcess(SpreadSheetPanel panel)
Returns whether the panel can be processed.- Overrides:
canProcess
in classAbstractDataPlugin
- Parameters:
panel
- the panel to check- Returns:
- true if can be processed
-
getEditorType
protected Class getEditorType()
Returns the class to use as type (= superclass) in the GOE.- Specified by:
getEditorType
in classAbstractSelectedSheetsDataPluginWithGOE
- Returns:
- the class
-
getDefaultValue
protected Object getDefaultValue()
Returns the default object to use in the GOE if no last setup is yet available.- Specified by:
getDefaultValue
in classAbstractSelectedSheetsDataPluginWithGOE
- Returns:
- the object
-
getCanChangeClassInDialog
protected boolean getCanChangeClassInDialog()
Returns whether the class can be changed in the GOE.- Overrides:
getCanChangeClassInDialog
in classAbstractSelectedSheetsDataPluginWithGOE
- Returns:
- true if class can be changed by the user
-
isInPlace
public boolean isInPlace()
Returns whether the processed sheet should rather get placed ("in-place") in the same tab rather than in a new one.- Specified by:
isInPlace
in classAbstractDataPlugin
- Returns:
- true if to replace current sheet with processed one
-
process
protected SpreadSheet process()
Processes all the selected panels.- Specified by:
process
in classAbstractSelectedSheetsDataPlugin
- Returns:
- spreadsheet if successful, otherwise null
-
-