|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.multipage.DefaultElementFactory
public class DefaultElementFactory
Default implementation of an ElementFactory.
ElementFactory
Constructor Summary | |
---|---|
DefaultElementFactory()
|
Method Summary | |
---|---|
Edge |
createConnectorEdge(LayoutContext context,
Node connector,
Node opposite,
Object origEdgeId,
boolean atTarget)
Callback method for creating an edge of type EdgeInfo.TYPE_CONNECTOR . |
Node |
createConnectorNode(LayoutContext context,
YList edgeIds,
Object representedNodeId)
Callback method for creating a node of type NodeInfo.TYPE_CONNECTOR . |
Edge |
createProxyEdge(LayoutContext context,
Node proxyNode,
Node opposite,
Object replacingEdgeId,
Object origNodeId)
Callback method for creating an edge of type EdgeInfo.TYPE_PROXY . |
Node |
createProxyNode(LayoutContext context,
Object origNodeId)
Callback method for creating a node of type NodeInfo.TYPE_PROXY . |
Edge |
createProxyReferenceEdge(LayoutContext context,
Node proxyReference,
Node opposite,
Object referencingCopyId)
Callback method for creating an edge of type EdgeInfo.TYPE_PROXY_REFERENCE . |
Node |
createProxyReferenceNode(LayoutContext context,
Object referringProxyId)
Callback method for creating a node of type NodeInfo.TYPE_PROXY_REFERENCE . |
protected YDimension |
getDefaultNodeSize(LayoutContext context,
Object id,
byte type)
Returns the default size for nodes created by this factory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultElementFactory()
Method Detail |
---|
public Edge createConnectorEdge(LayoutContext context, Node connector, Node opposite, Object origEdgeId, boolean atTarget)
ElementFactory
EdgeInfo.TYPE_CONNECTOR
.
The edge should connect the given connector and opposite node.
Note: all implementations have to use method LayoutContext.createEdge(y.base.Node, y.base.Node, Object)
to create the edge.
createConnectorEdge
in interface ElementFactory
context
- an object providing relevant layout information, e.g., the current graph as well as
various information about the graph elements.connector
- the endpoint of the edge that represents the connector node.opposite
- the other endpoint of the edge.origEdgeId
- the id of the edge that is split by the connector edge.atTarget
- whether or not the connector node is the target of the edge.
EdgeInfo.TYPE_CONNECTOR
,
LayoutContext.createEdge(y.base.Node, y.base.Node, java.lang.Object)
public Node createConnectorNode(LayoutContext context, YList edgeIds, Object representedNodeId)
ElementFactory
NodeInfo.TYPE_CONNECTOR
.
Note: all implementations have to use method LayoutContext.createNode(Object)
to create the node.
createConnectorNode
in interface ElementFactory
context
- an object providing relevant layout information, e.g., the current graph as well as
various information about the graph elements.edgeIds
- a list that contains the ids of edges that are split by this connector. Note: multi-edges
(edges connecting the same nodes) may be split by the same connector pair.representedNodeId
- the id of the node that is represented by this connector.
NodeInfo.TYPE_CONNECTOR
,
LayoutContext.createNode(Object)
,
NodeInfo.getRepresentedNode()
public Node createProxyReferenceNode(LayoutContext context, Object referringProxyId)
ElementFactory
NodeInfo.TYPE_PROXY_REFERENCE
.
Note: all implementations have to use method LayoutContext.createNode(Object)
to create the node.
createProxyReferenceNode
in interface ElementFactory
context
- an object providing relevant layout information, e.g., the current graph as well as
various information about the graph elements.referringProxyId
- the id of the proxy to which the created node refers to.
NodeInfo.TYPE_PROXY_REFERENCE
,
LayoutContext.createNode(Object)
,
NodeInfo.TYPE_PROXY
public Node createProxyNode(LayoutContext context, Object origNodeId)
ElementFactory
NodeInfo.TYPE_PROXY
.
Note: all implementations have to use method LayoutContext.createNode(Object)
to create the node.
createProxyNode
in interface ElementFactory
context
- an object providing relevant layout information, e.g., the current graph as well as
various information about the graph elements.origNodeId
- the id of the node for which a proxy has to be created.
LayoutContext.createNode(Object)
,
NodeInfo.TYPE_PROXY
public Edge createProxyReferenceEdge(LayoutContext context, Node proxyReference, Node opposite, Object referencingCopyId)
ElementFactory
EdgeInfo.TYPE_PROXY_REFERENCE
.
This (undirected) edge should connect the given proxy reference and opposite node.
Note: all implementations have to use method LayoutContext.createEdge(y.base.Node, y.base.Node, Object)
to create the edge.
createProxyReferenceEdge
in interface ElementFactory
context
- an object providing relevant layout information, e.g., the current graph as well as
various information about the graph elements.proxyReference
- the endpoint of the edge that represents the proxy
reference node.opposite
- the other endpoint of the new edge.referencingCopyId
- the id of the proxy node that is referenced by the
proxy reference node.
EdgeInfo.TYPE_PROXY_REFERENCE
,
NodeInfo.TYPE_PROXY_REFERENCE
,
LayoutContext.createEdge(y.base.Node, y.base.Node, java.lang.Object)
public Edge createProxyEdge(LayoutContext context, Node proxyNode, Node opposite, Object replacingEdgeId, Object origNodeId)
ElementFactory
EdgeInfo.TYPE_PROXY
.
The edge should connect the given proxy node and opposite node.
Note: all implementations have to use method LayoutContext.createEdge(y.base.Node, y.base.Node, Object)
to create the edge.
createProxyEdge
in interface ElementFactory
context
- an object providing relevant layout information, e.g., the current graph as well as
various information about the graph elements.proxyNode
- the endpoint of the edge that represents the proxy node.opposite
- the other endpoint of the new edge.replacingEdgeId
- the id of the related edge that is connected to the original node.origNodeId
- the id of the original node to which the proxy node refers to.
EdgeInfo.TYPE_PROXY
,
NodeInfo.TYPE_PROXY
,
LayoutContext.createEdge(y.base.Node, y.base.Node, java.lang.Object)
protected YDimension getDefaultNodeSize(LayoutContext context, Object id, byte type)
createConnectorNode(LayoutContext, YList, Object)
,
createProxyReferenceNode(LayoutContext, Object)
, and/or
createProxyNode(LayoutContext, Object)
.
Must return a non-null
size with positive width and height.
context
- an object providing relevant layout information,
e.g., the current graph as well as various information about the graph
elements.id
- the element ID that was passed to the calling create
method.type
- the type of node to be created.
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |