Package adams.gui.flow
Class FlowEditorPanel
- 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.FlowEditorPanel
-
- All Implemented Interfaces:
StatusMessageHandler,StatusMessageHandlerExt,BaseStatusBar.PopupMenuCustomizer,MenuBarProvider,SendToActionSupporter,ImageObserver,MenuContainer,Serializable,Accessible
public class FlowEditorPanel extends ToolBarPanel implements MenuBarProvider, StatusMessageHandlerExt, SendToActionSupporter, BaseStatusBar.PopupMenuCustomizer
A panel for setting up, modifying, saving and loading "simple" 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 StringACTORPROCESSORS_SESSION_FILEthe file to store the recent actor processors in.static StringDEFAULT_TITLEthe default title for dialogs/frames.static StringFILENAMEthe name of the props file with the general properties.static StringFILENAME_MENUthe name of the props file with the menu.static StringFILENAME_TREEPOPUPMENUthe name of the props file with the tree menu.static StringFILENAME_TREEQUICKACTIONMENUthe name of the props file with the tree quick action menu.protected FlowEditorActionm_ActionActiveClearGraphicalOutputthe "Clear graphical output" action.protected FlowEditorActionm_ActionActiveDebugthe "run (debug)" action.protected FlowEditorActionm_ActionActiveDisplayErrorsthe "display errors" action.protected FlowEditorActionm_ActionActiveGCthe "gc" action.protected FlowEditorActionm_ActionActiveHeadlessthe "headless" action.protected FlowEditorActionm_ActionActiveKillthe "kill" action.protected FlowEditorActionm_ActionActivePauseAndResumethe "pause" action.protected FlowEditorActionm_ActionActiveRunthe "run" action.protected FlowEditorActionm_ActionActiveStopthe "stop" action.protected FlowEditorActionm_ActionActiveStoragethe "storage" action.protected FlowEditorActionm_ActionActiveValidateSetupthe "check setup" action.protected FlowEditorActionm_ActionActiveVariablesthe "variables" action.protected FlowEditorActionm_ActionDuplicateTabthe "duplicate tab" action.protected FlowEditorActionm_ActionDuplicateTabInNewWindowthe "duplicate tab in new window" action.protected FlowEditorActionm_ActionEditCheckVariablesthe check variables action.protected FlowEditorActionm_ActionEditCleanUpFlowthe remove disabled actors action.protected FlowEditorActionm_ActionEditClearClipboardthe clear clipboard action.protected FlowEditorActionm_ActionEditDiffthe diff action.protected FlowEditorActionm_ActionEditEnableUndothe toggle undo action.protected FlowEditorActionm_ActionEditFindthe find action.protected FlowEditorActionm_ActionEditIgnoreNameChangesthe ignore name changes action.protected FlowEditorActionm_ActionEditInteractiveActorsthe interactive actors action.protected FlowEditorActionm_ActionEditListTODOsthe "list TODOs" action.protected FlowEditorActionm_ActionEditLocateActorthe locate actor action.protected FlowEditorActionm_ActionEditLocateStorageNamethe locate storage name action.protected FlowEditorActionm_ActionEditLocateVariablethe locate variable action.protected FlowEditorActionm_ActionEditProcessActorsthe "process actors" action.protected FlowEditorActionm_ActionEditRedothe redo action.protected FlowEditorActionm_ActionEditTimedActorsthe timed actors action.protected FlowEditorActionm_ActionEditUndothe undo action.protected FlowEditorActionm_ActionFileCheckOnSavethe "check on save" action.protected FlowEditorActionm_ActionFileClosethe "close" action.protected FlowEditorActionm_ActionFileClosePagethe "close page" action.protected FlowEditorActionm_ActionFileExportthe "export" action.protected FlowEditorActionm_ActionFileImportthe "import" action.protected FlowEditorActionm_ActionFileNewthe "new" action.protected FlowEditorActionm_ActionFileNewFromClipboardthe "new from clipboard" action.protected FlowEditorActionm_ActionFileOpenthe "open" action.protected FlowEditorActionm_ActionFilePropertiesthe "properties" action.protected FlowEditorActionm_ActionFileRevertthe "revert" action.protected FlowEditorActionm_ActionFileSavethe "save" action.protected FlowEditorActionm_ActionFileSaveAsthe "save as" action.protected FlowEditorActionm_ActionHalfHeightthe "half height" action.protected FlowEditorActionm_ActionHalfWidththe "half width" action.protected FlowEditorActionm_ActionHelpActorsthe "help actors" action.protected FlowEditorActionm_ActionHelpBooleanExpressionthe "help boolean expression" action.protected FlowEditorActionm_ActionHelpClassesthe "help classes" action.protected FlowEditorActionm_ActionHelpMathematicalExpressionthe "help math expression" action.protected FlowEditorActionm_ActionHelpStringExpressionthe "help string expression" action.protected FlowEditorActionm_ActionHelpVariablesthe "help variables" action.protected FlowEditorActionm_ActionMoveToNewWindowthe "move to new window" action.protected FlowEditorActionm_ActionNewWindowthe "new window" action.protected FlowEditorActionm_ActionRunClearGraphicalOutputthe "Clear graphical output" action.protected FlowEditorActionm_ActionRunDebugthe "run (debug)" action.protected FlowEditorActionm_ActionRunDisableAllBreakpointsthe "disable all breakpoints" action.protected FlowEditorActionm_ActionRunDisplayErrorsthe "display errors" action.protected FlowEditorActionm_ActionRunEnableAllBreakpointsthe "enable all breakpoints" action.protected FlowEditorActionm_ActionRunGCthe "gc" action.protected FlowEditorActionm_ActionRunHeadlessthe "headless" action.protected FlowEditorActionm_ActionRunKillthe "kill" action.protected FlowEditorActionm_ActionRunParseErrorthe parse error action.protected FlowEditorActionm_ActionRunPauseAndResumethe "pause" action.protected FlowEditorActionm_ActionRunRemoveAllBreakpointsthe "remove all breakpoints" action.protected FlowEditorActionm_ActionRunRunthe "run" action.protected FlowEditorActionm_ActionRunRunAllthe "run all" action.protected FlowEditorActionm_ActionRunStopthe "stop" action.protected FlowEditorActionm_ActionRunStopAllthe "stop all" action.protected FlowEditorActionm_ActionRunStoragethe "storage" action.protected FlowEditorActionm_ActionRunValidateSetupthe "check setup" action.protected FlowEditorActionm_ActionRunVariablesthe "variables" action.protected FlowEditorActionm_ActionViewFullExpansionthe "full expansion" action.protected FlowEditorActionm_ActionViewRedrawthe "redraw" action.protected FlowEditorActionm_ActionViewShowAnnotationsthe "show annotations" action.protected FlowEditorActionm_ActionViewShowInputOutputthe "show input/output" action.protected FlowEditorActionm_ActionViewShowQuickInfothe "show quick info" action.protected FlowEditorActionm_ActionViewShowSourcethe "show source" action.protected FlowEditorActionm_ActionViewShowToolbarthe "show toolbar" action.protected FlowEditorActionm_ActionViewStatisticsthe "statistic" action.protected FlowEditorActionm_ActionViewZoomthe "zoom" action.protected List<AbstractFlowEditorMenuItem>m_AdditionalMenuItemsadditional menu items.protected FlowFileChooserm_FileChooserthe filedialog for loading/saving flows.protected FilenameProposerm_FilenameProposerfor proposing filenames for new flows.protected FlowMultiPagePanem_FlowPanelsthe tabbedpane for the flow panels.protected JMenum_MenuActivethe "active" menu.protected JMenuBarm_MenuBarthe menu bar, if used.protected JMenum_MenuEditRecentActorProcessorsrecent actor processors menu.protected JMenum_MenuFileNewthe "new" sub-menu.protected JMenum_MenuFileOpenRecentthe "open recent" submenu.protected List<FlowEditorAction>m_MenuItemsmenu items.protected ToolBarPanel.ToolBarLocationm_PreferredToolBarLocationthe default toolbar location to use.protected static Propertiesm_Propertiesthe general properties.protected static Propertiesm_PropertiesMenuthe menu properties.protected static Propertiesm_PropertiesTreePopupthe tree popup menu properties.protected static Propertiesm_PropertiesTreeQuickActionthe tree quick action menu properties.protected RecentActorProcessorHandler<JMenu>m_RecentActorProcessorHandlerRecent file handler for actor processorsprotected RecentFilesHandlerWithCommandline<JMenu>m_RecentFilesHandlerthe recent files handler.protected FlowEditorPanelm_Selfthe panel itself.protected BaseSplitPanem_SplitPanethe split pane for displaying flow and tabs.protected BaseStatusBarm_StatusBarthe status.protected FlowTabManagerm_Tabsthe tabbedpane for the tabs.protected List<JButton>m_ToolBarActiveButtonsthe "active" buttons in the toolbar.static StringMENU_ACTIVEthe Active menu text.static StringMENU_EDITthe Edit menu text.static StringMENU_FILEthe File menu text.static StringMENU_HELPthe Help menu text.static StringMENU_RUNthe Run menu text.static StringMENU_VIEWthe View menu text.static StringMENU_WINDOWthe Window menu text.static StringSESSION_FILEthe 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 FlowEditorPanel()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddAdditionalMenuitems()Adds the additional menu items to the menubar.voidaddRecentActorProcessor(ActorProcessor processor)For adding an actor processor to the recent list.booleancheckForModified()Returns whether we can proceed with the operation or not, depending on whether the user saved the flow or discarded the changes.booleancheckForModified(FlowPanel panel)Returns whether we can proceed with the operation or not, depending on whether the user saved the flow or discarded the changes.voidcleanUp()Cleans up the last flow that was run.voidclose()Closes the dialog or frame.voidcustomizePopupMenu(BaseStatusBar source, boolean left, JPopupMenu menu)For customizing the popup menu.ActorgetActiveFlow()Returns the active flow.ActorgetActiveFlow(StringBuilder errors)Returns the active flow.FlowPanelgetActivePanel()Returns the active panel (if any).ActorgetActiveRoot()Returns the active root actor without its children.FilegetCurrentDirectory()Returns the current directory set in the FileChooser used for opening the flows.FilegetCurrentFile()Returns the current file in use.ActorgetCurrentFlow()Returns the current flow.ActorgetCurrentFlow(StringBuilder errors)Returns the current flow.FlowPanelgetCurrentPanel()Returns the current flow panel.ActorgetCurrentRoot()Returns the current root actor without its children.TreegetCurrentTree()Returns the tree.FlowFileChoosergetFileChooser()Returns the filechooser in use.FlowMultiPagePanegetFlowPanels()Returns the flow panels.ActorgetLastFlow()Returns the last flow executed (currently selected flow).JMenuBargetMenuBar()Creates a menu bar (singleton per panel object).ToolBarPanel.ToolBarLocationgetPreferredToolBarLocation()Returns the preferred toolbar location.static PropertiesgetPropertiesEditor()Returns the properties that define the editor.static PropertiesgetPropertiesMenu()Returns the properties that define the menu in the editor.static PropertiesgetPropertiesTreePopup()Returns the properties for the tree popup menu.static PropertiesgetPropertiesTreeQuickAction()Returns the properties for the tree quick action menu.FlowReadergetReaderForFile(File file)Returns the reader for the file.RecentFilesHandlerWithCommandline<JMenu>getRecentFilesHandler()Returns the recent files handler in use.ActorgetRunningFlow()Returns the currently running flow.Class[]getSendToClasses()Returns the classes that the supporter generates.ObjectgetSendToItem(Class[] cls)Returns the object to send.FlowTabManagergetTabs()Returns the tab manager.voidgrabFocus()Requests that this Component get the input focus, and that this Component's top-level ancestor become the focused Window.booleanhasActivePanel()Returns whether an active panel is set.booleanhasCurrentPanel()Returns whether a flow panel is available.booleanhasSendToItem(Class[] cls)Checks whether something to send is available.protected voidinitActions()Initializes the actions.protected voidinitGUI()Initializes the widgets.protected voidinitialize()Initializes the members.protected voidinitToolBar()Initializes the toolbar.booleanisAnyPaused()Returns whether any flow is currently paused.booleanisAnyRunning()Returns whether any flow is currently running.booleanisAnyStopping()Returns whether any flow is currently stopping.booleanisAnySwingWorkerRunning()Returns whether any swing worker is currently running.booleanisModified()Returns whether the flow is flagged as modified.booleanisPaused()Returns whether the current flow is paused.booleanisRunning()Returns whether a flow is currently running.booleanisStopping()Returns whether a flow is currently being stopped.booleanisSwingWorkerRunning()Returns whether a swing worker is currently running.voidkill()Kills the flow.voidloadUnsafe(File file)Attempts to load the file.protected voidnewFlow(Actor actor)Adds new panel with the specified actor.voidnewTab()Adds a new tab.FlowEditorPanelnewWindow()Displays a new flow editor window/frame.FlowEditorPanelnewWindow(Actor actor)Displays a new flow editor window/frame with the specified actor.voidopen()Opens a flow.voidrefreshTabs()Refreshes the tabs.protected voidrevert()Reverts a flow.voidrun()Executes the flow.voidrun(boolean showNotification, boolean debug)Executes the flow.voidrunUnsafe(File file)Attempts to load/run the file.voidsave()Saves the flow.voidsaveAs()Saves the flow.voidsetCurrentDirectory(File value)Sets the current directory in the FileChooser use for opening flows.voidsetCurrentFile(File value)Sets the current file.voidsetCurrentFlow(Actor flow)Sets the flow to work on.voidsetModified(boolean value)Sets whether the flow is modified or not.protected voidsetVisibleAgain()Used by the close() method to re-display the flow, in case the flow cannot or should not be closed after all.protected voidshowMessage()Displays the message in the status bar in a separate dialog.protected voidshowMessage(String msg, boolean isError)Displays the given message in a separate dialog.voidshowStatus(boolean left, String msg)Displays a message.voidshowStatus(String msg)Displays a message.voidstop()Stops the flow.voidundoOccurred(UndoEvent e)An undo event occurred.voidupdate()updates the enabled state etc. of all the GUI elements.voidupdateActions()updates the enabled state of the menu items.protected voidupdateWidgets()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, 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
-
MENU_FILE
public static final String MENU_FILE
the File menu text.- See Also:
- Constant Field Values
-
MENU_EDIT
public static final String MENU_EDIT
the Edit menu text.- See Also:
- Constant Field Values
-
MENU_RUN
public static final String MENU_RUN
the Run menu text.- See Also:
- Constant Field Values
-
MENU_ACTIVE
public static final String MENU_ACTIVE
the Active menu text.- See Also:
- Constant Field Values
-
MENU_VIEW
public static final String MENU_VIEW
the View menu text.- See Also:
- Constant Field Values
-
MENU_WINDOW
public static final String MENU_WINDOW
the Window menu text.- See Also:
- Constant Field Values
-
MENU_HELP
public static final String MENU_HELP
the Help menu text.- See Also:
- Constant Field Values
-
FILENAME
public static final String FILENAME
the name of the props file with the general properties.- See Also:
- Constant Field Values
-
FILENAME_MENU
public static final String FILENAME_MENU
the name of the props file with the menu.- See Also:
- Constant Field Values
-
FILENAME_TREEPOPUPMENU
public static final String FILENAME_TREEPOPUPMENU
the name of the props file with the tree menu.- See Also:
- Constant Field Values
-
FILENAME_TREEQUICKACTIONMENU
public static final String FILENAME_TREEQUICKACTIONMENU
the name of the props file with the tree quick action menu.- 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
-
ACTORPROCESSORS_SESSION_FILE
public static final String ACTORPROCESSORS_SESSION_FILE
the file to store the recent actor processors in.- See Also:
- Constant Field Values
-
DEFAULT_TITLE
public static final String DEFAULT_TITLE
the default title for dialogs/frames.- See Also:
- Constant Field Values
-
m_Properties
protected static Properties m_Properties
the general properties.
-
m_PropertiesMenu
protected static Properties m_PropertiesMenu
the menu properties.
-
m_PropertiesTreePopup
protected static Properties m_PropertiesTreePopup
the tree popup menu properties.
-
m_PropertiesTreeQuickAction
protected static Properties m_PropertiesTreeQuickAction
the tree quick action menu properties.
-
m_Self
protected FlowEditorPanel m_Self
the panel itself.
-
m_MenuBar
protected JMenuBar m_MenuBar
the menu bar, if used.
-
m_MenuFileNew
protected JMenu m_MenuFileNew
the "new" sub-menu.
-
m_ActionFileOpen
protected FlowEditorAction m_ActionFileOpen
the "open" action.
-
m_MenuFileOpenRecent
protected JMenu m_MenuFileOpenRecent
the "open recent" submenu.
-
m_ActionFileNew
protected FlowEditorAction m_ActionFileNew
the "new" action.
-
m_ActionFileNewFromClipboard
protected FlowEditorAction m_ActionFileNewFromClipboard
the "new from clipboard" action.
-
m_ActionFileSave
protected FlowEditorAction m_ActionFileSave
the "save" action.
-
m_ActionFileSaveAs
protected FlowEditorAction m_ActionFileSaveAs
the "save as" action.
-
m_ActionFileCheckOnSave
protected FlowEditorAction m_ActionFileCheckOnSave
the "check on save" action.
-
m_ActionFileRevert
protected FlowEditorAction m_ActionFileRevert
the "revert" action.
-
m_ActionFileExport
protected FlowEditorAction m_ActionFileExport
the "export" action.
-
m_ActionFileImport
protected FlowEditorAction m_ActionFileImport
the "import" action.
-
m_ActionFileProperties
protected FlowEditorAction m_ActionFileProperties
the "properties" action.
-
m_ActionFileClosePage
protected FlowEditorAction m_ActionFileClosePage
the "close page" action.
-
m_ActionFileClose
protected FlowEditorAction m_ActionFileClose
the "close" action.
-
m_ActionEditEnableUndo
protected FlowEditorAction m_ActionEditEnableUndo
the toggle undo action.
-
m_ActionEditUndo
protected FlowEditorAction m_ActionEditUndo
the undo action.
-
m_ActionEditRedo
protected FlowEditorAction m_ActionEditRedo
the redo action.
-
m_ActionEditDiff
protected FlowEditorAction m_ActionEditDiff
the diff action.
-
m_ActionEditClearClipboard
protected FlowEditorAction m_ActionEditClearClipboard
the clear clipboard action.
-
m_ActionEditFind
protected FlowEditorAction m_ActionEditFind
the find action.
-
m_ActionEditLocateActor
protected FlowEditorAction m_ActionEditLocateActor
the locate actor action.
-
m_ActionEditLocateVariable
protected FlowEditorAction m_ActionEditLocateVariable
the locate variable action.
-
m_ActionEditLocateStorageName
protected FlowEditorAction m_ActionEditLocateStorageName
the locate storage name action.
-
m_ActionEditCleanUpFlow
protected FlowEditorAction m_ActionEditCleanUpFlow
the remove disabled actors action.
-
m_ActionEditCheckVariables
protected FlowEditorAction m_ActionEditCheckVariables
the check variables action.
-
m_ActionEditInteractiveActors
protected FlowEditorAction m_ActionEditInteractiveActors
the interactive actors action.
-
m_ActionEditTimedActors
protected FlowEditorAction m_ActionEditTimedActors
the timed actors action.
-
m_ActionEditIgnoreNameChanges
protected FlowEditorAction m_ActionEditIgnoreNameChanges
the ignore name changes action.
-
m_ActionEditListTODOs
protected FlowEditorAction m_ActionEditListTODOs
the "list TODOs" action.
-
m_ActionEditProcessActors
protected FlowEditorAction m_ActionEditProcessActors
the "process actors" action.
-
m_MenuEditRecentActorProcessors
protected JMenu m_MenuEditRecentActorProcessors
recent actor processors menu.
-
m_RecentActorProcessorHandler
protected RecentActorProcessorHandler<JMenu> m_RecentActorProcessorHandler
Recent file handler for actor processors
-
m_ActionRunEnableAllBreakpoints
protected FlowEditorAction m_ActionRunEnableAllBreakpoints
the "enable all breakpoints" action.
-
m_ActionRunRemoveAllBreakpoints
protected FlowEditorAction m_ActionRunRemoveAllBreakpoints
the "remove all breakpoints" action.
-
m_ActionRunDisableAllBreakpoints
protected FlowEditorAction m_ActionRunDisableAllBreakpoints
the "disable all breakpoints" action.
-
m_ActionRunVariables
protected FlowEditorAction m_ActionRunVariables
the "variables" action.
-
m_ActionRunStorage
protected FlowEditorAction m_ActionRunStorage
the "storage" action.
-
m_ActionRunHeadless
protected FlowEditorAction m_ActionRunHeadless
the "headless" action.
-
m_ActionRunGC
protected FlowEditorAction m_ActionRunGC
the "gc" action.
-
m_ActionRunValidateSetup
protected FlowEditorAction m_ActionRunValidateSetup
the "check setup" action.
-
m_ActionRunRun
protected FlowEditorAction m_ActionRunRun
the "run" action.
-
m_ActionRunRunAll
protected FlowEditorAction m_ActionRunRunAll
the "run all" action.
-
m_ActionRunDebug
protected FlowEditorAction m_ActionRunDebug
the "run (debug)" action.
-
m_ActionRunPauseAndResume
protected FlowEditorAction m_ActionRunPauseAndResume
the "pause" action.
-
m_ActionRunStop
protected FlowEditorAction m_ActionRunStop
the "stop" action.
-
m_ActionRunStopAll
protected FlowEditorAction m_ActionRunStopAll
the "stop all" action.
-
m_ActionRunKill
protected FlowEditorAction m_ActionRunKill
the "kill" action.
-
m_ActionRunDisplayErrors
protected FlowEditorAction m_ActionRunDisplayErrors
the "display errors" action.
-
m_ActionRunParseError
protected FlowEditorAction m_ActionRunParseError
the parse error action.
-
m_ActionRunClearGraphicalOutput
protected FlowEditorAction m_ActionRunClearGraphicalOutput
the "Clear graphical output" action.
-
m_MenuActive
protected JMenu m_MenuActive
the "active" menu.
-
m_ActionActiveVariables
protected FlowEditorAction m_ActionActiveVariables
the "variables" action.
-
m_ActionActiveStorage
protected FlowEditorAction m_ActionActiveStorage
the "storage" action.
-
m_ActionActiveHeadless
protected FlowEditorAction m_ActionActiveHeadless
the "headless" action.
-
m_ActionActiveGC
protected FlowEditorAction m_ActionActiveGC
the "gc" action.
-
m_ActionActiveValidateSetup
protected FlowEditorAction m_ActionActiveValidateSetup
the "check setup" action.
-
m_ActionActiveRun
protected FlowEditorAction m_ActionActiveRun
the "run" action.
-
m_ActionActiveDebug
protected FlowEditorAction m_ActionActiveDebug
the "run (debug)" action.
-
m_ActionActivePauseAndResume
protected FlowEditorAction m_ActionActivePauseAndResume
the "pause" action.
-
m_ActionActiveStop
protected FlowEditorAction m_ActionActiveStop
the "stop" action.
-
m_ActionActiveKill
protected FlowEditorAction m_ActionActiveKill
the "kill" action.
-
m_ActionActiveDisplayErrors
protected FlowEditorAction m_ActionActiveDisplayErrors
the "display errors" action.
-
m_ActionActiveClearGraphicalOutput
protected FlowEditorAction m_ActionActiveClearGraphicalOutput
the "Clear graphical output" action.
-
m_ActionViewShowToolbar
protected FlowEditorAction m_ActionViewShowToolbar
the "show toolbar" action.
-
m_ActionViewShowQuickInfo
protected FlowEditorAction m_ActionViewShowQuickInfo
the "show quick info" action.
-
m_ActionViewShowAnnotations
protected FlowEditorAction m_ActionViewShowAnnotations
the "show annotations" action.
-
m_ActionViewShowInputOutput
protected FlowEditorAction m_ActionViewShowInputOutput
the "show input/output" action.
-
m_ActionViewShowSource
protected FlowEditorAction m_ActionViewShowSource
the "show source" action.
-
m_ActionViewFullExpansion
protected FlowEditorAction m_ActionViewFullExpansion
the "full expansion" action.
-
m_ActionViewStatistics
protected FlowEditorAction m_ActionViewStatistics
the "statistic" action.
-
m_ActionViewRedraw
protected FlowEditorAction m_ActionViewRedraw
the "redraw" action.
-
m_ActionViewZoom
protected FlowEditorAction m_ActionViewZoom
the "zoom" action.
-
m_ActionNewWindow
protected FlowEditorAction m_ActionNewWindow
the "new window" action.
-
m_ActionMoveToNewWindow
protected FlowEditorAction m_ActionMoveToNewWindow
the "move to new window" action.
-
m_ActionDuplicateTabInNewWindow
protected FlowEditorAction m_ActionDuplicateTabInNewWindow
the "duplicate tab in new window" action.
-
m_ActionHalfWidth
protected FlowEditorAction m_ActionHalfWidth
the "half width" action.
-
m_ActionHalfHeight
protected FlowEditorAction m_ActionHalfHeight
the "half height" action.
-
m_ActionDuplicateTab
protected FlowEditorAction m_ActionDuplicateTab
the "duplicate tab" action.
-
m_ActionHelpActors
protected FlowEditorAction m_ActionHelpActors
the "help actors" action.
-
m_ActionHelpClasses
protected FlowEditorAction m_ActionHelpClasses
the "help classes" action.
-
m_ActionHelpVariables
protected FlowEditorAction m_ActionHelpVariables
the "help variables" action.
-
m_ActionHelpBooleanExpression
protected FlowEditorAction m_ActionHelpBooleanExpression
the "help boolean expression" action.
-
m_ActionHelpMathematicalExpression
protected FlowEditorAction m_ActionHelpMathematicalExpression
the "help math expression" action.
-
m_ActionHelpStringExpression
protected FlowEditorAction m_ActionHelpStringExpression
the "help string expression" action.
-
m_MenuItems
protected List<FlowEditorAction> m_MenuItems
menu items.
-
m_AdditionalMenuItems
protected List<AbstractFlowEditorMenuItem> m_AdditionalMenuItems
additional menu items.
-
m_FileChooser
protected FlowFileChooser m_FileChooser
the filedialog for loading/saving flows.
-
m_StatusBar
protected BaseStatusBar m_StatusBar
the status.
-
m_RecentFilesHandler
protected RecentFilesHandlerWithCommandline<JMenu> m_RecentFilesHandler
the recent files handler.
-
m_FilenameProposer
protected FilenameProposer m_FilenameProposer
for proposing filenames for new flows.
-
m_SplitPane
protected BaseSplitPane m_SplitPane
the split pane for displaying flow and tabs.
-
m_FlowPanels
protected FlowMultiPagePane m_FlowPanels
the tabbedpane for the flow panels.
-
m_Tabs
protected FlowTabManager m_Tabs
the tabbedpane for the tabs.
-
m_PreferredToolBarLocation
protected ToolBarPanel.ToolBarLocation m_PreferredToolBarLocation
the default toolbar location to use.
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the members.- Overrides:
initializein classToolBarPanel
-
initGUI
protected void initGUI()
Initializes the widgets.- Overrides:
initGUIin classToolBarPanel
-
initActions
protected void initActions()
Initializes the actions.- Specified by:
initActionsin classToolBarPanel- See Also:
AbstractBaseAction
-
initToolBar
protected void initToolBar()
Initializes the toolbar.- Specified by:
initToolBarin classToolBarPanel- See Also:
ToolBarPanel.initActions()
-
addAdditionalMenuitems
protected void addAdditionalMenuitems()
Adds the additional menu items to the menubar.
-
getMenuBar
public JMenuBar getMenuBar()
Creates a menu bar (singleton per panel object). Can be used in frames.- Specified by:
getMenuBarin interfaceMenuBarProvider- Returns:
- the menu bar
-
getTabs
public FlowTabManager getTabs()
Returns the tab manager.- Returns:
- the tabs
-
getFlowPanels
public FlowMultiPagePane getFlowPanels()
Returns the flow panels.- Returns:
- the flow panels
-
updateActions
public void updateActions()
updates the enabled state of the menu items.- Specified by:
updateActionsin 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.
-
checkForModified
public boolean checkForModified()
Returns whether we can proceed with the operation or not, depending on whether the user saved the flow or discarded the changes.- Returns:
- true if safe to proceed
-
checkForModified
public boolean checkForModified(FlowPanel panel)
Returns whether we can proceed with the operation or not, depending on whether the user saved the flow or discarded the changes.- Returns:
- true if safe to proceed
-
getFileChooser
public FlowFileChooser getFileChooser()
Returns the filechooser in use.- Returns:
- the filechooser
-
newFlow
protected void newFlow(Actor actor)
Adds new panel with the specified actor.- Parameters:
actor- the actor to display in the new panel
-
setCurrentFile
public 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
-
getReaderForFile
public FlowReader getReaderForFile(File file)
Returns the reader for the file.- Parameters:
file- the file to get a reader for- Returns:
- the suggested reader (based on file ext)
-
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
-
setCurrentFlow
public void setCurrentFlow(Actor flow)
Sets the flow to work on.- Parameters:
flow- the flow to use
-
hasCurrentPanel
public boolean hasCurrentPanel()
Returns whether a flow panel is available.- Returns:
- true if flow panel available
-
getCurrentPanel
public FlowPanel getCurrentPanel()
Returns the current flow panel.- Returns:
- the current flow panel, null if not available
-
hasActivePanel
public boolean hasActivePanel()
Returns whether an active panel is set.- Returns:
- true if active panel set
-
getActivePanel
public FlowPanel getActivePanel()
Returns the active panel (if any).- Returns:
- the active panel, null if not set
-
getCurrentRoot
public Actor getCurrentRoot()
Returns the current root actor without its children.- Returns:
- the current root, null if not available
- See Also:
getCurrentFlow()
-
getActiveRoot
public Actor getActiveRoot()
Returns the active root actor without its children.- Returns:
- the active root, null if not available
- See Also:
getActiveFlow()
-
getCurrentFlow
public Actor getCurrentFlow()
Returns the current flow.
WARNING: Recreates an actor hierarchy based on the tree. Method gets very slow for large flows. If you only need the root actor, then use getCurrentRoot() instead.- Returns:
- the current flow, null if not available
-
getCurrentFlow
public Actor getCurrentFlow(StringBuilder errors)
Returns the current flow.
WARNING: Recreates an actor hierarchy based on the tree. Method gets very slow for large flows. If you only need the root actor, then use getCurrentRoot() instead.- Parameters:
errors- for storing errors, use null to ignore- Returns:
- the current flow, null if not available
-
getActiveFlow
public Actor getActiveFlow()
Returns the active flow.
WARNING: Recreates an actor hierarchy based on the tree. Method gets very slow for large flows. If you only need the root actor, then use getActiveRoot() instead.- Returns:
- the active flow, null if not available
-
getActiveFlow
public Actor getActiveFlow(StringBuilder errors)
Returns the active flow.
WARNING: Recreates an actor hierarchy based on the tree. Method gets very slow for large flows. If you only need the root actor, then use getActiveRoot() instead.- Parameters:
errors- for storing errors, use null to ignore- Returns:
- the active flow, null if not available
-
getRunningFlow
public Actor getRunningFlow()
Returns the currently running flow.- Returns:
- the currently running flow, null if not available
-
getLastFlow
public Actor getLastFlow()
Returns the last flow executed (currently selected flow).- Returns:
- the last executed flow, null if not available
-
setModified
public void setModified(boolean value)
Sets whether the flow is modified or not.- Parameters:
value- true if the flow is to be flagged as modified
-
isModified
public boolean isModified()
Returns whether the flow is flagged as modified.- Returns:
- true if the flow is modified
-
newTab
public void newTab()
Adds a new tab.
-
open
public void open()
Opens a flow.
-
revert
protected void revert()
Reverts a flow.
-
save
public void save()
Saves the flow.
-
saveAs
public void saveAs()
Saves the 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
-
isAnyRunning
public boolean isAnyRunning()
Returns whether any flow is currently running.- Returns:
- true if at least one 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
-
isAnyStopping
public boolean isAnyStopping()
Returns whether any flow is currently stopping.- Returns:
- true if at least one flow is being stopped
-
isPaused
public boolean isPaused()
Returns whether the current flow is paused.- Returns:
- true if flow is paused
-
isAnyPaused
public boolean isAnyPaused()
Returns whether any flow is currently paused.- Returns:
- true if at least one flow is paused
-
isSwingWorkerRunning
public boolean isSwingWorkerRunning()
Returns whether a swing worker is currently running.- Returns:
- true if a swing worker is being executed
-
isAnySwingWorkerRunning
public boolean isAnySwingWorkerRunning()
Returns whether any swing worker is currently running.- Returns:
- true if at least one swing worker is being executed
-
stop
public void stop()
Stops the flow.
-
kill
public void kill()
Kills the flow.
-
cleanUp
public void cleanUp()
Cleans up the last flow that was run.
-
setVisibleAgain
protected void setVisibleAgain()
Used by the close() method to re-display the flow, in case the flow cannot or should not be closed after all.- See Also:
close()
-
close
public void close()
Closes the dialog or frame. But only if no flows are running, being stopped or are modified (in the latter, the user can choose to save the flow).
-
newWindow
public FlowEditorPanel newWindow()
Displays a new flow editor window/frame.- Returns:
- the new editor panel
-
newWindow
public FlowEditorPanel newWindow(Actor actor)
Displays a new flow editor window/frame with the specified actor.- Parameters:
actor- the actor to display, use null to ignore- Returns:
- the new editor panel
-
showMessage
protected void showMessage()
Displays the message in the status bar in a separate dialog.
-
showMessage
protected void showMessage(String msg, boolean isError)
Displays the given message in a separate dialog.- Parameters:
msg- the message to displayisError- whether it is an error message
-
showStatus
public void showStatus(String msg)
Displays a message.- Specified by:
showStatusin interfaceStatusMessageHandler- Parameters:
msg- the message to display
-
showStatus
public void showStatus(boolean left, String msg)Displays a message.- Specified by:
showStatusin interfaceStatusMessageHandlerExt- Parameters:
left- whether to show the message on the left or rightmsg- the message to display
-
undoOccurred
public void undoOccurred(UndoEvent e)
An undo event occurred.- Parameters:
e- the event
-
setCurrentDirectory
public void setCurrentDirectory(File value)
Sets the current directory in the FileChooser use for opening flows.- Parameters:
value- 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
-
grabFocus
public void grabFocus()
Requests that this Component get the input focus, and that this Component's top-level ancestor become the focused Window. This component must be displayable, visible, and focusable for the request to be granted.- Overrides:
grabFocusin classJComponent
-
refreshTabs
public void refreshTabs()
Refreshes the tabs.
-
getCurrentTree
public Tree getCurrentTree()
Returns the tree.- Returns:
- the tree, null if none available
-
getRecentFilesHandler
public RecentFilesHandlerWithCommandline<JMenu> getRecentFilesHandler()
Returns the recent files handler in use.- Returns:
- the handler
-
getSendToClasses
public Class[] getSendToClasses()
Returns the classes that the supporter generates.- Specified by:
getSendToClassesin interfaceSendToActionSupporter- Returns:
- the classes
-
hasSendToItem
public boolean hasSendToItem(Class[] cls)
Checks whether something to send is available.- Specified by:
hasSendToItemin interfaceSendToActionSupporter- Parameters:
cls- the classes to retrieve the item for- Returns:
- true if an object is available for sending
-
getSendToItem
public Object getSendToItem(Class[] cls)
Returns the object to send.- Specified by:
getSendToItemin interfaceSendToActionSupporter- Parameters:
cls- the classes to retrieve the item for- Returns:
- the item to send
-
customizePopupMenu
public void customizePopupMenu(BaseStatusBar source, boolean left, JPopupMenu menu)
For customizing the popup menu.- Specified by:
customizePopupMenuin interfaceBaseStatusBar.PopupMenuCustomizer- Parameters:
source- the source statusbarleft- whether left or right statusmenu- the menu to customize
-
getPreferredToolBarLocation
public ToolBarPanel.ToolBarLocation getPreferredToolBarLocation()
Returns the preferred toolbar location.- Returns:
- the location
-
addRecentActorProcessor
public void addRecentActorProcessor(ActorProcessor processor)
For adding an actor processor to the recent list.- Parameters:
processor- the processor to add
-
getPropertiesEditor
public static Properties getPropertiesEditor()
Returns the properties that define the editor.- Returns:
- the properties
-
getPropertiesMenu
public static Properties getPropertiesMenu()
Returns the properties that define the menu in the editor.- Returns:
- the properties
-
getPropertiesTreePopup
public static Properties getPropertiesTreePopup()
Returns the properties for the tree popup menu.- Returns:
- the properties
-
getPropertiesTreeQuickAction
public static Properties getPropertiesTreeQuickAction()
Returns the properties for the tree quick action menu.- Returns:
- the properties
-
-