org.graffiti.plugins.scripting.delegates
Class GraphDelegate

java.lang.Object
  extended by org.graffiti.plugins.scripting.delegate.ScriptingDelegate
      extended by org.graffiti.plugins.scripting.delegate.ReflectiveDelegate
          extended by org.graffiti.plugins.scripting.delegate.ObjectDelegate
              extended by org.graffiti.plugins.scripting.delegates.CollectionDelegate
                  extended by org.graffiti.plugins.scripting.delegates.GraphDelegate
All Implemented Interfaces:
org.graffiti.plugins.scripting.delegate.Unwrappable<Graph>

public class GraphDelegate
extends CollectionDelegate
implements org.graffiti.plugins.scripting.delegate.Unwrappable<Graph>

Author:
Andreas Gleißner

Nested Class Summary
static class GraphDelegate.Factory
           
 
Field Summary
 
Fields inherited from class org.graffiti.plugins.scripting.delegate.ScriptingDelegate
UNDEFINED
 
Constructor Summary
GraphDelegate(org.graffiti.plugins.scripting.Scope scope, Graph graph)
           
 
Method Summary
 EdgeDelegate addEdge(NodeDelegate source, NodeDelegate target, Boolean directed)
           
 NodeDelegate addNode()
           
 void clear()
          Clears this collection.
 boolean containsEdge(EdgeDelegate edge)
           
 boolean containsNode(NodeDelegate node)
           
 void deleteEdge(EdgeDelegate edge)
           
 void deleteNode(NodeDelegate node)
           
 CollectionDelegate getEdges(NodeDelegate node1, NodeDelegate node2)
           
 GridDelegate getGrid()
          Returns the delegate representing the grid of the graph represented by this delegate.
 boolean isDirected()
           
 boolean isEmpty()
          Returns if this collection delegate contains no GraphElementDelegates.
 boolean isModified()
           
 void setDirected(Boolean directed)
           
 void setGrid(GridDelegate grid)
          Sets the grid of the graph represented by this delegate to the grid wrapped by the specified grid delegate.
 void setModified(Boolean modified)
           
 int size()
           
 String toString()
           
 Graph unwrap()
           
 
Methods inherited from class org.graffiti.plugins.scripting.delegates.CollectionDelegate
add, add, clone, contains, contains, count, get, getEdges, getIndices, getNodes, has, iterator, remove, remove, set, set
 
Methods inherited from class org.graffiti.plugins.scripting.delegate.ObjectDelegate
createConstructor, createWrapper, get, getMemberInfo, getScope, has, put
 
Methods inherited from class org.graffiti.plugins.scripting.delegate.ReflectiveDelegate
addDynamicMemberInfo, delete, delete, getClassName, help, put
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GraphDelegate

public GraphDelegate(org.graffiti.plugins.scripting.Scope scope,
                     Graph graph)
Method Detail

addNode

public NodeDelegate addNode()

addEdge

public EdgeDelegate addEdge(NodeDelegate source,
                            NodeDelegate target,
                            Boolean directed)

clear

public void clear()
Description copied from class: CollectionDelegate
Clears this collection.

Specified by:
clear in class CollectionDelegate

containsNode

public boolean containsNode(NodeDelegate node)

containsEdge

public boolean containsEdge(EdgeDelegate edge)

deleteNode

public void deleteNode(NodeDelegate node)

deleteEdge

public void deleteEdge(EdgeDelegate edge)

getGrid

public GridDelegate getGrid()
Returns the delegate representing the grid of the graph represented by this delegate.

Returns:
the delegate representing the grid of the graph represented by this delegate.

getEdges

public final CollectionDelegate getEdges(NodeDelegate node1,
                                         NodeDelegate node2)

isEmpty

public boolean isEmpty()
Description copied from class: CollectionDelegate
Returns if this collection delegate contains no GraphElementDelegates.

Specified by:
isEmpty in class CollectionDelegate
Returns:
true if this collection delegate contains no GraphElementDelegates.

isDirected

public boolean isDirected()

isModified

public boolean isModified()

setDirected

public void setDirected(Boolean directed)

setGrid

public void setGrid(GridDelegate grid)
Sets the grid of the graph represented by this delegate to the grid wrapped by the specified grid delegate.

Parameters:
grid - the grid to set.

setModified

public void setModified(Boolean modified)

size

public int size()
Specified by:
size in class CollectionDelegate

toString

public String toString()
Overrides:
toString in class CollectionDelegate

unwrap

public Graph unwrap()
Specified by:
unwrap in interface org.graffiti.plugins.scripting.delegate.Unwrappable<Graph>


Generated at 2012-05-30 11:01:25 PM CEST