Package adams.gui.flow
Class FlowRunnerPanel
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- adams.gui.core.BasePanel
-
- adams.gui.core.ToolBarPanel
-
- adams.gui.flow.FlowRunnerPanel
-
- All Implemented Interfaces:
CleanUpHandler
,StatusMessageHandler
,MenuBarProvider
,FlowWorkerHandler
,ImageObserver
,MenuContainer
,Serializable
,Accessible
public class FlowRunnerPanel extends ToolBarPanel implements MenuBarProvider, StatusMessageHandler, FlowWorkerHandler
Panel that allows the execution of flows.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class adams.gui.core.ToolBarPanel
ToolBarPanel.ToolBarLocation
-
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
-
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
-
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
-
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
-
Field Summary
Fields Modifier and Type Field Description static String
FILENAME
the name of the props file.protected AbstractBaseAction
m_ActionClose
the "close" action.protected AbstractBaseAction
m_ActionDuplicateWindow
the "duplicate window" action.protected AbstractBaseAction
m_ActionExecutionDisplayErrors
the "display errors" action.protected AbstractBaseAction
m_ActionExecutionLogErrors
the "log errors" action.protected AbstractBaseAction
m_ActionHeadless
the "headless" item.protected AbstractBaseAction
m_ActionLoad
the "load" action.protected AbstractBaseAction
m_ActionNewWindow
the "new window" action.protected AbstractBaseAction
m_ActionPauseAndResume
the "pause" item.protected AbstractBaseAction
m_ActionRun
the "run" item.protected AbstractBaseAction
m_ActionStop
the "stop" action.protected File
m_CurrentFile
the filename of the current flow.protected Actor
m_CurrentFlow
the current flow.protected List<BaseButton>
m_CurrentHelpButtons
the buttons for the current SetVariable singletons.protected List<BaseTextField>
m_CurrentParameters
the textfields for the current SetVariable singletons.protected List<SetVariable>
m_CurrentSetVariables
the current SetVariable singletons (used for displaying the parameters).protected Thread
m_CurrentThread
the current worker thread.protected FlowWorker
m_CurrentWorker
the current worker.protected FlowFileChooser
m_FileChooser
the filedialog for loading/saving flows.protected JLabel
m_LabelFlowAnnotation
the label for the flow annotation.protected Actor
m_LastFlow
the last flow that was run.protected JMenuBar
m_MenuBar
the menu bar, if used.protected JMenu
m_MenuItemLoadRecent
the "load recent" submenu.protected BasePanel
m_PanelBottom
the panel at the bottom.protected FlowPanelNotificationArea
m_PanelNotification
the panel for showing notifications.protected JPanel
m_PanelParameters
the panel for the SetVariable singletons.protected BaseScrollPane
m_ParameterScrollPane
the scroll pane for the parameters.protected static Properties
m_Properties
the properties.protected RecentFilesHandler<JMenu>
m_RecentFilesHandler
the recent files handler.protected boolean
m_RunningSwingWorker
whether a flow is currently being loaded, etc.protected FlowRunnerPanel
m_Self
the panel itself.protected BaseSplitPane
m_SplitPane
the split pane to use for tree and notification area.protected BaseStatusBar
m_StatusBar
the status.protected TitleGenerator
m_TitleGenerator
for generating the title.static String
SESSION_FILE
the file to store the recent files in.-
Fields inherited from class adams.gui.core.ToolBarPanel
m_ContentPanel, m_Location, m_ToolBar
-
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
-
Constructor Summary
Constructors Constructor Description FlowRunnerPanel()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanUp()
Cleans up the last flow that was run.void
cleanUp(boolean destroy)
Cleans up the last flow that was run.void
clearNotification()
Removes the notification.protected void
close()
Closes the dialog or frame.void
displayErrors()
Displays the errors from the last run.protected void
duplicateWindow()
Duplicates the current window/frame, including the current flow.protected void
findSetVariableActors(Actor parent, List<SetVariable> list)
Locates all the SetVariable singleton actors below the parent.void
finishedExecution()
Finishes up the execution, setting the worker to null.File
getCurrentDirectory()
Returns the current directory set in the FileChooser used for opening the flows.File
getCurrentFile()
Returns the current file in use.Actor
getCurrentFlow()
Returns the current flow.Actor
getLastFlow()
Returns the last executed flow (if any).JMenuBar
getMenuBar()
Creates a menu bar (singleton per panel object).static Properties
getProperties()
Returns the properties that define the editor.boolean
getRunGC()
Returns whether the GC gets called after the flow execution.BaseSplitPane
getSplitPane()
Returns the split pane.StoragePanel
getStoragePanel()
Returns the panel with the storage items.TitleGenerator
getTitleGenerator()
Returns the title generator in use.VariableManagementPanel
getVariablesPanel()
Returns the panel with the variables.protected void
initActions()
Initializes the actions.protected void
initGUI()
Initializes the widgets.protected void
initialize()
Initializes the members.protected void
initToolBar()
Initializes the toolbar.boolean
isHeadless()
Returns whether the flow gets executed in headless mode.boolean
isModified()
Returns whether the flow is flagged as modified.boolean
isRunning()
Returns whether a flow is currently running.boolean
isRunningSwingWorker()
Returns whether a swing worker is currently running.boolean
isStopping()
Returns whether a flow is currently being stopped.protected void
load(FlowReader reader, File file)
Loads a flow.protected void
load(FlowReader reader, File file, boolean execute)
Loads a flow.void
loadUnsafe(File file)
Attempts to load the file.protected void
newWindow()
Displays a new flow editor window/frame.protected void
open()
Opens a flow.protected boolean
pauseAndResume()
Pauses/resumes the flow.protected void
reset()
Resets the GUI to default values.void
run()
Executes the flow.void
run(boolean showNotification, boolean debug)
Executes the flow.void
runUnsafe(File file)
Attempts to load/run the file.void
setCurrentDirectory(File dir)
Sets the current directory in the FileChooser use for opening flows.protected void
setCurrentFile(File value)
Sets the current file.void
setCurrentFlow(Actor flow)
Sets the flow to work on.void
setCurrentFlow(Node flow)
Sets the flow to work on.void
setLastFlow(Actor value)
Sets the flow that was last executed.protected void
showMessage()
Displays the message in the status bar in a separate dialog.protected void
showMessage(String msg)
Displays the given message in a separate dialog.void
showNotification(String msg, FlowPanelNotificationArea.NotificationType type)
Displays the notification text.void
showNotification(JComponent comp, String icon)
Displays the notification component.void
showStatus(String msg)
Displays a message.void
stop()
Stops the flow.void
stop(boolean cleanUp)
Stops the flow.void
update()
updates the enabled state etc.protected void
updateActions()
updates the enabled state of the menu items.protected void
updateAnnotation()
Updates the top-level annotation.protected void
updateParameters()
Makes any top-level SetVariable singletons in the GUI available.protected void
updateTitle()
Updates the title of the dialog.protected void
updateWidgets()
Updates the enabled state of the widgets.-
Methods inherited from class adams.gui.core.ToolBarPanel
addSeparator, addToToolBar, addToToolBar, finishInit, getContentPanel, getToolBar, getToolBarComponentAtIndex, getToolBarComponentCount, getToolBarLocation, isFloatable, removeFromToolBar, setFloatable, setToolBarLocation
-
Methods inherited from class adams.gui.core.BasePanel
afterHide, afterShow, beforeHide, beforeShow, closeParent, getParentChild, getParentDialog, getParentFrame, getParentInternalFrame, getParentTitle, initFileChooser, main, printErrorMessage, printException, saveComponent, setEnabledCascade, setEnabledCascade, setParentTitle, setVisible
-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
FILENAME
public static final String FILENAME
the name of the props file.- See Also:
- Constant Field Values
-
SESSION_FILE
public static final String SESSION_FILE
the file to store the recent files in.- See Also:
- Constant Field Values
-
m_Properties
protected static Properties m_Properties
the properties.
-
m_RunningSwingWorker
protected boolean m_RunningSwingWorker
whether a flow is currently being loaded, etc. using a SwingWorker.
-
m_CurrentFlow
protected Actor m_CurrentFlow
the current flow.
-
m_CurrentFile
protected File m_CurrentFile
the filename of the current flow.
-
m_FileChooser
protected FlowFileChooser m_FileChooser
the filedialog for loading/saving flows.
-
m_StatusBar
protected BaseStatusBar m_StatusBar
the status.
-
m_Self
protected FlowRunnerPanel m_Self
the panel itself.
-
m_TitleGenerator
protected TitleGenerator m_TitleGenerator
for generating the title.
-
m_MenuBar
protected JMenuBar m_MenuBar
the menu bar, if used.
-
m_ActionLoad
protected AbstractBaseAction m_ActionLoad
the "load" action.
-
m_MenuItemLoadRecent
protected JMenu m_MenuItemLoadRecent
the "load recent" submenu.
-
m_ActionClose
protected AbstractBaseAction m_ActionClose
the "close" action.
-
m_ActionHeadless
protected AbstractBaseAction m_ActionHeadless
the "headless" item.
-
m_ActionRun
protected AbstractBaseAction m_ActionRun
the "run" item.
-
m_ActionPauseAndResume
protected AbstractBaseAction m_ActionPauseAndResume
the "pause" item.
-
m_ActionStop
protected AbstractBaseAction m_ActionStop
the "stop" action.
-
m_ActionExecutionLogErrors
protected AbstractBaseAction m_ActionExecutionLogErrors
the "log errors" action.
-
m_ActionExecutionDisplayErrors
protected AbstractBaseAction m_ActionExecutionDisplayErrors
the "display errors" action.
-
m_ActionNewWindow
protected AbstractBaseAction m_ActionNewWindow
the "new window" action.
-
m_ActionDuplicateWindow
protected AbstractBaseAction m_ActionDuplicateWindow
the "duplicate window" action.
-
m_RecentFilesHandler
protected RecentFilesHandler<JMenu> m_RecentFilesHandler
the recent files handler.
-
m_ParameterScrollPane
protected BaseScrollPane m_ParameterScrollPane
the scroll pane for the parameters.
-
m_PanelParameters
protected JPanel m_PanelParameters
the panel for the SetVariable singletons.
-
m_LabelFlowAnnotation
protected JLabel m_LabelFlowAnnotation
the label for the flow annotation.
-
m_CurrentSetVariables
protected List<SetVariable> m_CurrentSetVariables
the current SetVariable singletons (used for displaying the parameters).
-
m_CurrentParameters
protected List<BaseTextField> m_CurrentParameters
the textfields for the current SetVariable singletons.
-
m_CurrentHelpButtons
protected List<BaseButton> m_CurrentHelpButtons
the buttons for the current SetVariable singletons.
-
m_CurrentWorker
protected FlowWorker m_CurrentWorker
the current worker.
-
m_CurrentThread
protected Thread m_CurrentThread
the current worker thread.
-
m_LastFlow
protected Actor m_LastFlow
the last flow that was run.
-
m_PanelBottom
protected BasePanel m_PanelBottom
the panel at the bottom.
-
m_PanelNotification
protected FlowPanelNotificationArea m_PanelNotification
the panel for showing notifications.
-
m_SplitPane
protected BaseSplitPane m_SplitPane
the split pane to use for tree and notification area.
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initialize
in classToolBarPanel
-
initGUI
protected void initGUI()
Initializes the widgets.- Overrides:
initGUI
in classToolBarPanel
-
initActions
protected void initActions()
Initializes the actions.- Specified by:
initActions
in classToolBarPanel
- See Also:
AbstractBaseAction
-
initToolBar
protected void initToolBar()
Initializes the toolbar.- Specified by:
initToolBar
in classToolBarPanel
- See Also:
ToolBarPanel.initActions()
-
getMenuBar
public JMenuBar getMenuBar()
Creates a menu bar (singleton per panel object). Can be used in frames.- Specified by:
getMenuBar
in interfaceMenuBarProvider
- Returns:
- the menu bar
-
updateActions
protected void updateActions()
updates the enabled state of the menu items.- Specified by:
updateActions
in classToolBarPanel
-
updateWidgets
protected void updateWidgets()
Updates the enabled state of the widgets.
-
update
public void update()
updates the enabled state etc. of all the GUI elements.- Specified by:
update
in interfaceFlowWorkerHandler
-
findSetVariableActors
protected void findSetVariableActors(Actor parent, List<SetVariable> list)
Locates all the SetVariable singleton actors below the parent.- Parameters:
parent
- the actor to search belowlist
- for storing the SetVariable actors
-
updateAnnotation
protected void updateAnnotation()
Updates the top-level annotation.- See Also:
m_LabelFlowAnnotation
-
updateParameters
protected void updateParameters()
Makes any top-level SetVariable singletons in the GUI available.- See Also:
m_PanelParameters
-
getTitleGenerator
public TitleGenerator getTitleGenerator()
Returns the title generator in use.- Returns:
- the generator
-
updateTitle
protected void updateTitle()
Updates the title of the dialog.
-
setCurrentFile
protected void setCurrentFile(File value)
Sets the current file.- Parameters:
value
- the file
-
getCurrentFile
public File getCurrentFile()
Returns the current file in use.- Returns:
- the current file, can be null
-
loadUnsafe
public void loadUnsafe(File file)
Attempts to load the file. If non-existent, then a new flow will be created and the current filename set to the provided one.- Parameters:
file
- the file to load
-
runUnsafe
public void runUnsafe(File file)
Attempts to load/run the file. If non-existent, then a new flow will be created and the current filename set to the provided one.- Parameters:
file
- the file to load/run
-
load
protected void load(FlowReader reader, File file)
Loads a flow.- Parameters:
reader
- the reader to usefile
- the flow to load
-
load
protected void load(FlowReader reader, File file, boolean execute)
Loads a flow.- Parameters:
reader
- the reader to usefile
- the flow to load
-
reset
protected void reset()
Resets the GUI to default values.
-
setCurrentFlow
public void setCurrentFlow(Actor flow)
Sets the flow to work on.- Parameters:
flow
- the flow to use
-
setCurrentFlow
public void setCurrentFlow(Node flow)
Sets the flow to work on.- Parameters:
flow
- the flow to use
-
getCurrentFlow
public Actor getCurrentFlow()
Returns the current flow.- Returns:
- the current flow, can be null
-
open
protected void open()
Opens a flow.
-
run
public void run()
Executes the flow.
-
run
public void run(boolean showNotification, boolean debug)
Executes the flow.- Parameters:
showNotification
- whether to show notifications about errors/stopped/finisheddebug
- whether to run in debug mode
-
isRunning
public boolean isRunning()
Returns whether a flow is currently running.- Returns:
- true if a flow is being executed
-
isStopping
public boolean isStopping()
Returns whether a flow is currently being stopped.- Returns:
- true if a flow is currently being stopped
-
isRunningSwingWorker
public boolean isRunningSwingWorker()
Returns whether a swing worker is currently running.- Returns:
- true if a swing worker is being executed
-
pauseAndResume
protected boolean pauseAndResume()
Pauses/resumes the flow.- Returns:
- true if paused, otherwise false
-
stop
public void stop()
Stops the flow. Does not cleanUp.- See Also:
stop(boolean)
-
stop
public void stop(boolean cleanUp)
Stops the flow.- Parameters:
cleanUp
- whether to clean up as well
-
displayErrors
public void displayErrors()
Displays the errors from the last run.
-
cleanUp
public void cleanUp(boolean destroy)
Cleans up the last flow that was run.- Parameters:
destroy
- whether to destroy the
-
close
protected void close()
Closes the dialog or frame.
-
newWindow
protected void newWindow()
Displays a new flow editor window/frame.
-
duplicateWindow
protected void duplicateWindow()
Duplicates the current window/frame, including the current flow.
-
showMessage
protected void showMessage()
Displays the message in the status bar in a separate dialog.
-
showMessage
protected void showMessage(String msg)
Displays the given message in a separate dialog.- Parameters:
msg
- the message to display
-
showStatus
public void showStatus(String msg)
Displays a message.- Specified by:
showStatus
in interfaceStatusMessageHandler
- Parameters:
msg
- the message to display
-
setCurrentDirectory
public void setCurrentDirectory(File dir)
Sets the current directory in the FileChooser use for opening flows.- Parameters:
dir
- the new current directory to use
-
getCurrentDirectory
public File getCurrentDirectory()
Returns the current directory set in the FileChooser used for opening the flows.- Returns:
- the current directory
-
getVariablesPanel
public VariableManagementPanel getVariablesPanel()
Returns the panel with the variables.- Specified by:
getVariablesPanel
in interfaceFlowWorkerHandler
- Returns:
- always null
-
getStoragePanel
public StoragePanel getStoragePanel()
Returns the panel with the storage items.- Specified by:
getStoragePanel
in interfaceFlowWorkerHandler
- Returns:
- always null
-
isHeadless
public boolean isHeadless()
Returns whether the flow gets executed in headless mode.- Specified by:
isHeadless
in interfaceFlowWorkerHandler
- Returns:
- true if the flow gets executed in headless mode
-
getRunGC
public boolean getRunGC()
Returns whether the GC gets called after the flow execution.- Specified by:
getRunGC
in interfaceFlowWorkerHandler
- Returns:
- always false
-
isModified
public boolean isModified()
Returns whether the flow is flagged as modified.- Specified by:
isModified
in interfaceFlowWorkerHandler
- Returns:
- always false
-
getSplitPane
public BaseSplitPane getSplitPane()
Returns the split pane.- Specified by:
getSplitPane
in interfaceFlowWorkerHandler
- Returns:
- the split pane
-
showNotification
public void showNotification(String msg, FlowPanelNotificationArea.NotificationType type)
Displays the notification text.- Specified by:
showNotification
in interfaceFlowWorkerHandler
- Parameters:
msg
- the text to displaytype
- the type of notification (info/warning/error)
-
showNotification
public void showNotification(JComponent comp, String icon)
Displays the notification component.- Specified by:
showNotification
in interfaceFlowWorkerHandler
- Parameters:
comp
- the component to displayicon
- the icon to display, null for none
-
clearNotification
public void clearNotification()
Removes the notification.- Specified by:
clearNotification
in interfaceFlowWorkerHandler
-
cleanUp
public void cleanUp()
Cleans up the last flow that was run.- Specified by:
cleanUp
in interfaceCleanUpHandler
-
setLastFlow
public void setLastFlow(Actor value)
Sets the flow that was last executed.- Specified by:
setLastFlow
in interfaceFlowWorkerHandler
- Parameters:
value
- the flow
-
getLastFlow
public Actor getLastFlow()
Returns the last executed flow (if any).- Specified by:
getLastFlow
in interfaceFlowWorkerHandler
- Returns:
- the flow, null if not available
-
finishedExecution
public void finishedExecution()
Finishes up the execution, setting the worker to null.- Specified by:
finishedExecution
in interfaceFlowWorkerHandler
-
getProperties
public static Properties getProperties()
Returns the properties that define the editor.- Returns:
- the properties
-
-