|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graph.view.GraphViewFactory
This abstract class defines the methods to create instances of all graph view objects.
The object types created by this factory are:
VisualNodeVisualEdgeVisualPortVisualGraphVisualSubgraphVisualGraphObjectVisualNodeInfoVisualEdgeInfoVisualPortDenotation
By calling the static method newInstance(), you can
obtain an instance that is assignable to this class.
| Constructor Summary | |
GraphViewFactory()
Constructs the abstract base instance for derived classes. |
|
| Method Summary | |
abstract boolean |
loadResources()
|
static VisualNode |
makeDefaultVisualNode(GraphViewFactory factory,
Node node,
Composite composite)
This method creates a default VisualNode instance.
|
static VisualNode |
makeDefaultVisualNode(GraphViewFactory factory,
Node node,
Composite composite,
VisualNodeInfo info)
This method creates a default VisualNode instance
and associates a VisualNodeInfo object with it.
|
static GraphViewFactory |
newInstance()
This method creates a new instance of the actual GraphViewFactory implementation. |
abstract VisualEdge |
newVisualEdge(Edge edge,
VisualNode source,
VisualNode target)
Creates a new VisualEdge associated with the given model
edge. |
abstract VisualEdge |
newVisualEdge(Edge edge,
VisualNode visualsource,
VisualNode visualtarget,
CompositeLine composite)
Constructs and returns a VisualEdge object. |
abstract VisualEdge |
newVisualEdge(Edge edge,
VisualNode visualsource,
VisualNode visualtarget,
VisualEdgeInfo info)
Constructs and returns a VisualEdge object. |
abstract VisualEdge |
newVisualEdge(Edge edge,
VisualNode source,
VisualNode target,
VisualEdgeInfo info,
CompositeLine composite)
Constructs and returns a VisualEdge object. |
abstract VisualEdge |
newVisualEdge(Edge edge,
VisualNode visualsource,
VisualNode visualtarget,
VisualPort visualsourceport,
VisualPort visualtargetport,
CompositeLine composite)
|
abstract VisualEdge |
newVisualEdge(Edge edge,
VisualNode visualsource,
VisualNode visualtarget,
VisualPort visualsourceport,
VisualPort visualtargetport,
VisualEdgeInfo info)
|
abstract VisualEdge |
newVisualEdge(Edge edge,
VisualNode visualsource,
VisualNode visualtarget,
VisualPort visualsourceport,
VisualPort visualtargetport,
VisualEdgeInfo info,
CompositeLine composite)
|
abstract VisualGraph |
newVisualGraph(Graph graph)
Creates a new VisualGraph associated with the given model
graph. |
abstract VisualGraph |
newVisualGraph(Graph graph,
java.lang.String nodeGeometry,
java.lang.String nodeStyle,
java.lang.String edgeStyle)
Constructs and returns a new VisualGraph. |
abstract VisualGraphView |
newVisualGraphView(GraphController graphcontroller)
Constructs a returns a new VisualGraphView object. |
abstract VisualGraphView |
newVisualGraphView(GraphController graphcontroller,
java.lang.String nodeGeometry,
java.lang.String nodeStyle,
java.lang.String edgeStyle)
Constructs a returns a new VisualGraphView object. |
abstract VisualNode |
newVisualNode(Node node,
GeometryDescriptor geometry)
Constructs a new VisualNode object. |
abstract VisualNode |
newVisualNode(Node node,
java.util.List visualports,
Composite composite)
Creates a new VisualNode associated with the given model
node and providing the given ports. |
abstract VisualNode |
newVisualNode(Node node,
java.util.List visualports,
VisualNodeInfo info,
Composite composite)
Constructs and returns a new VisualNode object. |
abstract VisualNode |
newVisualNode(Node node,
VisualNodeInfo info,
GeometryDescriptor geometry)
Constructs a new VisualNode object. |
abstract VisualPort |
newVisualPort(VisualPortDenotation denotation,
int coordHorizontal,
int coordVertical,
Port port)
Creates a new VisualPort associated with the given model port
and further described by denotation. |
abstract VisualPortDenotation |
newVisualPortDenotation(double[] boundedInterval)
Creates a new VisualPortDenotation using the given interval.
|
abstract VisualSubgraph |
newVisualSubgraph(Graph graph,
Subgraph subgraph,
GeometryDescriptor geometry)
Constructs and returns a new VisualSubgraph object. |
abstract VisualSubgraph |
newVisualSubgraph(Graph graph,
Subgraph subgraph,
VisualNodeInfo info,
GeometryDescriptor geometry)
Constructs and returns a new VisualSubgraph object. |
abstract VisualSubgraph |
newVisualSubgraph(Subgraph subgraph,
VisualGraph visualgraph,
CompositeGroup compositegroup)
Creates a new VisualSubgraph that will be nested within the
given VisualGraph and visualized by the
CompositeGroup given by parameter
compositegroup. |
abstract VisualSubgraph |
newVisualSubgraph(Subgraph subgraph,
VisualNodeInfo info,
VisualGraph visualgraph,
CompositeGroup compositegroup)
Constructs a new VisualSubgraph. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GraphViewFactory()
| Method Detail |
public abstract VisualPort newVisualPort(VisualPortDenotation denotation,
int coordHorizontal,
int coordVertical,
Port port)
VisualPort associated with the given model port
and further described by denotation. It will be located at
position (coordHorizontal, coordVertical.
denotation - the denotation object that describes
the abstract characteristics of the VisualPortport - the associated port object in the model-scope.
Port.coordHorizontal - the vertical coordinate for the visualport.coordVertical - the horizontal coordinate for the visualport.
- Returns:
- VisualPort the constructed
VisualPort instance. - See Also:
Port,
VisualPortDenotation
public abstract VisualNode newVisualNode(Node node,
java.util.List visualports,
Composite composite)
VisualNode associated with the given model
node and providing the given ports. This VisualNode
will be graphically represented by the given Composite.
node - the associated Node
in the model scope.visualports - a list of VisualPorts that are initially
assigned to the instance.composite - the Composite
the VisualNode is using as its graphical representation.
VisualNode object.Node,
Composite
public abstract VisualNode newVisualNode(Node node,
java.util.List visualports,
VisualNodeInfo info,
Composite composite)
VisualNode object.
node - the associated node.visualports - a list of VisualPorts that are initially
assigned to the instance.info - the associated VisualNodeInfo object.composite - the Composite
the visualnode is using as its graphical representation.
VisualNode object.Node,
Composite,
VisualNodeInfo
public abstract VisualNode newVisualNode(Node node,
GeometryDescriptor geometry)
throws GeometryNotSupportedException
VisualNode object.
node - the Node
to associate the created view object with.geometry - the geometry to apply upon creation.
VisualNode instance.
GeometryNotSupportedException - thrown if the geometry
cannot be applied.
public abstract VisualNode newVisualNode(Node node,
VisualNodeInfo info,
GeometryDescriptor geometry)
throws GeometryNotSupportedException
VisualNode object.
node - the Node
to associate the created view object with.info - an optional VisualNodeInfo.geometry - the geometry to apply upon creation.
VisualNode instance.
GeometryNotSupportedException - thrown if the geometry
cannot be applied.
public abstract VisualSubgraph newVisualSubgraph(Subgraph subgraph,
VisualGraph visualgraph,
CompositeGroup compositegroup)
VisualSubgraph that will be nested within the
given VisualGraph and visualized by the
CompositeGroup given by parameter
compositegroup.
subgraph - the Subgraph
of the graph model scope.visualgraph - the VisualGraph that contains the created
subgraph.compositegroup - the CompositeGroup that visualizes the
subgraph.
VisualSubgraph.VisualGraph,
VisualSubgraph,
CompositeGroup
public abstract VisualSubgraph newVisualSubgraph(Subgraph subgraph,
VisualNodeInfo info,
VisualGraph visualgraph,
CompositeGroup compositegroup)
VisualSubgraph.
subgraph - the Subgraph
that this item is associated with.info - the associated VisualNodeInfo object.visualgraph - the VisualGraph that contains the created
subgraph.compositegroup - the CompositeGroup that visualizes the
subgraph.
VisualSubgraph.VisualGraph,
VisualSubgraph
public abstract VisualSubgraph newVisualSubgraph(Graph graph,
Subgraph subgraph,
GeometryDescriptor geometry)
throws GeometryNotSupportedException
VisualSubgraph object.
graph - the model-scope Graph to embed.subgraph - the Subgraph
that this item is associated with.geometry - the geometry to apply upon creation.
VisualSubgraph.
GeometryNotSupportedException - thrown if the geometry
cannot be applied.
public abstract VisualSubgraph newVisualSubgraph(Graph graph,
Subgraph subgraph,
VisualNodeInfo info,
GeometryDescriptor geometry)
throws GeometryNotSupportedException
VisualSubgraph object.
graph - the model-scope Graph to embed.subgraph - the Subgraph
that this item is associated with.info - an optional VisualNodeInfo object.geometry - the geometry to apply upon creation.
VisualSubgraph.
GeometryNotSupportedException - thrown if the geometry
cannot be applied.
public abstract VisualEdge newVisualEdge(Edge edge,
VisualNode source,
VisualNode target)
VisualEdge associated with the given model
edge. The edge is connected to the given source and target
VisualNode object.
edge - the associated edge.source - the visual source node.target - the visual target node.
VisualEdge object.Edge,
VisualEdge,
VisualNode
public abstract VisualEdge newVisualEdge(Edge edge,
VisualNode visualsource,
VisualNode visualtarget,
VisualEdgeInfo info)
VisualEdge object.
edge - the associated edge.visualsource - the visual source node.visualtarget - the visual target node.info - the associated VisualEdgeInfo.
VisualEdge object.Edge,
VisualEdge,
VisualNode,
VisualEdgeInfo
public abstract VisualEdge newVisualEdge(Edge edge,
VisualNode visualsource,
VisualNode visualtarget,
CompositeLine composite)
VisualEdge object.
edge - the associated edge.visualsource - the visual source node.visualtarget - the visual target node.composite - the CompositeLine
of the VisualEdge.
VisualEdge object.Edge,
VisualEdge,
VisualNode,
Edge,
CompositeLine
public abstract VisualEdge newVisualEdge(Edge edge,
VisualNode source,
VisualNode target,
VisualEdgeInfo info,
CompositeLine composite)
VisualEdge object.
edge - the associated edge.source - the visual source node.target - the visual target node.info - the associated VisualEdgeInfo.composite - the CompositeLine
of the VisualEdge.
VisualEdge object.Edge,
VisualNode,
VisualEdgeInfo,
CompositeLine
public abstract VisualEdge newVisualEdge(Edge edge,
VisualNode visualsource,
VisualNode visualtarget,
VisualPort visualsourceport,
VisualPort visualtargetport,
VisualEdgeInfo info)
public abstract VisualEdge newVisualEdge(Edge edge,
VisualNode visualsource,
VisualNode visualtarget,
VisualPort visualsourceport,
VisualPort visualtargetport,
CompositeLine composite)
public abstract VisualEdge newVisualEdge(Edge edge,
VisualNode visualsource,
VisualNode visualtarget,
VisualPort visualsourceport,
VisualPort visualtargetport,
VisualEdgeInfo info,
CompositeLine composite)
public abstract VisualGraph newVisualGraph(Graph graph,
java.lang.String nodeGeometry,
java.lang.String nodeStyle,
java.lang.String edgeStyle)
VisualGraph.
graph - the graph model for this VisualGraph.nodeGeometry - The identifier of the node geometry in the
GeometryPool, if this is null
default is 'Rectangle'nodeStyle - The identifier of the node style in the
StylePool, if this is null
default is 'TenseRectangle'edgeStyle - The identifier of the edge style in the
StylePool, if this is null
default is 'TenseLine'
Graphpublic abstract VisualGraph newVisualGraph(Graph graph)
VisualGraph associated with the given model
graph.
graph - the graph model for the VisualGraph. The
controller keeps a reference to the graph model (Graph).
VisualGraph instance.Graphpublic abstract VisualGraphView newVisualGraphView(GraphController graphcontroller)
VisualGraphView object.
graphcontroller - the graph-controller that manages communication
and interaction between this instance and its underlying model.
CoordinateSystem
for this object.
VisualGraphView object.VisualGraphView,
GraphController
public abstract VisualGraphView newVisualGraphView(GraphController graphcontroller,
java.lang.String nodeGeometry,
java.lang.String nodeStyle,
java.lang.String edgeStyle)
VisualGraphView object.
graphcontroller - the graphcontroller that manages communication
and interaction between this instance and its underlying model.
CoordinateSystem
for this object.nodeGeometry - The identifier of the node geometry in the
GeometryPool, if this is null
default is 'Rectangle'nodeStyle - The identifier of the node style in the
StylePool, if this is null
default is 'TenseRectangle'edgeStyle - The identifier of the edge style in the
StylePool, if this is null
default is 'TenseLine'
VisualGraphView object.VisualGraphView,
GraphControllerpublic abstract VisualPortDenotation newVisualPortDenotation(double[] boundedInterval)
VisualPortDenotation using the given interval.
Parameter boundedInterval has to be double-array of length
2, where the value stored at index 0 describes the beginning of the
interval and the value stored at index 1 describes the end of the
interval.
boundedInterval - a double-array of length 2, where the value
stored at index 0 describes the beginning of the interval and the
value stored at index 1 describes the end of the interval.
VisualPortDenotation instance.VisualPortDenotationpublic abstract boolean loadResources()
public static final VisualNode makeDefaultVisualNode(GraphViewFactory factory,
Node node,
Composite composite)
VisualNode instance.
The instance is configured in a default way. A set of default
ports is assigned to the VisualNode. Typically this
set of default ports includes four ports at each side of the rectangular
bounding box of the VisualNode and an additional port
in the middle.
factory - the graphview factory that is used to allocate and
construct the default node.node - the Node in the
model-scope that is associated with the constructed VisualNode.composite - the Composite that
should be used to visually represent the new VisualNode.
VisualNode that was constructed and configured.Node,
GraphViewFactory,
Composite
public static final VisualNode makeDefaultVisualNode(GraphViewFactory factory,
Node node,
Composite composite,
VisualNodeInfo info)
VisualNode instance
and associates a VisualNodeInfo object with it.
The instance is configured in a default way. A set of default
ports is assigned to the VisualNode. Typically this
set of default ports includes four ports at each side of the rectangular
bounding box of the VisualNode and an additional port
in the middle. The given VisualNodeInfo is associated to
the returned VisualNode.
factory - the graphview factory that is used to allocate and
construct the default node.node - the Node in the
model-scope that is associated with the constructed VisualNode.composite - the Composite that
should be used to visually represent the new VisualNode.info - optional VisualNodeInfo object reference.
VisualNode that was constructed and configured.Node,
VisualNodeInfo,
GraphViewFactory,
Compositepublic static GraphViewFactory newInstance()
GraphViewFactory implementation.
GraphViewFactory. instance.
FactoryConfigurationError - is thrown whenever something
goes wrong. For instance, there is no factory classname found or the
factory class itself is not found or not accessible and so on
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||