Search this API

y.layout
Class TemporaryGroupDescriptor

java.lang.Object
  extended by y.layout.TemporaryGroupDescriptor

public class TemporaryGroupDescriptor
extends java.lang.Object

This class allows specifying temporary groups for nodes that are considered by the TemporaryGroupNodeInsertionStage.

More precisely, nodes mapped to the same TemporaryGroupDescriptor instance will form a temporary group inserted by the stage. This mapping is specified by a DataProvider registered with key TemporaryGroupNodeInsertionStage.TEMPORARY_GROUP_DESCRIPTOR_DPKEY. A TemporaryGroupDescriptor may have a reference to its parent which allows to create a hierarchically nested grouping structure.

 

Constructor Summary
TemporaryGroupDescriptor()
          Creates a new instance of TemporaryGroupDescriptor.
TemporaryGroupDescriptor(TemporaryGroupDescriptor parent, Layouter recursiveGroupLayoutAlgorithm)
          Creates a new instance of TemporaryGroupDescriptor using the given descriptor as parent and the layout algorithm that is considered by the RecursiveGroupLayouter.
 
Method Summary
 YRectangle getComputedBounds()
          Returns the bounds of this temporary group.
 NodeHalo getHalo()
          Returns the halo of this temporary group or null if the group has no halo.
 YInsets getInsets()
          Returns the insets of this temporary group or null if the group has no insets.
 YDimension getMinimumSize()
          Returns the minimum size of this temporary group or null if the group has no minimum size constraint.
 TemporaryGroupDescriptor getParent()
          Returns the parent group of this temporary group.
 Layouter getRecursiveGroupLayoutAlgorithm()
          Returns the layout algorithm that is considered by the RecursiveGroupLayouter when arranging the nodes belonging to this temporary group.
 void setHalo(NodeHalo halo)
          Specifies the halo of this temporary group or null if the group has no halo.
 void setInsets(YInsets insets)
          Specifies the insets of this temporary group or null if the group has no insets.
 void setMinimumSize(YDimension minimumSize)
          Specifies the minimum size of this temporary group or null if the group has no minimum size constraint.
 void setParent(TemporaryGroupDescriptor parent)
          Specifies the parent group of this temporary group.
 void setRecursiveGroupLayoutAlgorithm(Layouter layoutAlgorithm)
          Specifies the layout algorithm that is considered by the RecursiveGroupLayouter when arranging the nodes belonging to this temporary group.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemporaryGroupDescriptor

public TemporaryGroupDescriptor()
Creates a new instance of TemporaryGroupDescriptor.


TemporaryGroupDescriptor

public TemporaryGroupDescriptor(TemporaryGroupDescriptor parent,
                                Layouter recursiveGroupLayoutAlgorithm)
Creates a new instance of TemporaryGroupDescriptor using the given descriptor as parent and the layout algorithm that is considered by the RecursiveGroupLayouter.

If the applied TemporaryGroupNodeInsertionStage uses the RecursiveGroupLayouter as core layout algorithm, the recursive group layout algorithm specified here is responsible for the arrangement of the nodes belonging to this temporary group. Internally, the temporary inserted group node that encloses the nodes is automatically mapped in a DataProvider registered with key RecursiveGroupLayouter.GROUP_NODE_LAYOUTER_DPKEY.

 
The specified recursive group layout algorithm is only considered if the used core layout algorithm is of type RecursiveGroupLayouter.
Parameters:
parent - the parent temporary group of this group
recursiveGroupLayoutAlgorithm - the layout algorithm that is applied in each recursion step
Method Detail

getRecursiveGroupLayoutAlgorithm

public Layouter getRecursiveGroupLayoutAlgorithm()
Returns the layout algorithm that is considered by the RecursiveGroupLayouter when arranging the nodes belonging to this temporary group.

If the applied TemporaryGroupNodeInsertionStage uses the RecursiveGroupLayouter as core layout algorithm, the recursive group layout algorithm specified here is responsible for the arrangement of the nodes belonging to this temporary group. Internally, the temporary inserted group node that encloses the nodes is automatically mapped in a DataProvider registered with key RecursiveGroupLayouter.GROUP_NODE_LAYOUTER_DPKEY.

 
The specified recursive group layout algorithm is only considered if the used core layout algorithm is of type RecursiveGroupLayouter.
Default Value:
The default value is null.
Returns:
the layout algorithm that is considered by the RecursiveGroupLayouter
See Also:
setRecursiveGroupLayoutAlgorithm(Layouter)

setRecursiveGroupLayoutAlgorithm

public void setRecursiveGroupLayoutAlgorithm(Layouter layoutAlgorithm)
Specifies the layout algorithm that is considered by the RecursiveGroupLayouter when arranging the nodes belonging to this temporary group.

If the applied TemporaryGroupNodeInsertionStage uses the RecursiveGroupLayouter as core layout algorithm, the recursive group layout algorithm specified here is responsible for the arrangement of the nodes belonging to this temporary group. Internally, the temporary inserted group node that encloses the nodes is automatically mapped in a DataProvider registered with key RecursiveGroupLayouter.GROUP_NODE_LAYOUTER_DPKEY.

 
The specified recursive group layout algorithm is only considered if the used core layout algorithm is of type RecursiveGroupLayouter.
Default Value:
The default value is null.
Parameters:
layoutAlgorithm -

getParent

public TemporaryGroupDescriptor getParent()
Returns the parent group of this temporary group.

Returns:
the parent group
See Also:
setParent(TemporaryGroupDescriptor)

setParent

public void setParent(TemporaryGroupDescriptor parent)
Specifies the parent group of this temporary group.

Default Value:
The default value is null.
Parameters:
parent - the parent group

getInsets

public YInsets getInsets()
Returns the insets of this temporary group or null if the group has no insets.

 
The specified insets are only considered if the TemporaryGroupNodeInsertionStage uses a core layout algorithm that can handle group nodes.
Returns:
the insets of this temporary group
See Also:
setInsets(YInsets)

setInsets

public void setInsets(YInsets insets)
Specifies the insets of this temporary group or null if the group has no insets.

 
The specified insets are only considered if the TemporaryGroupNodeInsertionStage uses a core layout algorithm that can handle group nodes.
Default Value:
The default value is null. The temporary group has no insets.
Parameters:
insets - the insets of this temporary group

getMinimumSize

public YDimension getMinimumSize()
Returns the minimum size of this temporary group or null if the group has no minimum size constraint.

 
The specified minimum size is only considered if the TemporaryGroupNodeInsertionStage uses a core layout algorithm that can handle group nodes and minimum group sizes.
Returns:
the minimum size of this temporary group
See Also:
setMinimumSize(YDimension)

setMinimumSize

public void setMinimumSize(YDimension minimumSize)
Specifies the minimum size of this temporary group or null if the group has no minimum size constraint.

 
The specified minimum size is only considered if the TemporaryGroupNodeInsertionStage uses a core layout algorithm that can handle group nodes and minimum group sizes.
Default Value:
The default value is null. The temporary group has no minimum size constraint.
Parameters:
minimumSize - the minimum size of this temporary group

getHalo

public NodeHalo getHalo()
Returns the halo of this temporary group or null if the group has no halo.

 
The specified halo is only considered if the TemporaryGroupNodeInsertionStage uses a core layout algorithm that can handle group nodes and node halos.
Returns:
the halo of the temporary group
See Also:
setHalo(NodeHalo)

setHalo

public void setHalo(NodeHalo halo)
Specifies the halo of this temporary group or null if the group has no halo.

 
The specified halo is only considered if the TemporaryGroupNodeInsertionStage uses a core layout algorithm that can handle group nodes and node halos.
Default Value:
The default value is null. The temporary group has no halo.
Parameters:
halo - the halo of the temporary group

getComputedBounds

public YRectangle getComputedBounds()
Returns the bounds of this temporary group.

 
If the TemporaryGroupNodeInsertionStage uses a core layout algorithm that can handle group nodes, all nodes associated with this temporary group should be placed within the returned bounds.
Returns:
the bounds of the temporary group

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