Search this API

y.layout.hierarchic.incremental
Interface Layers


public interface Layers

This interface manages multiple Layer instances.

HierarchicLayouter creates instances of this class and passes them to the instances that handle the various sub-tasks of the layout process during automatic layout.

Method createInstance() can be used as a factory method to obtain temporary Layers instances.

See Also:
Layer
 

Method Summary
 Layers createInstance()
          Creates a new and empty Layers instance that can be used on the same graph instance for temporary results.
 Layer getLayer(int i)
          Returns the layer at the specified position in this list of layers.
 Layer insert(byte type, int position)
          Creates, inserts and returns a layer of a given type associated with this list of layers.
 void remove(int index)
          Removes the layer at the specified position from this list of layers.
 int size()
          Returns the number of layers associated with this Layers instance.
 

Method Detail

size

int size()
Returns the number of layers associated with this Layers instance.

Returns:
the number of layers of this Layers instance

getLayer

Layer getLayer(int i)
Returns the layer at the specified position in this list of layers.

Parameters:
i - the zero-based index of the layer to return
Returns:
the layer at the specified position

insert

Layer insert(byte type,
             int position)
Creates, inserts and returns a layer of a given type associated with this list of layers.

Parameters:
type - one of the predefined layer types as defined in Layer interface
position - the index at which the specified layer is to be inserted
Returns:
a new Layer instance

remove

void remove(int index)
Removes the layer at the specified position from this list of layers.

Parameters:
index - the zero-based index of the layer to remove

createInstance

Layers createInstance()
Creates a new and empty Layers instance that can be used on the same graph instance for temporary results.

Returns:
a new and empty Layers instance

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