Package org.pentaho.di.ui.spoon
Class SpoonPerspectiveManager
- java.lang.Object
-
- 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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
SpoonPerspectiveManager.SpoonPerspectiveComparator
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.String
getStartupPerspective()
void
hidePerspective(String perspectiveId)
Hides perspective withperspectiveId
.void
initialize()
boolean
isForcePerspective()
Returns whether this perspective manager is prevented from switching perspectivesvoid
removePerspective(SpoonPerspective per)
void
setDeck(org.pentaho.ui.xul.containers.XulDeck deck)
Sets the deck used by the Perspective Manager to display Perspectives in.void
setForcePerspective(boolean forcePerspective)
Sets whether this perspective manager is prevented from switching perspectives.void
setStartupPerspective(String startupPerspective)
void
setXulDoc(org.pentaho.ui.xul.XulDomContainer doc)
Receives the main XUL document comprising the menuing system and main layout of Spoon.void
showPerspective(String perspectiveId)
Shows perspective withperspectiveId
if it is not shown yet.
-
-
-
Method Detail
-
getStartupPerspective
public String getStartupPerspective()
-
setStartupPerspective
public void setStartupPerspective(String startupPerspective)
-
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
-
-
showPerspective
public void showPerspective(String perspectiveId)
Shows perspective withperspectiveId
if it is not shown yet.
-
hidePerspective
public void hidePerspective(String perspectiveId)
Hides perspective withperspectiveId
.
-
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 org.pentaho.di.core.exception.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:
org.pentaho.di.core.exception.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
-
isForcePerspective
public boolean isForcePerspective()
Returns whether this perspective manager is prevented from switching perspectives
-
setForcePerspective
public void setForcePerspective(boolean forcePerspective)
Sets whether this perspective manager is prevented from switching perspectives. This is used when a startup perspective is requested on the command line parameter to prevent other perpsectives from openeing.
-
removePerspective
public void removePerspective(SpoonPerspective per)
-
initialize
public void initialize()
-
-