MetaDone
metadone.client.grasyla2.visuallibrary.widgets.layouts.StackingLayout.StackingStrategy Class Reference
Inheritance diagram for metadone.client.grasyla2.visuallibrary.widgets.layouts.StackingLayout.StackingStrategy:
Collaboration diagram for metadone.client.grasyla2.visuallibrary.widgets.layouts.StackingLayout.StackingStrategy:

List of all members.

Public Member Functions

 StackingStrategy (Alignment align, double ratio, boolean consideringStretchedObjectBounds)
boolean isConsideringStretchedObjectBounds ()
Alignment getAlignment ()
double getRatio ()
boolean hasRatio ()
StackingStrategy deriveRatio (double ratio)
StackingStrategy deriveAlignment (Alignment align)

Static Public Attributes

static final StackingStrategy DEFAULT_STRATEGY = new StackingStrategy(null, 0.0, false)

Protected Member Functions

Insets computeDynamicInsets (Widget widget, Dimension childrenSize)

Private Attributes

boolean consideringStretchedObjectBounds
Alignment align
double ratio

Detailed Description

The strategy used by the stacking layout.


Constructor & Destructor Documentation

metadone.client.grasyla2.visuallibrary.widgets.layouts.StackingLayout.StackingStrategy.StackingStrategy ( Alignment  align,
double  ratio,
boolean  consideringStretchedObjectBounds 
)

Initializes this strategy.

Parameters:
alignThe position of the center of the stack (if null, CENTER is used
ratioThe ratio (width/height) of the layout (null and negative values are ignored)
consideringStretchedObjectBoundsWhether stretched objects are considered for computing the total size of the container

References metadone.client.grasyla2.visuallibrary.widgets.layouts.StackingLayout.StackingStrategy.align, metadone.client.grasyla2.visuallibrary.widgets.layouts.StackingLayout.StackingStrategy.consideringStretchedObjectBounds, and metadone.client.grasyla2.visuallibrary.widgets.layouts.StackingLayout.StackingStrategy.ratio.

Referenced by metadone.client.grasyla2.visuallibrary.widgets.layouts.StackingLayout.StackingStrategy.deriveAlignment(), and metadone.client.grasyla2.visuallibrary.widgets.layouts.StackingLayout.StackingStrategy.deriveRatio().


Member Function Documentation

Insets metadone.client.grasyla2.visuallibrary.widgets.layouts.StackingLayout.StackingStrategy.computeDynamicInsets ( Widget  widget,
Dimension  childrenSize 
) [protected]

Computes the additional margins applied to non-stretched elements.

Override this method for custom insets.

Parameters:
widgetThe widget containing the children
childrenSizeThe dimensions of the stacked children
Returns:
A positive integer

Reimplemented in metadone.client.grasyla2.visuallibrary.widgets.backgrounds.WidgetOvalShape.OvalStackingStrategy, and metadone.client.grasyla2.visuallibrary.widgets.backgrounds.WidgetRhombShape.RhombStackingStrategy.

Referenced by metadone.client.grasyla2.visuallibrary.widgets.layouts.StackingLayout.layout().

StackingStrategy metadone.client.grasyla2.visuallibrary.widgets.layouts.StackingLayout.StackingStrategy.deriveAlignment ( Alignment  align)
boolean metadone.client.grasyla2.visuallibrary.widgets.layouts.StackingLayout.StackingStrategy.isConsideringStretchedObjectBounds ( )

Indicates whether stretched objects are considered when calculating the size of the container.

Returns:
Boolean

References metadone.client.grasyla2.visuallibrary.widgets.layouts.StackingLayout.StackingStrategy.consideringStretchedObjectBounds.

Referenced by metadone.client.grasyla2.visuallibrary.widgets.layouts.StackingLayout.layout().


Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations