net.sf.taverna.perspectives
Class CustomPerspective

java.lang.Object
  extended by net.sf.taverna.perspectives.CustomPerspective
All Implemented Interfaces:
PerspectiveSPI

public class CustomPerspective
extends java.lang.Object
implements PerspectiveSPI

User generated perspective.

Author:
Stuart Owen

Constructor Summary
CustomPerspective(org.jdom.Element layoutElement)
           
 
Method Summary
 javax.swing.ImageIcon getButtonIcon()
           
 java.io.InputStream getLayoutInputStream()
           
 java.lang.String getName()
           
 java.lang.String getText()
           
 boolean isVisible()
          returns true if the perspective is set to be visible
 int positionHint()
          returns 101 by default but is generally irrevelevant as CustomPerspectives are always added after built in and plugin perspectives anyway.
 void setVisible(boolean visible)
          sets whether the perspective should be visible or not.
 void update(org.jdom.Element paneElement)
          Store internally any changes to the layout xml
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomPerspective

public CustomPerspective(org.jdom.Element layoutElement)
Method Detail

getButtonIcon

public javax.swing.ImageIcon getButtonIcon()
Specified by:
getButtonIcon in interface PerspectiveSPI
Returns:
the icon image for the toolbar button

getLayoutInputStream

public java.io.InputStream getLayoutInputStream()
Specified by:
getLayoutInputStream in interface PerspectiveSPI
Returns:
the input stream to the layout XML

update

public void update(org.jdom.Element paneElement)
Description copied from interface: PerspectiveSPI
Store internally any changes to the layout xml

Specified by:
update in interface PerspectiveSPI

getText

public java.lang.String getText()
Specified by:
getText in interface PerspectiveSPI
Returns:
the text for the perspective

getName

public java.lang.String getName()

positionHint

public int positionHint()
returns 101 by default but is generally irrevelevant as CustomPerspectives are always added after built in and plugin perspectives anyway.

Specified by:
positionHint in interface PerspectiveSPI

isVisible

public boolean isVisible()
Description copied from interface: PerspectiveSPI
returns true if the perspective is set to be visible

Specified by:
isVisible in interface PerspectiveSPI
Returns:
boolean

setVisible

public void setVisible(boolean visible)
Description copied from interface: PerspectiveSPI
sets whether the perspective should be visible or not.

Specified by:
setVisible in interface PerspectiveSPI