de.unihalle.informatik.Alida.grappa
Class ALDGrappaWorkbench

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JTabbedPane
                  extended by de.unihalle.informatik.Alida.grappa.ALDGrappaWorkbench
All Implemented Interfaces:
ALDWorkflowClassEventListener, java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.SwingConstants

public class ALDGrappaWorkbench
extends javax.swing.JTabbedPane
implements java.awt.event.ActionListener, ALDWorkflowClassEventListener

Main frame of Grappa.

Author:
Birgit Moeller
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JTabbedPane
javax.swing.JTabbedPane.AccessibleJTabbedPane, javax.swing.JTabbedPane.ModelListener
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  java.io.File lastLoadFilePath
           
protected  java.io.File lastSaveFilePath
           
protected  ALDGrappaFrame mainFrame
           
protected  javax.swing.JTextField renameTextField
           
protected  javax.swing.JFrame renameWin
           
protected  java.util.LinkedList<ALDGrappaWorkbenchTab> workflows
          List of workflows currently managed.
 
Fields inherited from class javax.swing.JTabbedPane
changeEvent, changeListener, model, SCROLL_TAB_LAYOUT, tabPlacement, WRAP_TAB_LAYOUT
 
Fields inherited from class javax.swing.JComponent
accessibleContext, 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
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ALDGrappaWorkbench(ALDGrappaFrame frame)
          Default constructor
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 boolean addNewWorkflow()
          Adds a new workflow (tab) to the workbench.
 void addNodeToWorkflow(ALDOperatorLocation opNamePath)
           
 void clearTreeSelection()
           
 java.lang.String getWorkflowName()
          Returns name of currently active workflow.
 void handleALDWorkflowClassEvent(ALDWorkflowClassEvent event)
          Method which is called on event occurrence.
protected  void handleLoadWorkflowEvent(ALDWorkflowClassEvent event)
           
protected  void handleWorkflowRenameEvent(java.lang.String newName)
           
protected  ALDGrappaWorkbenchTab initNewTab(ALDGrappaWorkbenchGraph graph)
           
protected  boolean initNewWorkflow()
           
protected  boolean initNewWorkflow(ALDGrappaWorkbenchGraph graph)
           
protected  ALDGrappaWorkbenchTab initReloadedTab(com.mxgraph.view.mxGraph _graph, ALDWorkflow _flow)
           
protected  void initReloadedWorkflow(com.mxgraph.view.mxGraph _graph, ALDWorkflow _flow)
           
protected  void initRenameWin()
          Setup of the window for renaming workflows.
 void interruptWorkflowExecution()
           
 void loadWorkflow()
          Loads a new workflow from file(s).
 ALDOperatorLocation popRecentlySelectedOperatorPath()
           
 void quit()
          Closes the main window after cleaning up.
 void removeWorkflow()
          Removes the currently active workflow.
 void renameWorkflow()
          Rename the currently active workflow.
protected  void renameWorkflow(java.lang.String newName)
           
 void runWorkflow()
          Run the currently active workflow.
 void saveWorkflow()
          Saves the currently active workflow to file(s).
protected  java.io.File showLoadFileSelectDialog()
          Show file dialog to load a workflow.
protected  java.io.File showSaveFileSelectDialog()
          Show file dialog to save a workflow.
 
Methods inherited from class javax.swing.JTabbedPane
add, add, add, add, add, addChangeListener, addTab, addTab, addTab, createChangeListener, fireStateChanged, getAccessibleContext, getBackgroundAt, getBoundsAt, getChangeListeners, getComponentAt, getDisabledIconAt, getDisplayedMnemonicIndexAt, getForegroundAt, getIconAt, getMnemonicAt, getModel, getSelectedComponent, getSelectedIndex, getTabComponentAt, getTabCount, getTabLayoutPolicy, getTabPlacement, getTabRunCount, getTitleAt, getToolTipText, getToolTipTextAt, getUI, getUIClassID, indexAtLocation, indexOfComponent, indexOfTab, indexOfTab, indexOfTabComponent, insertTab, isEnabledAt, paramString, remove, remove, removeAll, removeChangeListener, removeTabAt, setBackgroundAt, setComponentAt, setDisabledIconAt, setDisplayedMnemonicIndexAt, setEnabledAt, setForegroundAt, setIconAt, setMnemonicAt, setModel, setSelectedComponent, setSelectedIndex, setTabComponentAt, setTabLayoutPolicy, setTabPlacement, setTitleAt, setToolTipTextAt, 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, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
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, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, 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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

lastLoadFilePath

protected java.io.File lastLoadFilePath

lastSaveFilePath

protected java.io.File lastSaveFilePath

mainFrame

protected ALDGrappaFrame mainFrame

renameTextField

protected javax.swing.JTextField renameTextField

renameWin

protected javax.swing.JFrame renameWin

workflows

protected java.util.LinkedList<ALDGrappaWorkbenchTab> workflows
List of workflows currently managed.

Constructor Detail

ALDGrappaWorkbench

public ALDGrappaWorkbench(ALDGrappaFrame frame)
Default constructor

Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

addNewWorkflow

public boolean addNewWorkflow()
Adds a new workflow (tab) to the workbench.

Returns:
True, if addition was successful.

addNodeToWorkflow

public void addNodeToWorkflow(ALDOperatorLocation opNamePath)

clearTreeSelection

public void clearTreeSelection()

getWorkflowName

public java.lang.String getWorkflowName()
Returns name of currently active workflow.

Returns:
Name of workflow.

handleALDWorkflowClassEvent

public void handleALDWorkflowClassEvent(ALDWorkflowClassEvent event)
Description copied from interface: ALDWorkflowClassEventListener
Method which is called on event occurrence.

Specified by:
handleALDWorkflowClassEvent in interface ALDWorkflowClassEventListener
Parameters:
event - Event to be handled.

handleLoadWorkflowEvent

protected void handleLoadWorkflowEvent(ALDWorkflowClassEvent event)

handleWorkflowRenameEvent

protected void handleWorkflowRenameEvent(java.lang.String newName)

initNewTab

protected ALDGrappaWorkbenchTab initNewTab(ALDGrappaWorkbenchGraph graph)

initNewWorkflow

protected boolean initNewWorkflow()

initNewWorkflow

protected boolean initNewWorkflow(ALDGrappaWorkbenchGraph graph)

initReloadedTab

protected ALDGrappaWorkbenchTab initReloadedTab(com.mxgraph.view.mxGraph _graph,
                                                ALDWorkflow _flow)

initReloadedWorkflow

protected void initReloadedWorkflow(com.mxgraph.view.mxGraph _graph,
                                    ALDWorkflow _flow)

initRenameWin

protected void initRenameWin()
Setup of the window for renaming workflows.


interruptWorkflowExecution

public void interruptWorkflowExecution()

loadWorkflow

public void loadWorkflow()
Loads a new workflow from file(s).


popRecentlySelectedOperatorPath

public ALDOperatorLocation popRecentlySelectedOperatorPath()

quit

public void quit()
Closes the main window after cleaning up.


removeWorkflow

public void removeWorkflow()
Removes the currently active workflow.


renameWorkflow

public void renameWorkflow()
Rename the currently active workflow.

Parameters:
newName - New name to be assigned to active workflow.

renameWorkflow

protected void renameWorkflow(java.lang.String newName)

runWorkflow

public void runWorkflow()
Run the currently active workflow.


saveWorkflow

public void saveWorkflow()
Saves the currently active workflow to file(s).


showLoadFileSelectDialog

protected java.io.File showLoadFileSelectDialog()
Show file dialog to load a workflow.

Returns:
File path, might be null.

showSaveFileSelectDialog

protected java.io.File showSaveFileSelectDialog()
Show file dialog to save a workflow.

Returns:
File path, might be null.