Class AbstractSelectedTrailsViewerPlugin
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.plugin.AbstractToolPlugin<TrailPanel>
-
- adams.gui.visualization.trail.plugins.AbstractTrailViewerPlugin
-
- adams.gui.visualization.trail.plugins.AbstractSelectedTrailsViewerPlugin
-
- All Implemented Interfaces:
adams.core.logging.LoggingSupporter,adams.core.SizeOfHandler,Serializable
- Direct Known Subclasses:
AbstractSelectedTrailsFilter,AbstractSelectedTrailsViewerPluginWithGOE,Statistics
public abstract class AbstractSelectedTrailsViewerPlugin extends AbstractTrailViewerPlugin
Ancestor for plugins that work on selected trails.- Version:
- $Revision: 7171 $
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected TrailPanel[]m_SelectedPanelsfor panels to work on.
-
Constructor Summary
Constructors Constructor Description AbstractSelectedTrailsViewerPlugin()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleancanExecute(TrailPanel panel)Checks whether the plugin can be executed given the specified trail panel.protected abstract JPanelcreateConfigurationPanel(adams.gui.dialog.ApprovalDialog dialog)Creates the panel with the configuration (return null to suppress display).protected adams.gui.dialog.ApprovalDialogcreateDialog()Creates the dialog to display.protected JPanelcreateListPanel(adams.gui.dialog.ApprovalDialog dialog)Creates the panel containing the list of all trails.protected StringdoExecute()Executes the plugin.protected TrailPanel[]getAllPanels()Returns all the available panels in the trail viewer.protected DimensiongetDialogSize()Returns the size of the dialog.protected booleanhasApprovalButton()Returns whether the dialog has an approval button.protected booleanhasCancelButton()Returns whether the dialog has a cancel button.protected Stringprocess()Processes all the selected panels.protected abstract Stringprocess(TrailPanel panel)Processes the specified panel.protected StringprocessFinish()Finishes up the processing.protected StringprocessInit()Initializes the processing.-
Methods inherited from class adams.gui.visualization.trail.plugins.AbstractTrailViewerPlugin
doLog
-
Methods inherited from class adams.gui.plugin.AbstractToolPlugin
createLogEntry, execute, getCanceledByUser, getCaption, getIcon, getIconName, getLastSetup, getMenu, hasLastSetup, log, setLastSetup
-
-
-
-
Field Detail
-
m_SelectedPanels
protected TrailPanel[] m_SelectedPanels
for panels to work on.
-
-
Method Detail
-
canExecute
public boolean canExecute(TrailPanel panel)
Checks whether the plugin can be executed given the specified trail panel.
Panel must be non-null and must contain an trail.- Specified by:
canExecutein classadams.gui.plugin.AbstractToolPlugin<TrailPanel>- Parameters:
panel- the panel to use as basis for decision- Returns:
- true if plugin can be executed
-
getAllPanels
protected TrailPanel[] getAllPanels()
Returns all the available panels in the trail viewer.- Returns:
- the available panels
-
createListPanel
protected JPanel createListPanel(adams.gui.dialog.ApprovalDialog dialog)
Creates the panel containing the list of all trails. Also updates them_SelectedPanelsproperty.- Parameters:
dialog- the dialog that is being created- Returns:
- the generated panel
-
createConfigurationPanel
protected abstract JPanel createConfigurationPanel(adams.gui.dialog.ApprovalDialog dialog)
Creates the panel with the configuration (return null to suppress display).- Parameters:
dialog- the dialog that is being created- Returns:
- the generated panel, null to suppress
-
getDialogSize
protected Dimension getDialogSize()
Returns the size of the dialog.- Returns:
- the size
-
hasApprovalButton
protected boolean hasApprovalButton()
Returns whether the dialog has an approval button.- Returns:
- true if approval button visible
-
hasCancelButton
protected boolean hasCancelButton()
Returns whether the dialog has a cancel button.- Returns:
- true if cancel button visible
-
createDialog
protected adams.gui.dialog.ApprovalDialog createDialog()
Creates the dialog to display.- Returns:
- the dialog
-
processInit
protected String processInit()
Initializes the processing.
Default implementation returns null.- Returns:
- null if successful, otherwise error message
-
process
protected abstract String process(TrailPanel panel)
Processes the specified panel.- Parameters:
panel- the panel to process- Returns:
- null if successful, error message otherwise
-
processFinish
protected String processFinish()
Finishes up the processing.
Default implementation returns null.- Returns:
- null if successful, otherwise error message
-
process
protected String process()
Processes all the selected panels.- Returns:
- null if successful, otherwise error message
-
doExecute
protected String doExecute()
Executes the plugin.- Specified by:
doExecutein classadams.gui.plugin.AbstractToolPlugin<TrailPanel>- Returns:
- null if OK, otherwise error message
-
-