|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.layout.client.Layout.Layer
public class Layout.Layer
This class is used to set the position and size of child elements.
Each child element has three values associated with each axis: {left, right, width} on the horizontal axis, and {top, bottom, height} on the vertical axis. Precisely two of three values may be set at a time, or the system will be over- or under-contrained. For this reason, the following methods are provided for setting these values:
setLeftRight(double, com.google.gwt.dom.client.Style.Unit, double, com.google.gwt.dom.client.Style.Unit)
setLeftWidth(double, com.google.gwt.dom.client.Style.Unit, double, com.google.gwt.dom.client.Style.Unit)
setRightWidth(double, com.google.gwt.dom.client.Style.Unit, double, com.google.gwt.dom.client.Style.Unit)
setTopBottom(double, com.google.gwt.dom.client.Style.Unit, double, com.google.gwt.dom.client.Style.Unit)
setTopHeight(double, com.google.gwt.dom.client.Style.Unit, double, com.google.gwt.dom.client.Style.Unit)
setBottomHeight(double, com.google.gwt.dom.client.Style.Unit, double, com.google.gwt.dom.client.Style.Unit)
By default, each layer is set to fill the entire parent (i.e., {left, top, right, bottom} = {0, 0, 0, 0}).
Field Summary | |
---|---|
(package private) double |
bottom
|
(package private) Style.Unit |
bottomUnit
|
(package private) Element |
child
|
(package private) Element |
container
|
(package private) double |
height
|
(package private) Style.Unit |
heightUnit
|
(package private) Layout.Alignment |
hPos
|
(package private) double |
left
|
(package private) Style.Unit |
leftUnit
|
(package private) double |
right
|
(package private) Style.Unit |
rightUnit
|
(package private) boolean |
setBottom
|
(package private) boolean |
setHeight
|
(package private) boolean |
setLeft
|
(package private) boolean |
setRight
|
(package private) boolean |
setTargetBottom
|
(package private) boolean |
setTargetHeight
|
(package private) boolean |
setTargetLeft
|
(package private) boolean |
setTargetRight
|
(package private) boolean |
setTargetTop
|
(package private) boolean |
setTargetWidth
|
(package private) boolean |
setTop
|
(package private) boolean |
setWidth
|
(package private) double |
sourceBottom
|
(package private) double |
sourceHeight
|
(package private) double |
sourceLeft
|
(package private) double |
sourceRight
|
(package private) double |
sourceTop
|
(package private) double |
sourceWidth
|
(package private) double |
targetBottom
|
(package private) Style.Unit |
targetBottomUnit
|
(package private) double |
targetHeight
|
(package private) Style.Unit |
targetHeightUnit
|
(package private) double |
targetLeft
|
(package private) Style.Unit |
targetLeftUnit
|
(package private) double |
targetRight
|
(package private) Style.Unit |
targetRightUnit
|
(package private) double |
targetTop
|
(package private) Style.Unit |
targetTopUnit
|
(package private) double |
targetWidth
|
(package private) Style.Unit |
targetWidthUnit
|
(package private) double |
top
|
(package private) Style.Unit |
topUnit
|
(package private) java.lang.Object |
userObject
|
(package private) boolean |
visible
|
(package private) Layout.Alignment |
vPos
|
(package private) double |
width
|
(package private) Style.Unit |
widthUnit
|
Constructor Summary | |
---|---|
Layout.Layer(Element container,
Element child,
java.lang.Object userObject)
|
Method Summary | |
---|---|
Element |
getContainerElement()
Gets the container element associated with this layer. |
java.lang.Object |
getUserObject()
Gets the user-data associated with this layer. |
void |
setBottomHeight(double bottom,
Style.Unit bottomUnit,
double height,
Style.Unit heightUnit)
Sets the layer's bottom and height values. |
void |
setChildHorizontalPosition(Layout.Alignment position)
Sets the child element's horizontal position within the layer. |
void |
setChildVerticalPosition(Layout.Alignment position)
Sets the child element's vertical position within the layer. |
void |
setLeftRight(double left,
Style.Unit leftUnit,
double right,
Style.Unit rightUnit)
Sets the layer's left and right values. |
void |
setLeftWidth(double left,
Style.Unit leftUnit,
double width,
Style.Unit widthUnit)
Sets the layer's left and width values. |
void |
setRightWidth(double right,
Style.Unit rightUnit,
double width,
Style.Unit widthUnit)
Sets the layer's right and width values. |
void |
setTopBottom(double top,
Style.Unit topUnit,
double bottom,
Style.Unit bottomUnit)
Sets the layer's top and bottom values. |
void |
setTopHeight(double top,
Style.Unit topUnit,
double height,
Style.Unit heightUnit)
Sets the layer's top and height values. |
void |
setVisible(boolean visible)
Sets the layer's visibility. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
final Element container
final Element child
java.lang.Object userObject
boolean setLeft
boolean setRight
boolean setTop
boolean setBottom
boolean setWidth
boolean setHeight
boolean setTargetLeft
boolean setTargetRight
boolean setTargetTop
boolean setTargetBottom
boolean setTargetWidth
boolean setTargetHeight
Style.Unit leftUnit
Style.Unit topUnit
Style.Unit rightUnit
Style.Unit bottomUnit
Style.Unit widthUnit
Style.Unit heightUnit
Style.Unit targetLeftUnit
Style.Unit targetTopUnit
Style.Unit targetRightUnit
Style.Unit targetBottomUnit
Style.Unit targetWidthUnit
Style.Unit targetHeightUnit
double left
double top
double right
double bottom
double width
double height
double sourceLeft
double sourceTop
double sourceRight
double sourceBottom
double sourceWidth
double sourceHeight
double targetLeft
double targetTop
double targetRight
double targetBottom
double targetWidth
double targetHeight
Layout.Alignment hPos
Layout.Alignment vPos
boolean visible
Constructor Detail |
---|
Layout.Layer(Element container, Element child, java.lang.Object userObject)
Method Detail |
---|
public Element getContainerElement()
This is the element that sits between the parent and child elements. It is normally necessary to operate on this element only when you need to modify CSS properties that are not directly modeled by the Layer class.
public java.lang.Object getUserObject()
public void setBottomHeight(double bottom, Style.Unit bottomUnit, double height, Style.Unit heightUnit)
bottom
- bottomUnit
- height
- heightUnit
- public void setChildHorizontalPosition(Layout.Alignment position)
position
- public void setChildVerticalPosition(Layout.Alignment position)
position
- public void setLeftRight(double left, Style.Unit leftUnit, double right, Style.Unit rightUnit)
left
- leftUnit
- right
- rightUnit
- public void setLeftWidth(double left, Style.Unit leftUnit, double width, Style.Unit widthUnit)
left
- leftUnit
- width
- widthUnit
- public void setRightWidth(double right, Style.Unit rightUnit, double width, Style.Unit widthUnit)
right
- rightUnit
- width
- widthUnit
- public void setTopBottom(double top, Style.Unit topUnit, double bottom, Style.Unit bottomUnit)
top
- topUnit
- bottom
- bottomUnit
- public void setTopHeight(double top, Style.Unit topUnit, double height, Style.Unit heightUnit)
top
- topUnit
- height
- heightUnit
- public void setVisible(boolean visible)
visible
-
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |