public class ALDGrappaWorkbenchTab extends com.mxgraph.swing.mxGraphComponent implements ALDWorkflowEventListener
Modifier and Type | Class and Description |
---|---|
protected class |
ALDGrappaWorkbenchTab.ContextMenuGraph
Context menu for whole workbench.
|
protected class |
ALDGrappaWorkbenchTab.ContextMenuNodeEdge
Context menu for nodes and edges within a workflow.
|
protected class |
ALDGrappaWorkbenchTab.GraphEventListener
Event handler for mxGraph events.
|
protected class |
ALDGrappaWorkbenchTab.GraphKeyListener |
protected class |
ALDGrappaWorkbenchTab.GraphMouseAdapter
MouseListener for the workbench.
|
protected class |
ALDGrappaWorkbenchTab.ParameterUpdateListener
Class to handle parameter update events triggered configuration windows.
|
protected class |
ALDGrappaWorkbenchTab.WorkflowModifyAction |
com.mxgraph.swing.mxGraphComponent.mxGraphControl, com.mxgraph.swing.mxGraphComponent.mxMouseRedirector
JScrollPane.AccessibleJScrollPane, JScrollPane.ScrollBar
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
protected HashMap<ALDWorkflowID,ALDGrappaWorkbenchTab.WorkflowModifyAction> |
actionsOnWorkflow
List of actions performed on the Alida workflow object.
|
protected ALDWorkflow |
alidaWorkflow
Reference to the underlying Alida workflow object.
|
protected HashMap<com.mxgraph.model.mxCell,ALDOperatorConfigurationFrame> |
configWindows
Map of node cells and their corresponding configuration windows.
|
protected boolean |
debug
for debug message to stdout
|
protected HashMap<com.mxgraph.model.mxCell,ALDWorkflowEdgeID> |
graphEdgeIDs
Map of edge cells and their corresponding Alida workflow IDs.
|
protected HashMap<ALDWorkflowEdgeID,com.mxgraph.model.mxCell> |
graphEdges
Map of Alida workflow IDs and their corresponding edge cells.
|
protected HashMap<com.mxgraph.model.mxCell,ALDWorkflowNodeID> |
graphNodeIDs
Map of node cells and their corresponding Alida workflow IDs.
|
protected HashMap<ALDWorkflowNodeID,com.mxgraph.model.mxCell> |
graphNodes
Map of Alida workflow IDs and their corresponding node cells.
|
protected JFrame |
interruptWin
Message window shown while workflow execution is aborted.
|
private static org.slf4j.Logger |
logger
Slf4j logger.
|
protected HashMap<com.mxgraph.model.mxCell,Boolean> |
nodeConfigShowAllParameters
Map of window configurations for parameter display.
|
protected HashMap<com.mxgraph.model.mxCell,Boolean> |
nodeConfigShowResultsAtOnce
Map of flags for immediately showing node results.
|
private HashMap<String,Integer> |
nodeNameCountMap
Map to count nodes of an operator type and allow for unique labels.
|
protected boolean |
popupFinalResults
Flag to enable/disable automatic pop-up of results at terminal nodes.
|
protected ALDGrappaWorkbench |
workBench
Reference to the surrounding work bench object.
|
protected String |
workflowTitle
Title of this workflow as shown on the tab.
|
antiAlias, autoExtend, autoScroll, backgroundImage, canvas, cellEditor, centerPage, centerZoom, collapsedIcon, components, connectionHandler, DEFAULT_COLLAPSED_ICON, DEFAULT_EXPANDED_ICON, DEFAULT_PAGESCALE, DEFAULT_WARNING_ICON, dragEnabled, enterStopsCellEditing, escapeEnabled, eventSource, expandedIcon, exportEnabled, foldingEnabled, graph, graphControl, graphHandler, GRID_STYLE_CROSS, GRID_STYLE_DASHED, GRID_STYLE_DOT, GRID_STYLE_LINE, gridColor, gridStyle, gridVisible, horizontalPageCount, importEnabled, invokesStopCellEditing, keepSelectionVisibleOnZoom, overlays, pageBackgroundColor, pageBorderColor, pageBreakColor, pageBreaksVisible, pageFormat, pageScale, pageShadowColor, pageVisible, panningHandler, preferPageSize, previewAlpha, repaintHandler, scaleHandler, selectionCellsHandler, showDirtyRectangle, swimlaneSelectionEnabled, textAntiAlias, tolerance, transparentSwimlaneContent, tripleBuffer, tripleBuffered, tripleBufferGraphics, updateHandler, verticalPageCount, viewChangeHandler, warningIcon, ZOOM_POLICY_NONE, ZOOM_POLICY_PAGE, ZOOM_POLICY_WIDTH, zoomFactor, zoomPolicy
columnHeader, horizontalScrollBar, horizontalScrollBarPolicy, lowerLeft, lowerRight, rowHeader, upperLeft, upperRight, verticalScrollBar, verticalScrollBarPolicy, viewport
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
NO_SUCH_PAGE, PAGE_EXISTS
COLUMN_HEADER, HORIZONTAL_SCROLLBAR, HORIZONTAL_SCROLLBAR_ALWAYS, HORIZONTAL_SCROLLBAR_AS_NEEDED, HORIZONTAL_SCROLLBAR_NEVER, HORIZONTAL_SCROLLBAR_POLICY, LOWER_LEADING_CORNER, LOWER_LEFT_CORNER, LOWER_RIGHT_CORNER, LOWER_TRAILING_CORNER, ROW_HEADER, UPPER_LEADING_CORNER, UPPER_LEFT_CORNER, UPPER_RIGHT_CORNER, UPPER_TRAILING_CORNER, VERTICAL_SCROLLBAR, VERTICAL_SCROLLBAR_ALWAYS, VERTICAL_SCROLLBAR_AS_NEEDED, VERTICAL_SCROLLBAR_NEVER, VERTICAL_SCROLLBAR_POLICY, VIEWPORT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
ALDGrappaWorkbenchTab(ALDGrappaWorkbench bench,
ALDGrappaWorkbenchGraph _graph)
Default constructor.
|
ALDGrappaWorkbenchTab(ALDGrappaWorkbench bench,
com.mxgraph.view.mxGraph _graph,
ALDWorkflow _flow)
Constructor to setup tab from given (reloaded) workflow.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addPortsToNode(ALDOperator op,
com.mxgraph.model.mxCell v)
Adds the ports of the operator's parameters to the given node.
|
protected void |
copyWorkflowNodeLinksOnly(ALDOperator srcOp,
com.mxgraph.model.mxCell srcNode,
ALDOperator newOp,
int posX,
int posY)
Copies only the links of a workflow node to a new node of same type.
|
protected void |
createNewWorkflowEdge(com.mxgraph.model.mxCell edge,
ALDWorkflowNodeID sourceNodeID,
ALDGrappaNodePortInfo sourcePort,
ALDWorkflowNodeID targetNodeID,
ALDGrappaNodePortInfo targetPort)
Adds a new edge object to the graph.
|
protected void |
createNewWorkflowNode(ALDOperatorLocation loc,
int posX,
int posY)
Creates a new workflow node.
|
protected ALDOperatorConfigurationFrame |
getNewConfigWin(ALDOperator op,
ALDGrappaWorkbenchTab.ParameterUpdateListener pListen)
Generate a new configuration window.
|
protected static String |
getNodeStyleString(String color)
Method to properly format node style string.
|
String |
getTooltipText(Object cell)
Function to return tooltip text for a cell.
|
String |
getWorkflowTitle()
Returns the workflow title.
|
protected void |
handleAddNodeEvent(ALDOperator op,
ALDWorkflowNodeID id,
int posX,
int posY)
Adds a node to the workflow graph.
|
void |
handleALDWorkflowEvent(ALDWorkflowEvent event)
Method which is called on event occurrence.
|
protected void |
handleNodeParameterChangeEvent(Collection<ALDWorkflowNodeID> idList)
Update node's configuration window according to parameter status.
|
protected void |
handleNodeStateChangeEvent(HashMap<ALDWorkflowNodeID,ALDWorkflowNode.ALDWorkflowNodeState> idList)
Update node color according to node's state.
|
protected void |
handleSaveWorkflowEvent(String file)
Stores the workflow to the given file.
|
protected void |
handleShowResultsEvent(ALDWorkflowNodeID nodeID)
Displays result frame for given node.
|
protected void |
initInterruptWin()
Setup of the window for renaming workflows.
|
private void |
initNodeNameCountMap()
Initialize node name count map on reload of workflow.
|
void |
interruptExecution()
Aborts running execution of the workflow.
|
protected void |
processWorkflowEventQueue()
Processes all events that were recently added to the queue.
|
void |
quit()
Does clean-up on termination, i.e. closes all open windows.
|
protected void |
redirectWorkflowEdge(com.mxgraph.model.mxCell edge,
ALDWorkflowEdgeID id,
ALDWorkflowNodeID sourceNodeID,
ALDWorkflowNodeID targetNodeID,
ALDGrappaNodePortInfo sourcePort,
ALDGrappaNodePortInfo targetPort)
Redirects the workflow edge.
|
protected void |
removeWorkflowEdge(com.mxgraph.model.mxCell edge)
Removes the specified edge from the workflow.
|
protected void |
removeWorkflowNode(com.mxgraph.model.mxCell node)
Removes the specified cell from the graph.
|
protected void |
restoreConfigWins()
Instantiates for each node in the current workflow a configuration window.
|
protected void |
restoreIDs()
Restore maps of Alida workflow IDs and corresponding graph cells.
|
void |
runWorkflow()
Executes the complete workflow, i.e. all nodes currently present.
|
void |
runWorkflowFromNode(ALDWorkflowNodeID nodeID)
Executes the workflow from the specified node to the end.
|
void |
runWorkflowNode(ALDWorkflowNodeID nodeID)
Executes the workflow up to the specified node.
|
void |
saveWorkflow(File file)
Saves the workflow to the given file.
|
protected void |
setWorkflowNodeViewMode(com.mxgraph.model.mxCell cell,
Parameter.ExpertMode mode)
Switches the mode for displaying parameters of a node.
|
void |
setWorkflowTitle(String newTitle)
Changes the workflow title.
|
private static Collection<String> |
sortHash(HashMap<Integer,Vector<ALDOpParameterDescriptor>> hash)
Sorts the items for each key alpha-numerically.
|
private static Collection<String> |
sortParamsByIOOrder(ALDOperator op,
Collection<String> params)
Sorts a set of parameters according to category and I/O order.
|
private void |
updateWorkflowNodeStates()
Checks the states of all nodes and updates their color.
|
boolean |
workflowHasNodes()
Check if the workflow is empty.
|
addCellOverlay, addListener, canExportCell, canImportCell, checkTripleBuffer, clearCellOverlays, clearCellOverlays, createCanvas, createCellEditor, createComponents, createConnectionHandler, createGraphControl, createGraphHandler, createHandler, createHandlers, createPanningHandler, createSelectionCellsHandler, createTransferHandler, createTripleBuffer, destroyTripleBuffer, escape, getBackgroundImage, getCanvas, getCellAt, getCellAt, getCellAt, getCellEditor, getCellOverlays, getCells, getCells, getConnectionHandler, getEditingValue, getExportableCells, getFoldingIcon, getFoldingIconBounds, getGraph, getGraphControl, getGraphHandler, getGridColor, getGridStyle, getHorizontalPageBorder, getHorizontalPageCount, getImportableCells, getLayoutAreaSize, getPageBackgroundColor, getPageBorderColor, getPageBreakColor, getPageFormat, getPageScale, getPageShadowColor, getPageTranslate, getPanningHandler, getPointForEvent, getPointForEvent, getPreferredSizeForPage, getPreviewAlpha, getScaledPreferredSizeForGraph, getSelectionCellsHandler, getTolerance, getTripleBuffer, getVerticalPageBorder, getVerticalPageCount, getZoomFactor, getZoomPolicy, hitFoldingIcon, importCells, insertComponent, installDoubleClickHandler, installFocusHandler, installKeyHandler, installResizeHandler, isAntiAlias, isAutoExtend, isAutoScroll, isCenterPage, isCenterZoom, isCloneEvent, isConnectable, isConstrainedEvent, isDragEnabled, isEditEvent, isEditing, isEnterStopsCellEditing, isEscapeEnabled, isEventsEnabled, isExportEnabled, isFoldingEnabled, isForceMarqueeEvent, isForceTripleBuffered, isGridEnabledEvent, isGridVisible, isImportEnabled, isInvokesStopCellEditing, isKeepSelectionVisibleOnZoom, isPageBreaksVisible, isPageVisible, isPanning, isPanningEvent, isPreferPageSize, isSignificant, isSwimlaneSelectionEnabled, isTextAntiAlias, isToggleEvent, isTripleBuffered, labelChanged, maintainScrollBar, paintBackground, paintBackgroundImage, paintBackgroundPage, paintGrid, print, redraw, refresh, removeAllComponents, removeAllOverlays, removeCellOverlay, removeCellOverlayComponent, removeCellOverlays, removeComponent, removeListener, removeListener, repaintTripleBuffer, scrollCellToVisible, scrollCellToVisible, scrollToCenter, selectCellForEvent, selectCellsForEvent, selectRegion, setAntiAlias, setAutoExtend, setAutoScroll, setBackgroundImage, setCellEditor, setCellWarning, setCellWarning, setCellWarning, setCenterPage, setCenterZoom, setConnectable, setDragEnabled, setEnterStopsCellEditing, setEscapeEnabled, setEventsEnabled, setExportEnabled, setFoldingEnabled, setGraph, setGridColor, setGridStyle, setGridVisible, setHorizontalPageCount, setImportEnabled, setInvokesStopCellEditing, setKeepSelectionVisibleOnZoom, setPageBackgroundColor, setPageBorderColor, setPageBreakColor, setPageBreaksVisible, setPageFormat, setPageScale, setPageShadowColor, setPageVisible, setPanning, setPreferPageSize, setPreviewAlpha, setSwimlaneSelectionEnabled, setTextAntiAlias, setTolerance, setToolTips, setTripleBuffered, setVerticalPageCount, setZoomFactor, setZoomPolicy, snapScaledPoint, snapScaledPoint, startEditing, startEditingAtCell, startEditingAtCell, stopEditing, updateCellOverlayComponent, updateCellOverlays, updateComponent, updateComponents, updateComponents, validateGraph, validateGraph, zoom, zoom, zoomActual, zoomAndCenter, zoomIn, zoomOut, zoomTo
createHorizontalScrollBar, createVerticalScrollBar, createViewport, getAccessibleContext, getColumnHeader, getCorner, getHorizontalScrollBar, getHorizontalScrollBarPolicy, getRowHeader, getUI, getUIClassID, getVerticalScrollBar, getVerticalScrollBarPolicy, getViewport, getViewportBorder, getViewportBorderBounds, isValidateRoot, isWheelScrollingEnabled, paramString, setColumnHeader, setColumnHeaderView, setComponentOrientation, setCorner, setHorizontalScrollBar, setHorizontalScrollBarPolicy, setLayout, setRowHeader, setRowHeaderView, setUI, setVerticalScrollBar, setVerticalScrollBarPolicy, setViewport, setViewportBorder, setViewportView, setWheelScrollingEnabled, updateUI
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, 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, setVisible, unregisterKeyboardAction, update
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, transferFocusDownCycle, validate, validateTree
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, getPeer, 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, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
private static org.slf4j.Logger logger
protected ALDGrappaWorkbench workBench
protected ALDWorkflow alidaWorkflow
protected HashMap<com.mxgraph.model.mxCell,ALDWorkflowNodeID> graphNodeIDs
protected HashMap<ALDWorkflowNodeID,com.mxgraph.model.mxCell> graphNodes
protected HashMap<com.mxgraph.model.mxCell,ALDWorkflowEdgeID> graphEdgeIDs
protected HashMap<ALDWorkflowEdgeID,com.mxgraph.model.mxCell> graphEdges
protected HashMap<com.mxgraph.model.mxCell,ALDOperatorConfigurationFrame> configWindows
protected HashMap<com.mxgraph.model.mxCell,Boolean> nodeConfigShowAllParameters
This map stores for each node of the workflow the setting of the boolean option for displaying all or only the non-expert parameters. If the value of an entry is true, all parameters are to be shown, if it is false, only standard parameters are visible.
The values stored in this hashmap are mainly used during the
creation of menus of type ALDGrappaWorkbenchTab.ContextMenuNodeEdge
.
protected HashMap<com.mxgraph.model.mxCell,Boolean> nodeConfigShowResultsAtOnce
The values stored in this hashmap are updated by
menus of type ALDGrappaWorkbenchTab.ContextMenuNodeEdge
.
protected String workflowTitle
protected boolean popupFinalResults
private HashMap<String,Integer> nodeNameCountMap
protected HashMap<ALDWorkflowID,ALDGrappaWorkbenchTab.WorkflowModifyAction> actionsOnWorkflow
protected JFrame interruptWin
protected boolean debug
public ALDGrappaWorkbenchTab(ALDGrappaWorkbench bench, ALDGrappaWorkbenchGraph _graph)
bench
- Workbench to which this tab is to be attached._graph
- Workbench graph associated with this workflow.public ALDGrappaWorkbenchTab(ALDGrappaWorkbench bench, com.mxgraph.view.mxGraph _graph, ALDWorkflow _flow)
bench
- Workbench to which this tab is to be attached._graph
- Workbench graph associated with this workflow._flow
- Alida workflow associated with this tab.protected void initInterruptWin()
protected void restoreIDs()
protected void restoreConfigWins()
private void updateWorkflowNodeStates()
private void initNodeNameCountMap()
protected void setWorkflowNodeViewMode(com.mxgraph.model.mxCell cell, Parameter.ExpertMode mode)
cell
- Graph cell/node for which mode is to be set.mode
- Mode to set.public void setWorkflowTitle(String newTitle)
newTitle
- New title of the workflow.public String getWorkflowTitle()
public void runWorkflow()
public void runWorkflowNode(ALDWorkflowNodeID nodeID)
nodeID
- ID of node where to stop execution.public void runWorkflowFromNode(ALDWorkflowNodeID nodeID)
nodeID
- ID of node where to start execution.public void interruptExecution()
public void saveWorkflow(File file)
file
- File where to save the workflow.public String getTooltipText(Object cell)
cell
- Cell for which tooltip is requested.public boolean workflowHasNodes()
public void quit()
protected void createNewWorkflowNode(ALDOperatorLocation loc, int posX, int posY)
loc
- Location data of the underlying operator.posX
- x position where to place the new node.posY
- y position where to place the new node.protected void copyWorkflowNodeLinksOnly(ALDOperator srcOp, com.mxgraph.model.mxCell srcNode, ALDOperator newOp, int posX, int posY)
srcOp
- Source node operator which is to be copied.srcNode
- Source node to be copied.newOp
- New operator instantiated from source operator.posX
- x position where to place the new node.posY
- y position where to place the new node.protected void createNewWorkflowEdge(com.mxgraph.model.mxCell edge, ALDWorkflowNodeID sourceNodeID, ALDGrappaNodePortInfo sourcePort, ALDWorkflowNodeID targetNodeID, ALDGrappaNodePortInfo targetPort)
Note that according to the event handling of the GUI the edge object has already been inserted into the graph data structure when this function is called. Accordingly this function mainly checks if the insertion was correct, and if not, removes the formerly inserted edge.
edge
- Edge object recently inserted.sourceNodeID
- ID of source node.sourcePort
- Name of source port.targetNodeID
- ID of target node.targetPort
- Name of target port.protected void removeWorkflowNode(com.mxgraph.model.mxCell node)
node
- Node cell to remove.protected void removeWorkflowEdge(com.mxgraph.model.mxCell edge)
edge
- Edge cell to remove.protected void redirectWorkflowEdge(com.mxgraph.model.mxCell edge, ALDWorkflowEdgeID id, ALDWorkflowNodeID sourceNodeID, ALDWorkflowNodeID targetNodeID, ALDGrappaNodePortInfo sourcePort, ALDGrappaNodePortInfo targetPort)
Note that due to the event handling of the GUI the edge redirect was already done when this function is called. Thus, this function mainly verifies the redirect and restores the old edge in case of failure.
edge
- Edge cell that was redirected.id
- Workflow ID of edge.sourceNodeID
- Current ID of edge source node.targetNodeID
- Current ID of edge target node.sourcePort
- Current source parameter name.targetPort
- Current target parameter name.protected void processWorkflowEventQueue()
Note that this function needs to be called after all actions on the Alida workflow except calls to 'run' methods.
public void handleALDWorkflowEvent(ALDWorkflowEvent event)
ALDWorkflowEventListener
handleALDWorkflowEvent
in interface ALDWorkflowEventListener
event
- Event to be handled.protected void handleAddNodeEvent(ALDOperator op, ALDWorkflowNodeID id, int posX, int posY)
op
- Operator associated with the node.id
- Node ID.posX
- X-Position of the new node.posY
- Y-Position of the new node.protected void handleNodeParameterChangeEvent(Collection<ALDWorkflowNodeID> idList)
idList
- List of nodes that are to be updated.protected void handleNodeStateChangeEvent(HashMap<ALDWorkflowNodeID,ALDWorkflowNode.ALDWorkflowNodeState> idList)
idList
- List of nodes that are to be updated.protected void handleSaveWorkflowEvent(String file)
file
- File where to save the workflow.protected void handleShowResultsEvent(ALDWorkflowNodeID nodeID)
nodeID
- Node for which results are to be displayed.protected ALDOperatorConfigurationFrame getNewConfigWin(ALDOperator op, ALDGrappaWorkbenchTab.ParameterUpdateListener pListen) throws ALDOperatorException
Is to be overwritten by subclasses.
op
- Operator for which window is requested.pListen
- Parameter update listener to attach to window.ALDOperatorException
- Thrown in case of failure.protected static String getNodeStyleString(String color)
color
- Color of node boundary.protected void addPortsToNode(ALDOperator op, com.mxgraph.model.mxCell v) throws ALDOperatorException
op
- Operator linked to the node.v
- Node to which the ports are to be added.ALDOperatorException
- Thrown in case of failure.private static Collection<String> sortParamsByIOOrder(ALDOperator op, Collection<String> params) throws ALDOperatorException
The parameters are first split-up into required, optional and supplemental parameters. Subsequently each subset is sorted according to the parameters' data I/O order. Finally all sorted subsets are concatenated and returned in a single collection.
op
- Operator to which the parameters belong.params
- Set of parameters to sort.ALDOperatorException
- Thrown in case of failure.private static Collection<String> sortHash(HashMap<Integer,Vector<ALDOpParameterDescriptor>> hash)
As result the sorted lists for all hash keys are concatenated according to the ascending order of their key values.
hash
- Input hashmap to sort.Copyright © 2010–2021 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.