|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.user.client.ui.UIObject com.google.gwt.user.client.ui.Widget com.gwtext.client.widgets.Component com.gwtext.client.widgets.BoxComponent
public class BoxComponent
Base class for any visual Component
that uses a box container. BoxComponent provides automatic box model adjustments
for sizing and positioning and will work correctly withnin the Component rendering model. All container classes should subclass
BoxComponent so that they will work consistently when nested within other Ext layout containers.
Field Summary |
---|
Fields inherited from class com.gwtext.client.widgets.Component |
---|
config, id |
Constructor Summary | |
---|---|
BoxComponent()
|
|
BoxComponent(com.google.gwt.user.client.Element element)
|
|
BoxComponent(com.google.gwt.core.client.JavaScriptObject jsObj)
|
Method Summary | |
---|---|
protected void |
addListener(BoxComponentListener listener)
Add a Component listener. |
protected com.google.gwt.core.client.JavaScriptObject |
create(com.google.gwt.core.client.JavaScriptObject config)
|
void |
doOnRender(Function function)
Runs the specified function when the Component is rendered. |
void |
doOnRender(Function function,
int delayMillis)
Runs the specified function when the Component is rendered. |
boolean |
getAutoHeight()
|
boolean |
getAutoWidth()
|
Box |
getBox()
Gets the current box measurements of the component's. |
Box |
getBox(boolean local)
Gets the current box measurements of the component's. |
protected com.google.gwt.core.client.JavaScriptObject |
getConfigPrototype()
|
int |
getHeight()
The height of this component in pixels. |
int[] |
getPosition()
Gets the current XY position of the component's underlying element. |
int[] |
getPosition(boolean local)
Gets the current XY position of the component's underlying element. |
Size |
getSize()
Gets the current size of the component's underlying element. |
int |
getWidth()
The component width. |
java.lang.String |
getXType()
Gets the xtype for this component as registered with ComponentMgr. |
void |
setAutoHeight(boolean autoHeight)
True to use height:'auto', false to use fixed height (defaults to false). |
void |
setAutoWidth(boolean autoWidth)
True to use width:'auto', false to use fixed width (defaults to false). |
void |
setHeight(int height)
The height of this component in pixels (defaults to auto). |
void |
setHeight(java.lang.String height)
Set the height in pixels or auto. |
void |
setPagePosition(int x,
int y)
Sets the page XY position of the component. |
void |
setPosition(int left,
int top)
Sets the left and top of the component. |
void |
setSize(int width,
int height)
Sets the width and height of the component. |
void |
setSize(java.lang.String width,
java.lang.String height)
|
void |
setWidth(int width)
The component width. |
void |
setWidth(java.lang.String width)
Set the width in pixels or auto. |
void |
syncSize()
Force the component's size to recalculate based on the underlying element's current height and width. |
void |
updateBox(Box box)
Sets the current box measurements of the component's underlying element. |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
doAttachChildren, doDetachChildren, getParent, isAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
getAbsoluteLeft, getAbsoluteTop, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, setPixelSize, setStyleName, setStyleName, setStylePrimaryName, setVisible, sinkEvents, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BoxComponent()
public BoxComponent(com.google.gwt.core.client.JavaScriptObject jsObj)
public BoxComponent(com.google.gwt.user.client.Element element)
Method Detail |
---|
protected com.google.gwt.core.client.JavaScriptObject getConfigPrototype()
getConfigPrototype
in class Component
public java.lang.String getXType()
Component
TextField field = new TextField();
field.getXType() returns "textfield"
getXType
in class Component
protected com.google.gwt.core.client.JavaScriptObject create(com.google.gwt.core.client.JavaScriptObject config)
create
in class Component
public Box getBox()
public Box getBox(boolean local)
local
- if true the element's left and top are returned instead of page XY (defaults to false)
public int[] getPosition()
public int[] getPosition(boolean local)
local
- if true the element's left and top are returned instead of page XY (defaults to false)
public Size getSize()
public void setPagePosition(int x, int y)
x
- the new X positiony
- the new Y opsitionpublic void setPosition(int left, int top)
left
- the new lefttop
- the new rightpublic void setSize(int width, int height)
width
- the new widthheight
- the new heightpublic void setSize(java.lang.String width, java.lang.String height)
setSize
in class com.google.gwt.user.client.ui.UIObject
public void syncSize()
public void updateBox(Box box)
box
- the new box measurementsprotected void addListener(BoxComponentListener listener)
listener
- the listenerpublic void doOnRender(Function function)
function
- the function to execute on renderpublic void doOnRender(Function function, int delayMillis)
function
- the function to execute on renderdelayMillis
- a delay in millisecondspublic void setAutoHeight(boolean autoHeight) throws java.lang.IllegalStateException
autoHeight
- true to use auto height
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic boolean getAutoHeight()
public void setAutoWidth(boolean autoWidth) throws java.lang.IllegalStateException
autoWidth
- true for auto width
java.lang.IllegalStateException
- this property cannot be changed after the Component has been renderedpublic boolean getAutoWidth()
public void setHeight(int height)
height
- the component heightpublic void setHeight(java.lang.String height)
AnchorLayout
to control percentage based rendering of components.
setHeight
in class Component
height
- the component heightpublic int getHeight()
public void setWidth(int width)
width
- the width, -1 for autopublic void setWidth(java.lang.String width)
AnchorLayout
to control percentage based rendering of components.
setWidth
in class Component
width
- the component heightpublic int getWidth()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |