Package org.pentaho.di.ui.spoon
Class SpoonPerspectiveManager
java.lang.Object
org.pentaho.di.ui.spoon.SpoonPerspectiveManager
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
Modifier and TypeClassDescriptionprotected static class
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.Returns the current active perspective.static SpoonPerspectiveManager
Returns the single instance of this class.Returns an unmodifiable List of perspectives in no set order.void
hidePerspective
(String perspectiveId) Hides perspective withperspectiveId
.void
boolean
Returns whether this perspective manager is prevented from switching perspectivesvoid
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 Details
-
getStartupPerspective
-
setStartupPerspective
-
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
Adds a SpoonPerspective making it available to be activated later.- Parameters:
perspective
-
-
showPerspective
Shows perspective withperspectiveId
if it is not shown yet. -
hidePerspective
Hides perspective withperspectiveId
. -
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
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
-
initialize
public void initialize()
-