|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LayoutInfo
Represented Information about a layouted object.
The completeness of this information depends on the objects
LayoutStage
.
Each object is described with:
getPosX(LayoutStage)
, getPosY(LayoutStage)
)
getWidth(LayoutStage)
)
getAscentHeight(LayoutStage)
,
getDescentHeight(LayoutStage)
Coordinates are given relative to the baseline. If the object has no descent, this means the origin of the object is the lower left corner.
The actual Graphical representation can be retrieved with
getGraphicObjects()
.
The stretch information ( getStretchAscent()
,
getStretchDescent()
, getStretchWidth()
) is set during the
parents layout and defines the size to which stretchable operators are
scaled to.
Method Summary | |
---|---|
float |
getAscentHeight(LayoutStage stage)
Returns the current height of the upper part of this component from the baseline. |
float |
getDescentHeight(LayoutStage stage)
Returns the current height of the lower part of this component from the baseline. |
List<GraphicsObject> |
getGraphicObjects()
|
float |
getHorizontalCenterOffset(LayoutStage stage)
Retrieve the X-position of the horizontal center of the content. |
LayoutStage |
getLayoutStage()
The LayoutStage this element represents. |
float |
getPosX(LayoutStage stage)
Retrieve the X position of this element relative to its parent. |
float |
getPosY(LayoutStage stage)
Retrieve the Y position of this element relative to its parent. |
float |
getStretchAscent()
Retrieve the stretch ascent if set, or STAGE1.ascent if unset. |
float |
getStretchDescent()
Retrieve the stretch descent if set, or STAGE1.descent if unset. |
float |
getStretchWidth()
Retrieve the stretch width if set, or STAGE1.width if unset. |
float |
getWidth(LayoutStage stage)
Returns the current width of this element. |
void |
moveTo(float x,
float y,
LayoutStage stage)
Move this element to the given position relative to its parent. |
void |
setAscentHeight(float ascentHeight,
LayoutStage stage)
|
void |
setDescentHeight(float descentHeight,
LayoutStage stage)
|
void |
setGraphicsObject(GraphicsObject graphicsObject)
|
void |
setHorizontalCenterOffset(float newOffset,
LayoutStage stage)
|
void |
setLayoutStage(LayoutStage newStage)
|
void |
setStretchAscent(float stretchAscent)
Set the stretch ascent for children. |
void |
setStretchDescent(float stretchDescent)
Set the stretch descent for children. |
void |
setStretchWidth(float stretchWidth)
Set the stretch width for children, or < 0 if children should be horizontally unstretched. |
void |
setWidth(float width,
LayoutStage stage)
|
void |
shiftVertically(float offsetY,
LayoutStage stage)
Shift vertically by given offset. |
Method Detail |
---|
LayoutStage getLayoutStage()
LayoutStage
this element represents. The information will
not be complete until the final LayoutStage (LayoutStage.STAGE2
) has been reached.
void setLayoutStage(LayoutStage newStage)
newStage
- new Layout Stage.float getAscentHeight(LayoutStage stage)
stage
- LayoutStage
to get this information for (either
LayoutStage.STAGE1
or LayoutStage.STAGE2
)
float getDescentHeight(LayoutStage stage)
stage
- LayoutStage
to get this information for (either
LayoutStage.STAGE1
or LayoutStage.STAGE2
)
float getWidth(LayoutStage stage)
stage
- LayoutStage
to get this information for (either
LayoutStage.STAGE1
or LayoutStage.STAGE2
)
float getHorizontalCenterOffset(LayoutStage stage)
stage
- LayoutStage
to get this information for (either
LayoutStage.STAGE1
or LayoutStage.STAGE2
)
void setHorizontalCenterOffset(float newOffset, LayoutStage stage)
newOffset
- new horizontal offset.stage
- LayoutStage
to get this information for (either
LayoutStage.STAGE1
or LayoutStage.STAGE2
)float getPosX(LayoutStage stage)
stage
- LayoutStage
to get this information for (either
LayoutStage.STAGE1
or LayoutStage.STAGE2
)
float getPosY(LayoutStage stage)
stage
- LayoutStage
to get this information for (either
LayoutStage.STAGE1
or LayoutStage.STAGE2
)
void moveTo(float x, float y, LayoutStage stage)
x
- new X positiony
- new Y positionstage
- LayoutStage
to get this information for (either
LayoutStage.STAGE1
or LayoutStage.STAGE2
)void shiftVertically(float offsetY, LayoutStage stage)
offsetY
- offset to shift.stage
- Stage to manipulate.void setAscentHeight(float ascentHeight, LayoutStage stage)
ascentHeight
- new ascentHeight.stage
- LayoutStage
to get this information for (either
LayoutStage.STAGE1
or LayoutStage.STAGE2
)void setDescentHeight(float descentHeight, LayoutStage stage)
descentHeight
- new descentHeight.stage
- LayoutStage
to get this information for (either
LayoutStage.STAGE1
or LayoutStage.STAGE2
)void setWidth(float width, LayoutStage stage)
width
- new width.stage
- LayoutStage
to get this information for (either
LayoutStage.STAGE1
or LayoutStage.STAGE2
)void setStretchWidth(float stretchWidth)
stretchWidth
- new stretch widthfloat getStretchWidth()
void setStretchDescent(float stretchDescent)
stretchDescent
- new stretch descentfloat getStretchDescent()
void setStretchAscent(float stretchAscent)
stretchAscent
- new stretch ascentfloat getStretchAscent()
void setGraphicsObject(GraphicsObject graphicsObject)
graphicsObject
- the GraphicsObject to set.List<GraphicsObject> getGraphicObjects()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |