org.globus.cog.gui.grapheditor
Interface GraphComponent

All Superinterfaces:
Cloneable, PropertyHolder
All Known Subinterfaces:
EdgeComponent, NodeComponent
All Known Implementing Classes:
AbstractEdgeComponent, AbstractGraphComponent, AbstractNodeComponent, AntNode, EchoNode, EdgeWithLabel, EditableNodeComponent, FlowEdge, ForLoopEdge, ForNode, ForNodeEnd, GenericEdge, GenericNode, JoinNode, LoopEdge, ParallelNode, ProjectNode, ProjectPropertyNode, RootNode, SerialNode, SimpleArrow, TargetDependency, TargetNode, TaskNode

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

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

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

Parameters:
name -

newRenderer

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


newRenderer

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


newInstance

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


getParent

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

setParent

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


supportsType

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

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


get_ID

String get_ID()
Returns the id of this component


getRootNode

NodeComponent getRootNode()

clone

Object clone()