|
||||||||||
| 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.sencha.gxt.widget.core.client.Component
public class Component
Base class for all GXT widgets.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
| Field Summary |
|---|
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Method Summary | ||
|---|---|---|
HandlerRegistration |
addBeforeHideHandler(BeforeHideEvent.BeforeHideHandler handler)
Adds a BeforeHideEvent.BeforeHideHandler handler for BeforeHideEvent
events. |
|
HandlerRegistration |
addBeforeShowContextMenuHandler(BeforeShowContextMenuEvent.BeforeShowContextMenuHandler handler)
Adds a BeforeShowContextMenuEvent.BeforeShowContextMenuHandler handler for
BeforeShowContextMenuEvent events. |
|
HandlerRegistration |
addBeforeShowHandler(BeforeShowEvent.BeforeShowHandler handler)
Adds a BeforeShowEvent.BeforeShowHandler handler for BeforeShowEvent
events. |
|
HandlerRegistration |
addBlurHandler(BlurEvent.BlurHandler handler)
Adds a BlurEvent.BlurHandler handler for BlurEvent
events. |
|
HandlerRegistration |
addDisableHandler(DisableEvent.DisableHandler handler)
Adds a DisableEvent.DisableHandler handler for DisableEvent events. |
|
HandlerRegistration |
addEnableHandler(EnableEvent.EnableHandler handler)
Adds a EnableEvent.EnableHandler handler for EnableEvent events. |
|
HandlerRegistration |
addFocusHandler(FocusEvent.FocusHandler handler)
Adds a FocusEvent.FocusHandler handler for FocusEvent
events. |
|
HandlerRegistration |
addHideHandler(HideEvent.HideHandler handler)
Adds a HideEvent.HideHandler handler for HideEvent events. |
|
HandlerRegistration |
addMoveHandler(MoveEvent.MoveHandler handler)
Adds a MoveEvent.MoveHandler handler for MoveEvent events. |
|
HandlerRegistration |
addResizeHandler(ResizeHandler handler)
|
|
HandlerRegistration |
addShowContextMenuHandler(ShowContextMenuEvent.ShowContextMenuHandler handler)
Adds a ShowContextMenuEvent.ShowContextMenuHandler handler for
ShowContextMenuEvent events. |
|
HandlerRegistration |
addShowHandler(ShowEvent.ShowHandler handler)
Adds a ShowEvent.ShowHandler handler for ShowEvent events. |
|
void |
addStyleOnOver(Element elem,
java.lang.String style)
Adds a style to the given element on mouseover. |
|
void |
clearSizeCache()
Clears the size cache (the size of the widget the last time it was changed). |
|
void |
disable()
Disable this widget. |
|
void |
disableEvents()
True to disable event processing. |
|
void |
enable()
Enable this widget. |
|
void |
enableEvents()
True to enable event processing. |
|
void |
fireEvent(GwtEvent<?> event)
|
|
void |
focus()
Try to focus this widget. |
|
|
getData(java.lang.String key)
Returns the application defined property for the given name, or null if it has not been set. |
|
XElement |
getElement()
Gets a handle to the object's underlying DOM element. |
|
FocusManagerSupport |
getFocusSupport()
Returns the focus manager support configuration. |
|
Style.HideMode |
getHideMode()
Returns the widget's hide mode. |
|
java.lang.String |
getId()
Returns the widget's id. |
|
java.lang.String |
getItemId()
Returns the item id of this widget. |
|
int |
getOffsetHeight(boolean content)
Returns the widget's height. |
|
int |
getOffsetWidth(boolean content)
Returns the element's width. |
|
boolean |
getShadow()
Returns true if the shadow is enabled. |
|
java.lang.String |
getStateId()
Returns the widget's state id. |
|
ToolTip |
getToolTip()
Returns the widget's tool tip. |
|
void |
hide()
Hide this widget. |
|
void |
hideToolTip()
Hides the widget's tool tip (if one exists). |
|
boolean |
isAllowTextSelection()
Returns the enable text selection state. |
|
boolean |
isAutoHeight()
Returns the auto height state. |
|
boolean |
isAutoWidth()
Returns the auto width state. |
|
boolean |
isDeferHeight()
Returns true if the height is being deferred |
|
boolean |
isEnabled()
Returns true if the widget is enabled. |
|
boolean |
isRendered()
Returns true if the component has been rendered. |
|
boolean |
isStateful()
Returns true if the widget is saving and restore it's state. |
|
boolean |
isVisible()
|
|
boolean |
isVisible(boolean deep)
Returns true if the widget is visible. |
|
void |
mask()
Puts a mask over this widget to disable user interaction. |
|
void |
mask(java.lang.String message)
Puts a mask over this widget to disable user interaction. |
|
void |
onBrowserEvent(Event event)
|
|
void |
removeToolTip()
Removes the components tooltip (if one exists). |
|
void |
setAllowTextSelection(boolean enable)
Enables and disables text selection for the widget. |
|
void |
setBorders(boolean show)
Adds or removes a border. |
|
void |
setBounds(int x,
int y,
int width,
int height)
Sets the widget's size. |
|
void |
setBounds(Rectangle bounds)
Sets the widget's size. |
|
void |
setContextMenu(Menu menu)
Sets the widget's context menu. |
|
void |
setData(java.lang.String key,
java.lang.Object data)
Sets the application defined property with the given name. |
|
void |
setDeferHeight(boolean deferHeight)
True to defer height calculations to an external widget, false to allow this widget to set its own height (defaults to false). |
|
void |
setEnabled(boolean enabled)
Convenience function for setting disabled/enabled by boolean. |
|
void |
setHeight(int height)
Sets the widget's height. |
|
void |
setHeight(java.lang.String height)
Sets the height of the widget. |
|
void |
setHideMode(Style.HideMode hideMode)
Sets the components hide mode (defaults to HideMode.DISPLAY). |
|
void |
setId(java.lang.String id)
Sets the component's id. |
|
void |
setItemId(java.lang.String id)
Sets the widget's item id. |
|
void |
setPagePosition(int x,
int y)
Sets the page XY position of the widget. |
|
void |
setPixelSize(int width,
int height)
Sets the component's size. |
|
void |
setPosition(int left,
int top)
Sets the left and top of the widget. |
|
void |
setShadow(boolean shadow)
True to enable a shadow that will be displayed behind the widget (defaults to false). |
|
void |
setSize(java.lang.String width,
java.lang.String height)
Sets the width and height of the widget. |
|
void |
setStateful(boolean stateful)
A flag which specifies if the component is stateful (defaults to false). |
|
void |
setStateId(java.lang.String stateId)
Sets the widget's state id which is a unique id for this widget to use for state management purposes (defaults to the widget id if one was set, otherwise null if the widget is using a generated id). |
|
void |
setTabIndex(int tabIndex)
Sets the widget's tab index. |
|
void |
setToolTip(java.lang.String text)
Sets the widget's tool tip. |
|
void |
setToolTipConfig(ToolTipConfig config)
Sets the widget's tool tip with the given config. |
|
void |
setVisible(boolean visible)
Convenience function to hide or show this widget by boolean. |
|
void |
setWidth(int width)
Sets the width of the widget. |
|
void |
setWidth(java.lang.String width)
Sets the width of the widget. |
|
void |
show()
Show this widget. |
|
void |
sync(boolean show)
Syncs the layer of the widget. |
|
void |
syncSize()
Clears the size cache and resets to the last known size. |
|
void |
unmask()
Unmasks the widget. |
|
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, getLayoutData, getParent, isAttached, removeFromParent, setLayoutData, sinkEvents |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, removeStyleName, setStyleDependentName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public HandlerRegistration addBeforeHideHandler(BeforeHideEvent.BeforeHideHandler handler)
BeforeHideEvent.HasBeforeHideHandlersBeforeHideEvent.BeforeHideHandler handler for BeforeHideEvent
events.
addBeforeHideHandler in interface BeforeHideEvent.HasBeforeHideHandlershandler - the handler
public HandlerRegistration addBeforeShowContextMenuHandler(BeforeShowContextMenuEvent.BeforeShowContextMenuHandler handler)
BeforeShowContextMenuEvent.HasBeforeShowContextMenuHandlerBeforeShowContextMenuEvent.BeforeShowContextMenuHandler handler for
BeforeShowContextMenuEvent events.
addBeforeShowContextMenuHandler in interface BeforeShowContextMenuEvent.HasBeforeShowContextMenuHandlerhandler - the handler
public HandlerRegistration addBeforeShowHandler(BeforeShowEvent.BeforeShowHandler handler)
BeforeShowEvent.HasBeforeShowHandlersBeforeShowEvent.BeforeShowHandler handler for BeforeShowEvent
events.
addBeforeShowHandler in interface BeforeShowEvent.HasBeforeShowHandlershandler - the handler
public HandlerRegistration addBlurHandler(BlurEvent.BlurHandler handler)
BlurEvent.HasBlurHandlersBlurEvent.BlurHandler handler for BlurEvent
events.
addBlurHandler in interface BlurEvent.HasBlurHandlershandler - the handler
public HandlerRegistration addDisableHandler(DisableEvent.DisableHandler handler)
DisableEvent.HasDisableHandlersDisableEvent.DisableHandler handler for DisableEvent events.
addDisableHandler in interface DisableEvent.HasDisableHandlershandler - the handler
public HandlerRegistration addEnableHandler(EnableEvent.EnableHandler handler)
EnableEvent.HasEnableHandlersEnableEvent.EnableHandler handler for EnableEvent events.
addEnableHandler in interface EnableEvent.HasEnableHandlershandler - the handler
public HandlerRegistration addFocusHandler(FocusEvent.FocusHandler handler)
FocusEvent.HasFocusHandlersFocusEvent.FocusHandler handler for FocusEvent
events.
addFocusHandler in interface FocusEvent.HasFocusHandlershandler - the handler
public HandlerRegistration addHideHandler(HideEvent.HideHandler handler)
HideEvent.HasHideHandlersHideEvent.HideHandler handler for HideEvent events.
addHideHandler in interface HideEvent.HasHideHandlershandler - the handler
public HandlerRegistration addMoveHandler(MoveEvent.MoveHandler handler)
MoveEvent.HasMoveHandlersMoveEvent.MoveHandler handler for MoveEvent events.
addMoveHandler in interface MoveEvent.HasMoveHandlershandler - the handler
public HandlerRegistration addResizeHandler(ResizeHandler handler)
addResizeHandler in interface HasResizeHandlerspublic HandlerRegistration addShowContextMenuHandler(ShowContextMenuEvent.ShowContextMenuHandler handler)
ShowContextMenuEvent.HasShowContextMenuHandlerShowContextMenuEvent.ShowContextMenuHandler handler for
ShowContextMenuEvent events.
addShowContextMenuHandler in interface ShowContextMenuEvent.HasShowContextMenuHandlerhandler - the handler
public HandlerRegistration addShowHandler(ShowEvent.ShowHandler handler)
ShowEvent.HasShowHandlersShowEvent.ShowHandler handler for ShowEvent events.
addShowHandler in interface ShowEvent.HasShowHandlershandler - the handler
public void addStyleOnOver(Element elem,
java.lang.String style)
elem - the over elementstyle - the style to addpublic void clearSizeCache()
public void disable()
public void disableEvents()
public void enable()
public void enableEvents()
public void fireEvent(GwtEvent<?> event)
fireEvent in interface HasHandlersfireEvent in class Widgetpublic void focus()
public <X> X getData(java.lang.String key)
null if it has not been set.
key - the name of the property
null if it has not been setpublic XElement getElement()
UIObject.setElement(com.google.gwt.user.client.Element).
getElement in class UIObjectpublic FocusManagerSupport getFocusSupport()
getFocusSupport in interface HasFocusSupportpublic Style.HideMode getHideMode()
public java.lang.String getId()
public java.lang.String getItemId()
getItemId in interface HasItemIdpublic int getOffsetHeight(boolean content)
content - true to get the height minus borders and padding
public int getOffsetWidth(boolean content)
content - true to get the width minus borders and padding
public boolean getShadow()
public java.lang.String getStateId()
public ToolTip getToolTip()
public void hide()
public void hideToolTip()
public boolean isAllowTextSelection()
public boolean isAutoHeight()
public boolean isAutoWidth()
public boolean isDeferHeight()
public boolean isEnabled()
true if the widget is enabled.
isEnabled in interface HasEnabledpublic boolean isRendered()
public boolean isStateful()
public boolean isVisible()
isVisible in interface HasVisibilityisVisible in class UIObjectpublic boolean isVisible(boolean deep)
true if the widget is visible.
deep - true to search up the widget hierarchy
public void mask()
public void mask(java.lang.String message)
message - a message to display in the maskpublic void onBrowserEvent(Event event)
onBrowserEvent in interface EventListeneronBrowserEvent in class Widgetpublic void removeToolTip()
public void setAllowTextSelection(boolean enable)
enable - true to enable, false to disablepublic void setBorders(boolean show)
show - true to display a border
public 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 setContextMenu(Menu menu)
menu - the context menu
public void setData(java.lang.String key,
java.lang.Object data)
key - the name of the propertydata - the new value for the propertypublic void setDeferHeight(boolean deferHeight)
deferHeight - true to defer heightpublic void setEnabled(boolean enabled)
setEnabled in interface HasEnabledenabled - the enabled statepublic void setHeight(int height)
height - the new heightpublic void setHeight(java.lang.String height)
setHeight in class UIObjectheight - the new height to setpublic void setHideMode(Style.HideMode hideMode)
hideMode - the hide mode.public void setId(java.lang.String id)
id - the idpublic void setItemId(java.lang.String id)
setItemId in interface HasItemIdid - the item id
public void setPagePosition(int x,
int y)
setPosition(int, int).
x - the x coordinatey - the y coordinate
public void setPixelSize(int width,
int height)
setPixelSize in class UIObjectwidth - new width, in pixelsheight - height, in pixels
public void setPosition(int left,
int top)
setPagePosition(int, int).
left - the new lefttop - the new toppublic void setShadow(boolean shadow)
shadow - true to enable the shadow
public void setSize(java.lang.String width,
java.lang.String height)
setSize in class UIObjectwidth - the new width to setheight - the new height to setpublic void setStateful(boolean stateful)
setStateId(String) or
setId(String) assigned for state to be managed. Auto-generated ids
are not guaranteed to be stable across page loads and cannot be relied upon
to save and restore the same state for a widget.
stateful - true to enable statepublic void setStateId(java.lang.String stateId)
stateId - the state idpublic void setTabIndex(int tabIndex)
tabIndex - the tab indexpublic void setToolTip(java.lang.String text)
text - the textpublic void setToolTipConfig(ToolTipConfig config)
config - the tool tip configpublic void setVisible(boolean visible)
setVisible in interface HasVisibilitysetVisible in class UIObjectvisible - the visible statepublic void setWidth(int width)
width - the new width to setpublic void setWidth(java.lang.String width)
setWidth in class UIObjectwidth - the new width to setpublic void show()
public void sync(boolean show)
show - true to show the layerpublic void syncSize()
public void unmask()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||