org.pentaho.di.ui.spoon
Class SpoonPerspectiveManager

java.lang.Object
  extended by org.pentaho.di.ui.spoon.SpoonPerspectiveManager

public class SpoonPerspectiveManager
extends Object

Singleton Object controlling SpoonPerspectives. A Perspective is an optional Spoon mode that can be added by a SpoonPlugin. Perspectives take over the look of the entire application by replacing the main UI area.

Author:
nbaker

Method Summary
 void activatePerspective(Class<? extends SpoonPerspective> clazz)
          Activates the given instance of the class literal passed in.
 void addPerspective(SpoonPerspective perspective)
          Adds a SpoonPerspective making it available to be activated later.
 SpoonPerspective getActivePerspective()
          Returns the current active perspective.
static SpoonPerspectiveManager getInstance()
          Returns the single instance of this class.
 List<SpoonPerspective> getPerspectives()
          Returns an unmodifiable List of perspectives in no set order.
 void setDeck(org.pentaho.ui.xul.containers.XulDeck deck)
          Sets the deck used by the Perspective Manager to display Perspectives in.
 void setXulDoc(org.pentaho.ui.xul.XulDomContainer doc)
          Receives the main XUL document comprising the menuing system and main layout of Spoon.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static SpoonPerspectiveManager getInstance()
Returns the single instance of this class.

Returns:
SpoonPerspectiveManager instance.

setDeck

public void setDeck(org.pentaho.ui.xul.containers.XulDeck deck)
Sets the deck used by the Perspective Manager to display Perspectives in.

Parameters:
deck -

setXulDoc

public void setXulDoc(org.pentaho.ui.xul.XulDomContainer doc)
Receives the main XUL document comprising the menuing system and main layout of Spoon. Perspectives are able to modify these areas when activated. Any other areas need to be modified via a SpoonPlugin.

Parameters:
doc -

addPerspective

public void addPerspective(SpoonPerspective perspective)
Adds a SpoonPerspective making it available to be activated later.

Parameters:
perspective -

getPerspectives

public List<SpoonPerspective> getPerspectives()
Returns an unmodifiable List of perspectives in no set order.

Returns:

activatePerspective

public void activatePerspective(Class<? extends SpoonPerspective> clazz)
                         throws KettleException
Activates the given instance of the class literal passed in. Activating a perspective first deactivates the current perspective removing any overlays its applied to the UI. It then switches the main deck to display the perspective UI and applies the optional overlays to the main Spoon XUL container.

Parameters:
clazz - SpoonPerspective class literal
Throws:
KettleException - throws a KettleException if no perspective is found for the given parameter

getActivePerspective

public SpoonPerspective getActivePerspective()
Returns the current active perspective.

Returns:
active SpoonPerspective