blob: 51473dbca78f16a605aece3f5807b9f36eedb870 [file] [log] [blame]
package org.apache.taverna.ui.perspectives.biocatalogue;
import java.io.InputStream;
import java.net.URL;
import javax.swing.ImageIcon;
import org.apache.taverna.biocatalogue.model.ResourceManager;
import org.apache.taverna.workbench.ui.zaria.PerspectiveSPI;
import org.jdom.Element;
/**
* @author Sergejs Aleksejevs
*/
public class BioCataloguePerspective implements PerspectiveSPI
{
private MainComponent perspectiveMainComponent;
private boolean visible = true;
public ImageIcon getButtonIcon()
{
return ResourceManager.getImageIcon(ResourceManager.FAVICON);
}
public InputStream getLayoutInputStream() {
return getClass().getResourceAsStream("biocatalogue-perspective.xml");
}
public String getText() {
return "Service Catalogue";
}
public boolean isVisible() {
return visible;
}
public int positionHint()
{
// this determines position of perspective in the
// bar with perspective buttons (currently makes it the last in
// the list)
return 40;
}
public void setVisible(boolean visible) {
this.visible = visible;
}
public void update(Element layoutElement) {
// TODO Auto-generated method stub
// Not sure what to do here
}
public void setMainComponent(MainComponent component)
{
this.perspectiveMainComponent = component;
}
/**
* Returns the instance of the main component of this perspective.
*/
public MainComponent getMainComponent()
{
return this.perspectiveMainComponent;
}
}