Search this API

y.io.graphml.graph2d
Class NodePortProvider

java.lang.Object
  extended by y.io.graphml.graph2d.NodePortProvider
All Implemented Interfaces:
PortProvider

public class NodePortProvider
extends java.lang.Object
implements PortProvider

Default PortProvider implementation for NodePorts.

 

Constructor Summary
NodePortProvider()
           
 
Method Summary
 java.util.Collection getPorts(Node node, GraphMLWriteContext context)
          Retrieve the port objects that belong to node.
 Port getSourcePort(Edge e, GraphMLWriteContext context)
          Retrieve the source port object for the given edge.
 Port getTargetPort(Edge e, GraphMLWriteContext context)
          Retrieve the target port object for the given edge.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodePortProvider

public NodePortProvider()
Method Detail

getPorts

public java.util.Collection getPorts(Node node,
                                     GraphMLWriteContext context)
Description copied from interface: PortProvider
Retrieve the port objects that belong to node.

Specified by:
getPorts in interface PortProvider
Parameters:
node - The node for which the ports are needed.
Returns:
A collection of Port objects.

getSourcePort

public Port getSourcePort(Edge e,
                          GraphMLWriteContext context)
Description copied from interface: PortProvider
Retrieve the source port object for the given edge.

Specified by:
getSourcePort in interface PortProvider
Parameters:
e - The edge to query.
Returns:
A port object representing the source port of e.

getTargetPort

public Port getTargetPort(Edge e,
                          GraphMLWriteContext context)
Description copied from interface: PortProvider
Retrieve the target port object for the given edge.

Specified by:
getTargetPort in interface PortProvider
Parameters:
e - The edge to query.
Returns:
A port object representing the target port of e.

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.