|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.extjs.gxt.ui.client.widget.Component
com.extjs.gxt.ui.client.widget.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 within the Component
rendering
model.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Field Summary | |
---|---|
protected boolean |
adjustSize
True to adjust sizes for box model issues to ensure actual size matches set size. |
protected boolean |
cacheSizes
True to cache size calculation. |
protected boolean |
ensureVisibilityOnSizing
Set this to true if you have sizing issues in initial collapsed or hidden items. |
protected java.lang.String |
height
|
protected Size |
lastSize
|
protected Layer |
layer
A specialized El that provides support for a shadow and shim. |
protected boolean |
shim
True to enable a shim which uses a transparent iframe to stop content from bleeding through. |
protected java.lang.String |
width
|
Fields inherited from class com.extjs.gxt.ui.client.widget.Component |
---|
afterRender, attachables, baseStyle, disabled, disabledStyle, disableTextSelection, dummy, focusable, hidden, mask, maskMessage, maskMessageStyleName, monitorWindowResize, rendered, resizeHandler, setElementRender, stateId, swallowEvents, toolTip, windowResizeDelay, windowResizeTask |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
BoxComponent()
|
Method Summary | |
---|---|
protected Point |
adjustPosition(Point point)
|
protected Size |
adjustSize(Size size)
|
protected void |
afterRender()
Called after the component has been rendered and is attached for the first time. |
protected ComponentEvent |
createComponentEvent(com.google.gwt.user.client.Event event)
|
Rectangle |
getBounds(boolean local)
Gets the current box measurements of the component's underlying element. |
int |
getHeight()
Returns the component's offset height. |
int |
getHeight(boolean content)
Return the component's height. |
Point |
getPosition(boolean local)
Returns the component's current position. |
protected El |
getPositionEl()
Returns the element to be used when positioning the component. |
protected El |
getResizeEl()
Returns the element to be used when resizing the component. |
boolean |
getShadow()
Returns true if the shadow is enabled. |
int |
getShadowOffset()
Returns the shadow offset. |
Layer.ShadowPosition |
getShadowPosition()
Returns the shadow position. |
Size |
getSize()
Returns the component's size. |
int |
getWidth()
Returns the component's width. |
int |
getWidth(boolean content)
Returns the component's width. |
protected void |
hideShadow()
|
protected void |
hideShim()
|
protected void |
hideUnders()
|
boolean |
isAutoHeight()
|
boolean |
isAutoWidth()
|
boolean |
isDeferHeight()
Returns true if the height is being deferred |
boolean |
isShim()
Returns true if shimming is enabled. |
protected void |
onHide()
|
protected void |
onPosition(int x,
int y)
Called after the component is moved, this method is empty by default but can be implemented by any subclass that needs to perform custom logic after a move occurs. |
protected void |
onResize(int width,
int height)
Called after the component is resized, this method is empty by default but can be implemented by any subclass that needs to perform custom logic after a resize occurs. |
protected void |
onShow()
|
protected void |
onUnload()
|
void |
setAutoHeight(boolean autoHeight)
Sets the component's auto height value (defaults to false). |
void |
setAutoWidth(boolean autoWidth)
True to use width:'auto', false to use fixed width (defaults to false). |
void |
setBounds(int x,
int y,
int width,
int height)
Sets the component's size. |
void |
setBounds(Rectangle bounds)
Sets the component's size. |
void |
setDeferHeight(boolean deferHeight)
True to defer height calculations to an external component, false to allow this component to set its own height (defaults to false). |
void |
setHeight(int height)
Sets the component's height. |
void |
setHeight(java.lang.String height)
Sets the height of the component. |
void |
setPagePosition(int x,
int y)
Sets the page XY position of the component. |
void |
setPagePosition(Point point)
Sets the page XY position of the component. |
void |
setPixelSize(int width,
int height)
Sets the width and height of the component. |
void |
setPosition(int left,
int top)
Sets the left and top of the component. |
void |
setShadow(boolean shadow)
True to enable a shadow that will be displayed behind the component (defaults to false). |
void |
setShadowOffset(int shadowOffset)
Sets the shadow offset (defaults to 4). |
void |
setShadowPosition(Layer.ShadowPosition shadowPosition)
Sets the shadow position (defaults to SIDES). |
void |
setShim(boolean shim)
True to enable a shim which uses a transparent iframe to stop content from bleeding through. |
void |
setSize(int width,
int height)
Sets the width and height of the component. |
void |
setSize(java.lang.String width,
java.lang.String height)
Sets the width and height of the component. |
void |
setWidth(int width)
Sets the width of the component. |
void |
setWidth(java.lang.String width)
Sets the width of the component. |
void |
sync(boolean show)
Syncs the layer of the component. |
void |
syncSize()
Clears the size cache and resets to the last known size. |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, setLayoutData |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, removeStyleDependentName, setElement, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected boolean adjustSize
protected boolean shim
protected boolean cacheSizes
protected Size lastSize
protected Layer layer
shadow
or shim
is set to true.
protected java.lang.String height
protected java.lang.String width
protected boolean ensureVisibilityOnSizing
Constructor Detail |
---|
public BoxComponent()
Method Detail |
---|
public Rectangle getBounds(boolean local)
local
- if true the element's left and top are returned instead of
page coordinates
public int getHeight()
public int getHeight(boolean content)
content
- true to get the height minus borders and padding
public Point getPosition(boolean local)
local
- true to return the element's left and top rather than page
coordinates
public boolean getShadow()
public Layer.ShadowPosition getShadowPosition()
public int getShadowOffset()
public Size getSize()
public int getWidth()
public int getWidth(boolean content)
content
- true to get width minus borders and padding
public boolean isAutoHeight()
public boolean isAutoWidth()
public boolean isDeferHeight()
public boolean isShim()
public void setAutoHeight(boolean autoHeight)
autoHeight
- true to enable auto heightpublic void setAutoWidth(boolean autoWidth)
autoWidth
- the auto width statepublic void setBounds(int x, int y, int width, int height)
x
- the x coordinatey
- the y coordinatewidth
- the widthheight
- the heightpublic void setBounds(Rectangle bounds)
bounds
- the update boxpublic void setDeferHeight(boolean deferHeight)
deferHeight
- true to defer heightpublic void setHeight(int height)
height
- the new heightpublic void setHeight(java.lang.String height)
setHeight
in class Component
height
- the new height to setpublic void setPagePosition(int x, int y)
setPosition(int, int)
. This method fires the Move event.
x
- the x coordinatey
- the y coordinatepublic void setPagePosition(Point point)
setPosition(int, int)
. This method fires the Move event.
point
- the new locationpublic void setPixelSize(int width, int height)
setPixelSize
in class Component
width
- the new width to setheight
- the new height to setpublic void setPosition(int left, int top)
setPagePosition(int, int)
. This method fires the move event.
left
- the new lefttop
- the new toppublic void setShadow(boolean shadow)
shadow
- true to enable the shadowpublic void setShadowPosition(Layer.ShadowPosition shadowPosition)
shadowPosition
- the positionpublic void setShadowOffset(int shadowOffset)
shadowOffset
- the offsetpublic void setShim(boolean shim)
shim
- true to enable a shimpublic void setSize(int width, int height)
width
- the new width to setheight
- the new height to setpublic void setSize(java.lang.String width, java.lang.String height)
setSize
in class Component
width
- the new width to setheight
- the new height to setpublic void setWidth(int width)
width
- the new width to setpublic void setWidth(java.lang.String width)
setWidth
in class Component
width
- the new width to setpublic void sync(boolean show)
public void syncSize()
protected Point adjustPosition(Point point)
protected Size adjustSize(Size size)
protected void afterRender()
Component
afterRender
in class Component
protected ComponentEvent createComponentEvent(com.google.gwt.user.client.Event event)
createComponentEvent
in class Component
protected El getPositionEl()
protected El getResizeEl()
protected void hideShadow()
protected void hideShim()
protected void hideUnders()
protected void onHide()
onHide
in class Component
protected void onPosition(int x, int y)
x
- the new x positiony
- the new y positionprotected void onResize(int width, int height)
width
- the widthheight
- the heightprotected void onShow()
onShow
in class Component
protected void onUnload()
onUnload
in class com.google.gwt.user.client.ui.Widget
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |