org.kahina.core.gui
Class KahinaPerspective

java.lang.Object
  extended by org.kahina.core.gui.KahinaPerspective

public class KahinaPerspective
extends Object

Storage of window configuration and display options for a Kahina instance.

Main functionality is to represent sets of configurations. A KahinaWindowManager can build a Kahina environment or re-arrange it according to the instructions contained in a perspective.

It is the task of the KahinaWindowManager to react to user-imposed changes of display options and window layout by changing the corresponding setting in the current perspective.

A perspective defines one of the important parts of an application profile, and is therefore usually persistent across sessions.


Constructor Summary
KahinaPerspective(String appID, String name)
           
 
Method Summary
 KahinaPerspective copy()
           
 void disposeWindow(int winID)
          Removes a window from the perspective.
 boolean equals(Object o)
          Perspective equality is decided by their name only!
 Element exportXML(Document dom)
           
static KahinaPerspective generateDefaultPerspective(Map<String,KahinaView<? extends KahinaObject>> nameToView)
           
 String getAppID()
           
 KahinaArrangement getArrangement()
           
 KahinaViewConfiguration getConfiguration(int viewID)
           
 String getName()
           
static KahinaPerspective importXML(Element topEl)
           
 boolean isVisible(int viewID)
           
 void setConfiguration(int viewID, KahinaViewConfiguration conf)
           
 void setName(String name)
           
 void setVisibility(int viewID, boolean vis)
           
 void toggleVisibility(int viewID)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KahinaPerspective

public KahinaPerspective(String appID,
                         String name)
Method Detail

copy

public KahinaPerspective copy()

equals

public boolean equals(Object o)
Perspective equality is decided by their name only!

Overrides:
equals in class Object

generateDefaultPerspective

public static KahinaPerspective generateDefaultPerspective(Map<String,KahinaView<? extends KahinaObject>> nameToView)

importXML

public static KahinaPerspective importXML(Element topEl)

disposeWindow

public void disposeWindow(int winID)
Removes a window from the perspective. Not well-defined for embedded windows that should be undocked prior to being disposed of.

Parameters:
winID - the ID of the window to be removed

exportXML

public Element exportXML(Document dom)

getConfiguration

public KahinaViewConfiguration getConfiguration(int viewID)

setConfiguration

public void setConfiguration(int viewID,
                             KahinaViewConfiguration conf)

getAppID

public String getAppID()

getName

public String getName()

setName

public void setName(String name)

getArrangement

public KahinaArrangement getArrangement()

setVisibility

public void setVisibility(int viewID,
                          boolean vis)

toggleVisibility

public void toggleVisibility(int viewID)

isVisible

public boolean isVisible(int viewID)