Search this API

y.layout.hierarchic.incremental
Interface Layers


public interface Layers

Container class that manages multiple Layer instances. HierarchicLayouter creates instances of this class and passes them to the instances that handle the various subtasks of the layout process during automatic layout. Method createInstance() can be used like 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 a layer by index
 Layer insert(byte type, int position)
          Creates, inserts and returns a layer of a given type.
 void remove(int index)
          Removes a layer by index.
 int size()
          Returns the number of layers in this instance
 

Method Detail

size

int size()
Returns the number of layers in this instance

Returns:
the number of layers

getLayer

Layer getLayer(int i)
Returns a layer by index

Parameters:
i - the zero-based index
Returns:
the layer at the given index

insert

Layer insert(byte type,
             int position)
Creates, inserts and returns a layer of a given type.

Parameters:
type - a type constant as defined in the Layer interface
position - the position where this layer will be inserted
Returns:
a newly created read-to-use layer instance

remove

void remove(int index)
Removes a layer by index.

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

createInstance

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

Returns:
an instance of the same type as the current instance. It will be empty initially.

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