org.globus.cog.gui.grapheditor
Interface GraphComponent

All Superinterfaces:
Cloneable, PropertyHolder
All Known Subinterfaces:
EdgeComponent, NodeComponent
All Known Implementing Classes:
AbstractEdgeComponent, AbstractGraphComponent, AbstractNodeComponent, GenericNode, ProjectNode, ProjectPropertyNode, TargetDependency, TargetNode

public interface GraphComponent
extends PropertyHolder, Cloneable

Interface for a generic component (node or edge) that can be used by the editor


Method Summary
 Object clone()
           
 String get_ID()
          Returns the id of this component
 String getComponentType()
          Gets the type of this component.
 NodeComponent getParent()
           
 NodeComponent getRootNode()
           
 GraphComponent newInstance()
          Creates a new component using the current one as prototype.
 ComponentRenderer newRenderer()
          Creates a renderer for this component using the current target.
 ComponentRenderer newRenderer(String target)
          Creates a renderer for this components using the specified target.
 void set_ID(String id)
          Sets the id of this component.
 void setComponentType(String name)
          Sets the type of this component
 void setParent(NodeComponent parent)
          Sets the parent node in the hierarchical graph
 boolean supportsType(String type)
          This method is used to allow the existence of generic objects which can render a range of types.
 
Methods inherited from interface org.globus.cog.gui.grapheditor.properties.PropertyHolder
addProperty, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getProperties, getProperty, getPropertyValue, hasProperty, removeProperty, removePropertyChangeListener, setPropertyValue
 

Method Detail

getComponentType

public String getComponentType()
Gets the type of this component. The type can be used to differentiate components from each other.

Returns:
A string representing the type

setComponentType

public void setComponentType(String name)
Sets the type of this component

Parameters:
name -

newRenderer

public ComponentRenderer newRenderer()
Creates a renderer for this component using the current target.


newRenderer

public ComponentRenderer newRenderer(String target)
Creates a renderer for this components using the specified target.


newInstance

public GraphComponent newInstance()
Creates a new component using the current one as prototype.


getParent

public NodeComponent getParent()
Returns:
The parent node in the hierarchical graph

setParent

public void setParent(NodeComponent parent)
Sets the parent node in the hierarchical graph


supportsType

public boolean supportsType(String type)
This method is used to allow the existence of generic objects which can render a range of types.

Parameters:
type - The type to be checked
Returns:
true if this component can render the specified type

set_ID

public void set_ID(String id)
Sets the id of this component. An id can be used to uniquely reference a component.


get_ID

public String get_ID()
Returns the id of this component


getRootNode

public NodeComponent getRootNode()

clone

public Object clone()