Search this API

y.layout.multipage
Class MultiPageLayout

java.lang.Object
  extended by y.layout.multipage.MultiPageLayout
All Implemented Interfaces:
ElementInfoManager

public class MultiPageLayout
extends java.lang.Object
implements ElementInfoManager

This class represents the result of a layout run of MultiPageLayouter.

A layout run subdivides the input graph into several LayoutGraphs (called page graphs) such that the layout of each graph fits the specified maximum page size. This class provides access to the different page graphs (see method getPage(int)).

An instance of this class can be either obtained by calling MultiPageLayouter.calcLayout(y.layout.LayoutGraph) or MultiPageLayouter.doLayout(y.layout.LayoutGraph). In the latter case, a LayoutCallback has to be set before starting the layout run.

 

Method Summary
 EdgeInfo getEdgeInfo(Edge edge)
          Returns the edge information object of the given edge.
 EdgeLabelInfo getEdgeLabelInfo(EdgeLabelLayout edgeLabelLayout)
          Returns the edge label information object of the given edge label layout.
 NodeInfo getNodeInfo(Node node)
          Returns the node information object of the given node.
 NodeLabelInfo getNodeLabelInfo(NodeLabelLayout nodeLabelLayout)
          Returns the node label layout information object of the given node label layout.
 LayoutGraph getPage(int pageNo)
          Returns the page graph associated with the given page number.
 int pageCount()
          Returns the number of pages available in this MultiPageLayout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

pageCount

public int pageCount()
Returns the number of pages available in this MultiPageLayout.

Each page contains a page graph whose layout fits the specified maximum page size.

Returns:
the number of available pages
See Also:
getPage(int)

getPage

public LayoutGraph getPage(int pageNo)
Returns the page graph associated with the given page number. The page number is zero-based, i.e., the first page has number 0 and the last page pageCount - 1.

A page graph is a subgraph of the input graph whose layout fits the specified maximum page size.

 
A page graph contains special nodes (that are not contained in the input graph) to guarantee that no information is lost when splitting edges that connect nodes placed on different pages.
Parameters:
pageNo - the given page number (with 0 being the first page)
Returns:
the page graph associated with the given page number
Throws:
java.lang.IndexOutOfBoundsException - if pageNo >= pageCount or pageNo < 0
See Also:
pageCount()

getEdgeInfo

public EdgeInfo getEdgeInfo(Edge edge)
Description copied from interface: ElementInfoManager
Returns the edge information object of the given edge.

Specified by:
getEdgeInfo in interface ElementInfoManager
Parameters:
edge - the edge for which the information object should be returned
Returns:
the edge information object of the given edge

getNodeInfo

public NodeInfo getNodeInfo(Node node)
Description copied from interface: ElementInfoManager
Returns the node information object of the given node.

Specified by:
getNodeInfo in interface ElementInfoManager
Parameters:
node - the node for which the information object should be returned
Returns:
the node information object of the given node

getNodeLabelInfo

public NodeLabelInfo getNodeLabelInfo(NodeLabelLayout nodeLabelLayout)
Description copied from interface: ElementInfoManager
Returns the node label layout information object of the given node label layout.

Specified by:
getNodeLabelInfo in interface ElementInfoManager
Parameters:
nodeLabelLayout - the node label layout for which the information object should be returned
Returns:
the node label information object of the given node label layout

getEdgeLabelInfo

public EdgeLabelInfo getEdgeLabelInfo(EdgeLabelLayout edgeLabelLayout)
Description copied from interface: ElementInfoManager
Returns the edge label information object of the given edge label layout.

Specified by:
getEdgeLabelInfo in interface ElementInfoManager
Parameters:
edgeLabelLayout - the edge label layout for which the information object should be returned
Returns:
the edge label information object of the given edge label layout

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