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, ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ChangeListener, SwingConstants

public class ALDGrappaWorkbench
extends JTabbedPane
implements ActionListener, ALDWorkflowClassEventListener, ChangeListener

Main frame of Grappa.

Author:
Birgit Moeller
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JTabbedPane
JTabbedPane.AccessibleJTabbedPane, JTabbedPane.ModelListener
 
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
protected  File lastLoadFilePath
           
protected  File lastSaveFilePath
           
protected  ALDGrappaFrame mainFrame
           
protected  JTextField renameTextField
           
protected  JFrame renameWin
           
protected  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(ActionEvent e)
           
 boolean addNewWorkflow()
          Adds a new workflow (tab) to the workbench.
 void addNodeToWorkflow(ALDOperatorLocation opNamePath)
           
 void clearTreeSelection()
           
 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(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(String newName)
           
 void runWorkflow()
          Run the currently active workflow.
 void saveWorkflow()
          Saves the currently active workflow to file(s).
protected  File showLoadFileSelectDialog()
          Show file dialog to load a workflow.
protected  File showSaveFileSelectDialog()
          Show file dialog to save a workflow.
 void stateChanged(ChangeEvent e)
           
 
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

mainFrame

protected ALDGrappaFrame mainFrame

renameWin

protected JFrame renameWin

renameTextField

protected JTextField renameTextField

lastLoadFilePath

protected File lastLoadFilePath

lastSaveFilePath

protected File lastSaveFilePath

workflows

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

Constructor Detail

ALDGrappaWorkbench

public ALDGrappaWorkbench(ALDGrappaFrame frame)
Default constructor

Method Detail

addNewWorkflow

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

Returns:
True, if addition was successful.

getWorkflowName

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

Returns:
Name of workflow.

renameWorkflow

public void renameWorkflow()
Rename the currently active workflow.


removeWorkflow

public void removeWorkflow()
Removes the currently active workflow.


loadWorkflow

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


saveWorkflow

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


runWorkflow

public void runWorkflow()
Run the currently active workflow.


interruptWorkflowExecution

public void interruptWorkflowExecution()

addNodeToWorkflow

public void addNodeToWorkflow(ALDOperatorLocation opNamePath)

popRecentlySelectedOperatorPath

public ALDOperatorLocation popRecentlySelectedOperatorPath()

clearTreeSelection

public void clearTreeSelection()

quit

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


initNewWorkflow

protected boolean initNewWorkflow()

initNewWorkflow

protected boolean initNewWorkflow(ALDGrappaWorkbenchGraph graph)

initNewTab

protected ALDGrappaWorkbenchTab initNewTab(ALDGrappaWorkbenchGraph graph)

initRenameWin

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


initReloadedWorkflow

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

renameWorkflow

protected void renameWorkflow(String newName)

initReloadedTab

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

showLoadFileSelectDialog

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

Returns:
File path, might be null.

showSaveFileSelectDialog

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

Returns:
File path, might be null.

handleWorkflowRenameEvent

protected void handleWorkflowRenameEvent(String newName)

handleLoadWorkflowEvent

protected void handleLoadWorkflowEvent(ALDWorkflowClassEvent event)

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

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.

stateChanged

public void stateChanged(ChangeEvent e)
Specified by:
stateChanged in interface ChangeListener


Copyright © 2010–2014 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.