|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.globus.cog.gui.grapheditor.canvas.AbstractCanvas
| Constructor Summary | |
AbstractCanvas()
|
|
AbstractCanvas(NodeComponent owner)
|
|
| Method Summary | |
void |
actionPerformed(ActionEvent e)
|
void |
addCanvasEventListener(CanvasEventListener listener)
Adds a listener that can be used to receive various notification events about the state of the canvas |
void |
addComponent(GraphComponent c)
Adds a graph component to the graph |
void |
addEdge(EdgeComponent ec)
Adds an edge to this canvas |
void |
addEdgeType(EdgeComponent edge)
Adds an edge prototype to this canvas |
void |
addNode(NodeComponent nc)
Adds a node to this canvas |
void |
addNodeType(NodeComponent node)
Adds a prototype node to this canvas |
void |
addPropertyChangeListener(PropertyChangeListener l)
Adds a property change listener to the listeners list. |
void |
addStatusEventListener(StatusEventListener listener)
|
GraphComponent |
createComponent(String type)
Allows the automatic creation of a graph component based on the requested type. |
EdgeComponent |
createEdge(String type)
A specialized method for createComponent that only creates edges. |
NodeComponent |
createNode(String type)
A specialized method for createComponent that only creates nodes. |
void |
event(EventObject e)
|
void |
fireCanvasEvent(CanvasEvent e)
|
void |
firePropertyChange(PropertyChangeEvent e)
Fires a PropertyChangeEvent on behalf of this canvas |
void |
fireStatusEvent(StatusEvent e)
|
GraphInterface |
getGraph()
|
NodeComponent |
getOwner()
|
StatusManager |
getStatusManager()
Each canvas can have a status manager that can be used to represent various pieces of information pertaining to outcomes of various actions performed on the canvas or its descendants. |
List |
getSupportedEdges()
This method is used to define the valid edge types that can appear within this canvas. |
List |
getSupportedNodes()
This method is used to define the valid node types that can appear within this canvas. |
void |
graphComponentEvent(GraphComponentWrapperEvent e)
|
void |
invalidate()
Notifies the canvas about changes in its sub-components that may require the re-evaluation of the state of the canvas object, most notably a re-rendering of the canvas. |
CanvasRenderer |
newRenderer()
Creates a new renderer for this canvas using the current target |
CanvasRenderer |
newRenderer(String target)
Creates a new renderer for this canvas using the specified target |
void |
propertyChange(PropertyChangeEvent e)
|
void |
removeCanvasEventListener(CanvasEventListener listener)
Removes a previously added listener |
void |
removeComponent(GraphComponent c)
Removes a component from the graph. |
void |
removeEdgeType(Class edge)
|
void |
removeNodeType(Class node)
|
void |
removePropertyChangeListener(PropertyChangeListener l)
Removes a listener. |
void |
removeStatusEventListener(StatusEventListener listener)
|
protected void |
setClassRendererClass(Class cls)
|
protected void |
setClassRendererClass(Class cls,
String target)
|
void |
setEventsActive(boolean eventsActive)
|
void |
setGraph(GraphInterface graph)
sets the graph that is to be displayed/edited by this canvas |
void |
setInstanceRendererClass(Class cls)
|
void |
setInstanceRendererClass(Class cls,
String target)
|
void |
setOwner(NodeComponent owner)
Sets the value of the owner of this canvas |
void |
setPropagateEvents(boolean v)
Determines whether node events are being propagated to the listeners for this canvas |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractCanvas(NodeComponent owner)
public AbstractCanvas()
| Method Detail |
public void setInstanceRendererClass(Class cls,
String target)
public void setInstanceRendererClass(Class cls)
protected void setClassRendererClass(Class cls)
protected void setClassRendererClass(Class cls,
String target)
public CanvasRenderer newRenderer()
GraphCanvas
newRenderer in interface GraphCanvaspublic CanvasRenderer newRenderer(String target)
GraphCanvas
newRenderer in interface GraphCanvaspublic void addPropertyChangeListener(PropertyChangeListener l)
l - the listener to be added to the listpublic void removePropertyChangeListener(PropertyChangeListener l)
l - the listener to be removedpublic void firePropertyChange(PropertyChangeEvent e)
e - the event to be firedpublic void propertyChange(PropertyChangeEvent e)
propertyChange in interface PropertyChangeListenerpublic void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic void event(EventObject e)
event in interface EventConsumerpublic void setGraph(GraphInterface graph)
GraphCanvas
setGraph in interface GraphCanvasgraph - public GraphInterface getGraph()
getGraph in interface GraphCanvaspublic GraphComponent createComponent(String type)
GraphCanvas
createComponent in interface GraphCanvastype - the requested type
public void addComponent(GraphComponent c)
GraphCanvas
addComponent in interface GraphCanvasc - public void removeComponent(GraphComponent c)
GraphCanvas
removeComponent in interface GraphCanvasc - public void addNode(NodeComponent nc)
nc - node to be addedpublic void addEdge(EdgeComponent ec)
ec - the edge to be addedpublic NodeComponent createNode(String type)
GraphCanvas
createNode in interface GraphCanvastype -
public EdgeComponent createEdge(String type)
GraphCanvas
createEdge in interface GraphCanvastype -
public List getSupportedNodes()
GraphCanvas
getSupportedNodes in interface GraphCanvaspublic List getSupportedEdges()
GraphCanvas
getSupportedEdges in interface GraphCanvaspublic void addNodeType(NodeComponent node)
node - public void removeNodeType(Class node)
public void addEdgeType(EdgeComponent edge)
edge - public void removeEdgeType(Class edge)
public void graphComponentEvent(GraphComponentWrapperEvent e)
graphComponentEvent in interface GraphComponentWrapperListenerpublic NodeComponent getOwner()
getOwner in interface GraphCanvaspublic void setOwner(NodeComponent owner)
GraphCanvas
setOwner in interface GraphCanvasowner - public void setPropagateEvents(boolean v)
v - public StatusManager getStatusManager()
GraphCanvas
getStatusManager in interface GraphCanvaspublic void addCanvasEventListener(CanvasEventListener listener)
GraphCanvas
addCanvasEventListener in interface GraphCanvaspublic void removeCanvasEventListener(CanvasEventListener listener)
GraphCanvas
removeCanvasEventListener in interface GraphCanvaspublic void fireCanvasEvent(CanvasEvent e)
fireCanvasEvent in interface GraphCanvaspublic void addStatusEventListener(StatusEventListener listener)
addStatusEventListener in interface GraphCanvaspublic void removeStatusEventListener(StatusEventListener listener)
removeStatusEventListener in interface GraphCanvaspublic void fireStatusEvent(StatusEvent e)
fireStatusEvent in interface GraphCanvaspublic void invalidate()
GraphCanvas
invalidate in interface GraphCanvaspublic void setEventsActive(boolean eventsActive)
setEventsActive in interface GraphCanvas
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||