org.embl.ebi.escience.scuflui.workbench
Class WorkbenchPerspectives

java.lang.Object
  extended by org.embl.ebi.escience.scuflui.workbench.WorkbenchPerspectives

public class WorkbenchPerspectives
extends java.lang.Object


Nested Class Summary
 class WorkbenchPerspectives.CurrentPerspectiveListener
          Change perspective when ModelMap.CURRENT_PERSPECTIVE has been modified.
 
Constructor Summary
WorkbenchPerspectives(ZBasePane basePane, javax.swing.JToolBar toolBar)
           
 
Method Summary
 javax.swing.JMenu getDisplayPerspectivesMenu()
           
 javax.swing.JMenu getEditPerspectivesMenu()
           
 ModelMap.ModelChangeListener getModelChangeListener()
           
 java.util.List<PerspectiveSPI> getPerspectives()
           
 void initialisePerspectives()
           
 void removeCustomPerspective(CustomPerspective perspective)
           
 void saveAll()
           
 void setWorkflowPerspective()
          Ensures that the current perspective is an instance of WorkflowPerspective.
 void switchPerspective(PerspectiveSPI perspective)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkbenchPerspectives

public WorkbenchPerspectives(ZBasePane basePane,
                             javax.swing.JToolBar toolBar)
Method Detail

getModelChangeListener

public ModelMap.ModelChangeListener getModelChangeListener()

getPerspectives

public java.util.List<PerspectiveSPI> getPerspectives()
Returns:
a list of all the present perspectives, both default and custom, ordered in accending order of PerspectiveSPI.positionHint.

getDisplayPerspectivesMenu

public javax.swing.JMenu getDisplayPerspectivesMenu()

getEditPerspectivesMenu

public javax.swing.JMenu getEditPerspectivesMenu()

saveAll

public void saveAll()
             throws java.io.FileNotFoundException,
                    java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException

removeCustomPerspective

public void removeCustomPerspective(CustomPerspective perspective)

initialisePerspectives

public void initialisePerspectives()

switchPerspective

public void switchPerspective(PerspectiveSPI perspective)

setWorkflowPerspective

public void setWorkflowPerspective()
Ensures that the current perspective is an instance of WorkflowPerspective. If the current perspective is not a WorkflowPerspective, the first such instance from the PerspectiveSPI registry will be selected, normally the Design perspective.

This method can be used by UI operations that change or modify the current workflow, so that the user is shown the new or modified workflow, and not stuck in say the Result perspective.