Search this API

y.layout.hierarchic.incremental
Interface Layer


public interface Layer

This interface describes a single layer in a hierarchic layout.

A layer consists of nodes along with the associated same-layer edges. Each layer has a type and an index representing its order in the list of layers.

See Also:
Layers, HierarchicLayouter, Layerer
 

Field Summary
static byte TYPE_LABEL
          A constant describing a layer consisting mainly of label nodes or dummy nodes.
static byte TYPE_LOWER_GROUP_CONNECTOR_NODES
          Describes a layer below a group to store the connector proxies where edges connect to groups.
static byte TYPE_NORMAL
          A constant describing a normal layer consisting mainly of normal nodes.
static byte TYPE_SOURCE_GROUP_NODES
          A constant describing a layer consisting of source group nodes and dummy nodes.
static byte TYPE_TARGET_GROUP_NODES
          A constant describing a layer consisting of target group nodes and dummy nodes.
static byte TYPE_UPPER_GROUP_CONNECTOR_NODES
          Describes a layer above a group to store the connector proxies where edges connect to groups.
 
Method Summary
 void add(Node node)
          Adds a newly created Node to this Layer instance.
 void addSameLayerEdge(Edge edge)
          Adds a same-layer Edge to this Layer instance.
 int getIndex()
          Returns the index of this Layer instance in the list of all layers.
 NodeList getList()
          Returns a list of the Nodes associated with this Layer instance.
 RowDescriptor getRow()
          Returns the RowDescriptor associated with this Layer instance.
 YList getSameLayerEdges()
          Returns a list of all same-layer Edges associated with this Layer instance.
 byte getType()
          Returns the type of this Layer instance.
 void remove()
          Removes the current layer from the list of layers.
 void remove(Node node)
          Removes a Node from this Layer instance.
 void setNodeOrder(YList list)
          Adjusts the order of the Nodes of this Layer instance according to the given order.
 void setRow(RowDescriptor row)
          Specifies the RowDescriptor associated with this Layer instance.
 

Field Detail

TYPE_NORMAL

static final byte TYPE_NORMAL
A constant describing a normal layer consisting mainly of normal nodes.

See Also:
Constant Field Values

TYPE_LABEL

static final byte TYPE_LABEL
A constant describing a layer consisting mainly of label nodes or dummy nodes.

See Also:
Constant Field Values

TYPE_SOURCE_GROUP_NODES

static final byte TYPE_SOURCE_GROUP_NODES
A constant describing a layer consisting of source group nodes and dummy nodes.

See Also:
Constant Field Values

TYPE_TARGET_GROUP_NODES

static final byte TYPE_TARGET_GROUP_NODES
A constant describing a layer consisting of target group nodes and dummy nodes.

See Also:
Constant Field Values

TYPE_UPPER_GROUP_CONNECTOR_NODES

static final byte TYPE_UPPER_GROUP_CONNECTOR_NODES
Describes a layer above a group to store the connector proxies where edges connect to groups.

See Also:
Constant Field Values

TYPE_LOWER_GROUP_CONNECTOR_NODES

static final byte TYPE_LOWER_GROUP_CONNECTOR_NODES
Describes a layer below a group to store the connector proxies where edges connect to groups.

See Also:
Constant Field Values
Method Detail

add

void add(Node node)
Adds a newly created Node to this Layer instance.

Parameters:
node - the Node to be added

addSameLayerEdge

void addSameLayerEdge(Edge edge)
Adds a same-layer Edge to this Layer instance.

Parameters:
edge - the same-layer Edge to be added

getSameLayerEdges

YList getSameLayerEdges()
Returns a list of all same-layer Edges associated with this Layer instance.

Returns:
a list of all same-layer Edges

remove

void remove(Node node)
Removes a Node from this Layer instance.

Parameters:
node - the Node to be removed

remove

void remove()
Removes the current layer from the list of layers.


getList

NodeList getList()
Returns a list of the Nodes associated with this Layer instance.

Returns:
a list of the Nodes of this Layer

setNodeOrder

void setNodeOrder(YList list)
Adjusts the order of the Nodes of this Layer instance according to the given order.

Parameters:
list - the given list to be used

getType

byte getType()
Returns the type of this Layer instance.

Returns:
one of the predefined layer types

getIndex

int getIndex()
Returns the index of this Layer instance in the list of all layers.

Returns:
the index of this Layer instance

getRow

RowDescriptor getRow()
Returns the RowDescriptor associated with this Layer instance.

Returns:
a RowDescriptor instance
See Also:
setRow(RowDescriptor)

setRow

void setRow(RowDescriptor row)
Specifies the RowDescriptor associated with this Layer instance.

Parameters:
row - the given RowDescriptor instance

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