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

List of all members.

Classes

class  StackingStrategy
class  WidgetStackingConstraint

Public Types

enum  Alignment {
  TOP = (0.5, 0.0), TOP_LEFT = (0.0, 0.0), TOP_RIGHT = (1.0, 0.0), CENTER = (0.5, 0.5),
  LEFT = (0.0, 0.5), RIGHT = (1.0, 0.5), BOTTOM = (0.5, 1.0), BOTTOM_LEFT = (0.0, 1.0),
  BOTTOM_RIGHT = (1.0, 1.0)
}

Public Member Functions

 StackingLayout ()
 StackingLayout (StackingStrategy strategy)
StackingStrategy getStrategy ()
void setStrategy (StackingStrategy strategy)
void layout (Widget widget)
void justify (Widget widget)
boolean requiresJustification (Widget widget)

Static Protected Member Functions

static Dimension computeRatio (int w, int h, double ratio, boolean maximize)

Private Attributes

StackingStrategy strategy

Detailed Description

Layout placing all the objects on a stack.

An object may be optionally stretched or resized to the given ratio. A dynamically calculated insets can be applied to the non stretched widgets.

Example:

 // widget containing one element with a stretched background
 Widget w = new Widget(scene);
 w.setLayout(new StackingLayout());
 w.addChild(background, WidgetStackingConstraint.STRETCHED);
 w.addChild(element);
 
Author:
kma

Member Enumeration Documentation

The constants for the alignment of the stack.

Enumerator:
TOP 
TOP_LEFT 
TOP_RIGHT 
CENTER 
LEFT 
RIGHT 
BOTTOM 
BOTTOM_LEFT 
BOTTOM_RIGHT 

Constructor & Destructor Documentation

metadone.client.grasyla2.visuallibrary.widgets.layouts.StackingLayout.StackingLayout ( )
metadone.client.grasyla2.visuallibrary.widgets.layouts.StackingLayout.StackingLayout ( StackingStrategy  strategy)

Creates a stacking layout.

Parameters:
strategyThe strategy
Exceptions:
NullPointerExceptionwhen strategy is null

References metadone.client.grasyla2.visuallibrary.widgets.layouts.StackingLayout.strategy.


Member Function Documentation

static Dimension metadone.client.grasyla2.visuallibrary.widgets.layouts.StackingLayout.computeRatio ( int  w,
int  h,
double  ratio,
boolean  maximize 
) [static, protected]
void metadone.client.grasyla2.visuallibrary.widgets.layouts.StackingLayout.justify ( Widget  widget)
boolean metadone.client.grasyla2.visuallibrary.widgets.layouts.StackingLayout.requiresJustification ( Widget  widget)
void metadone.client.grasyla2.visuallibrary.widgets.layouts.StackingLayout.setStrategy ( StackingStrategy  strategy)

Member Data Documentation


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