|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GraphCanvas
Method Summary | |
---|---|
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 |
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 |
fireCanvasEvent(CanvasEvent e)
|
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 |
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 |
removeCanvasEventListener(CanvasEventListener listener)
Removes a previously added listener |
void |
removeComponent(GraphComponent c)
Removes a component from the graph. |
void |
removeStatusEventListener(StatusEventListener listener)
|
void |
setEventsActive(boolean eventsActive)
|
void |
setGraph(GraphInterface graph)
sets the graph that is to be displayed/edited by this canvas |
void |
setOwner(NodeComponent owner)
Sets the value of the owner of this canvas |
Methods inherited from interface org.globus.cog.gui.grapheditor.util.EventConsumer |
---|
event |
Method Detail |
---|
List getSupportedNodes()
List getSupportedEdges()
void setGraph(GraphInterface graph)
graph
- GraphInterface getGraph()
GraphComponent createComponent(String type)
type
- the requested type
void addComponent(GraphComponent c)
c
- void removeComponent(GraphComponent c)
c
- NodeComponent createNode(String type)
type
-
EdgeComponent createEdge(String type)
type
-
NodeComponent getOwner()
void setOwner(NodeComponent owner)
owner
- StatusManager getStatusManager()
CanvasRenderer newRenderer()
CanvasRenderer newRenderer(String target)
void addCanvasEventListener(CanvasEventListener listener)
void removeCanvasEventListener(CanvasEventListener listener)
void fireCanvasEvent(CanvasEvent e)
void addStatusEventListener(StatusEventListener listener)
void removeStatusEventListener(StatusEventListener listener)
void fireStatusEvent(StatusEvent e)
void invalidate()
void setEventsActive(boolean eventsActive)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |