| com.gwtext.client.widgets.Component com.gwtext.client.widgets.Button
All known Subclasses: com.gwtext.client.widgets.SplitButton, com.gwtext.client.widgets.ToolbarButton,
Button | public Button()(Code) | | Create a new Button.
|
Button | public Button(String text)(Code) | | Create a new Button
Parameters: text - the button label |
Button | public Button(String text, Menu menu)(Code) | | Create a new Button.
Parameters: text - the Button label Parameters: menu - the Button menu |
Button | public Button(JavaScriptObject jsObj)(Code) | | |
addListener | native public void addListener(ButtonListener listener)(Code) | | Add a Button listener.
Parameters: listener - the listener |
create | native protected JavaScriptObject create(JavaScriptObject config)(Code) | | |
focus | public void focus()(Code) | | Focus the button.
|
getBindToForm | public boolean getBindToForm()(Code) | | true if bind to form is enabled |
getButtonElement | native public Element getButtonElement()(Code) | | An Ext Button consists of a table that wraps a button element. This method returns the underlying
Button element.
Note: This method should be called only after the Button has been Rendered.
the Button Element |
getClickEvent | public String getClickEvent()(Code) | | the type of event to map to the button's event handler (defaults to 'click') |
getConfigPrototype | protected JavaScriptObject getConfigPrototype()(Code) | | |
getHandleMouseEvents | public boolean getHandleMouseEvents()(Code) | | False to disable visual cues on mouseover, mouseout and mousedown (defaults to true).
true if visual cues on mouseover, mouseout and mousedown are enabled |
getIcon | public String getIcon()(Code) | | the path of the Button icon image |
getIconCls | public String getIconCls()(Code) | | the icon CSS class for this Button |
getMenuAlign | public String getMenuAlign()(Code) | | The position to align the menu to. Defaults to tl-bl?
the position to align the menu to |
getMinWidth | public int getMinWidth()(Code) | | The minimum width for this button.
the Button min width |
getTabIndex | public int getTabIndex()(Code) | | the tab index, 0 if undefined |
getToggleGroup | public String getToggleGroup()(Code) | | the Button's toggle group |
getTooltip | public String getTooltip()(Code) | | the Button tooltip |
getTooltipType | public String getTooltipType()(Code) | | The type of tooltip to use.
the tooltip type |
getType | public String getType()(Code) | | The button's type, corresponding to the DOM input element type attribute. Either "submit," "reset" or "button" (default).
the Button type |
hasVisibleMenu | native public boolean hasVisibleMenu()(Code) | | Returns true if the button has a menu and it is visible.
true if menu visible |
hideMenu | native public void hideMenu()(Code) | | Hide this button's menu (if it has one).
|
isDisabled | public boolean isDisabled()(Code) | | Returns true if button is disabled.
true if disabled |
isEnableToggle | public boolean isEnableToggle()(Code) | | true if toggle enabled |
isPressed | public boolean isPressed()(Code) | | True if the Button is pressed.
true if start Button pressed (only if enableToggle = true) See Also: Button.toggle(boolean) |
isRepeat | native public boolean isRepeat()(Code) | | true to repeat fire the click event while the mouse is down |
setClickEvent | public void setClickEvent(String clickEvent) throws IllegalStateException(Code) | | The type of event to map to the button's event handler (defaults to 'click')
Parameters: clickEvent - the click event throws: IllegalStateException - this property cannot be changed after the Component has been rendered |
setEnableToggle | public void setEnableToggle(boolean enableToggle)(Code) | | True to enable pressed/not pressed toggling (defaults to false).
Parameters: enableToggle - true to enable toggle |
setFormBind | public void setFormBind(boolean bindToForm)(Code) | | You can bind your form buttons to the valid state of the form. Note: the Form's monitorValid config must be set to true.
To bind a button(s) enabled state to the valid state set this property to true.
Parameters: bindToForm - to to bind to form's valid state |
setHandleMouseEvents | public void setHandleMouseEvents(boolean handleMouseEvents) throws IllegalStateException(Code) | | False to disable visual cues on mouseover, mouseout and mousedown (defaults to true).
Parameters: handleMouseEvents - false to diable visual cues throws: IllegalStateException - this property cannot be changed after the Component has been rendered |
setHidden | public void setHidden(boolean hidden)(Code) | | True to start hidden or hide rendered button (defaults to false).
Parameters: hidden - true for hidden |
setIcon | public void setIcon(String icon)(Code) | | The path to an image to display in the button (the image will be set as the background-image CSS property of the
button by default, so if you want a mixed icon/text button, set cls:"x-btn-text-icon")
Parameters: icon - the icon |
setIconCls | public void setIconCls(String iconCls)(Code) | | A css class which sets a background image to be used as the icon for this button (defaults to undefined).
Parameters: iconCls - the icon CSS class |
setMenuAlign | public void setMenuAlign(String anchorPosition)(Code) | | The position to align the menu to. Defaults to tl-bl?
Parameters: anchorPosition - the element's anchor position |
setMinWidth | public void setMinWidth(int minWidth) throws IllegalStateException(Code) | | The minimum width for this button.
Parameters: minWidth - the min width throws: IllegalStateException - this property cannot be changed after the Component has been rendered |
setPressed | public void setPressed(boolean pressed)(Code) | | True to start pressed (only if enableToggle = true).
Parameters: pressed - true for pressed |
setRepeat | public void setRepeat(boolean repeat)(Code) | | True to repeat fire the click event while the mouse is down. (defaults to false).
Parameters: repeat - true to repeat |
setRepeat | public void setRepeat(ClickRepeaterConfig qconfig)(Code) | | Fire click event when mouse is down.
Parameters: qconfig - the click repeat configuration |
setTabIndex | public void setTabIndex(int tabIndex) throws IllegalStateException(Code) | | Set a DOM tabIndex for this button.
Parameters: tabIndex - the tab index throws: IllegalStateException - this property cannot be changed after the Component has been rendered |
setTemplate | public void setTemplate(Template template)(Code) | | A
Template with which to create the Button's main element. This Template must
contain numeric substitution parameter 0 if it is to display the text property. Changing the template could
require code modifications if required elements (e.g. a button) aren't present.
The defaut tempalte is
<table border="0" cellpadding="0" cellspacing="0" class="x-btn-wrap"><tbody><tr>
<td class="x-btn-left"><i> </i></td><td class="x-btn-center"><em unselectable="on"><button class="x-btn-text" type="{1}">{0}</button></em></td><td class="x-btn-right"><i> </i></td>
</tr></tbody></table>
Parameters: template - the button template |
setText | public void setText(String text)(Code) | | The button text.
Parameters: text - the buttons text |
setToggleGroup | public void setToggleGroup(String toggleGroup) throws IllegalStateException(Code) | | The group this toggle button is a member of (only 1 per group can be pressed, only applies if enableToggle = true).
Parameters: toggleGroup - the button's toggle group throws: IllegalStateException - this property cannot be changed after the Component has been rendered |
setTooltip | public void setTooltip(String tooltip)(Code) | | The tooltip for the button.
Parameters: tooltip - the tooltip |
setTooltip | public void setTooltip(String title, String text)(Code) | | The tooltip for the button.
Parameters: title - the tootlip title Parameters: text - the tootlip text |
setTooltipType | public void setTooltipType(boolean quickTip) throws IllegalStateException(Code) | | The type of tooltip to use.
Parameters: quickTip - true for quicktips, false for the "title" attribute. throws: IllegalStateException - this property cannot be changed after the Component has been rendered |
setType | public void setType(String type) throws IllegalStateException(Code) | | The button's type, corresponding to the DOM input element type attribute. Either "submit," "reset" or "button" (default).
Parameters: type - the button type throws: IllegalStateException - this property cannot be changed after the Component has been rendered |
showMenu | native public void showMenu()(Code) | | Show this button's menu (if it has one).
|
toggle | public void toggle()(Code) | | Toggle the current state.
|
toggle | public void toggle(boolean state)(Code) | | Toggle the button to the passed state.
Parameters: state - true to toggle pressed |
Methods inherited from com.gwtext.client.widgets.Component | public void addClass(String cls)(Code)(Java Doc) native public void addClassCreated(String cls)(Code)(Java Doc) native public void addEvent(String events)(Code)(Java Doc) public void addEvents(String[] events)(Code)(Java Doc) protected void addListener(String event, JavaScriptObject fn)(Code)(Java Doc) native public void addListener(String event, Function funtion)(Code)(Java Doc) native protected void addListener(ComponentListener listener)(Code)(Java Doc) protected void afterRender()(Code)(Java Doc) protected void beforeDestroy()(Code)(Java Doc) protected void check() throws IllegalStateException(Code)(Java Doc) public Component cloneComponent()(Code)(Java Doc) public Component cloneComponent(Component overrides)(Code)(Java Doc) native protected JavaScriptObject cloneConfig(JavaScriptObject config)(Code)(Java Doc) abstract protected JavaScriptObject create(JavaScriptObject config)(Code)(Java Doc) native public void destroy()(Code)(Java Doc) public void disable()(Code)(Java Doc) public void enable()(Code)(Java Doc) public boolean equals(Object obj)(Code)(Java Doc) protected void error(String message) throws IllegalStateException(Code)(Java Doc) public void focus()(Code)(Java Doc) native public void focus(boolean selectText)(Code)(Java Doc) native public void focus(boolean selectText, int delay)(Code)(Java Doc) public Element getApplyTo()(Code)(Java Doc) protected String getAttribute(String attribute)(Code)(Java Doc) protected boolean getAttributeAsBoolean(String attribute)(Code)(Java Doc) protected float getAttributeAsFloat(String attribute)(Code)(Java Doc) protected int getAttributeAsInt(String attribute)(Code)(Java Doc) protected JavaScriptObject getAttributeAsJavaScriptObject(String attribute)(Code)(Java Doc) public boolean getAutoShow()(Code)(Java Doc) public String getCls()(Code)(Java Doc) native protected static JavaScriptObject getComponentJS(String id)(Code)(Java Doc) public JavaScriptObject getConfig()(Code)(Java Doc) abstract protected JavaScriptObject getConfigPrototype()(Code)(Java Doc) public String getCtCls()(Code)(Java Doc) public String getDisabledClass()(Code)(Java Doc) native public ExtElement getEl()(Code)(Java Doc) native protected Element getElement(JavaScriptObject jsObj)(Code)(Java Doc) public Element getElement()(Code)(Java Doc) public String getHideMode()(Code)(Java Doc) public boolean getHideParent()(Code)(Java Doc) public String getId()(Code)(Java Doc) native public String getItemId()(Code)(Java Doc) public JavaScriptObject getJsObj()(Code)(Java Doc) public int getOffsetHeight()(Code)(Java Doc) public int getOffsetWidth()(Code)(Java Doc) public JavaScriptObject getOrCreateJsObj()(Code)(Java Doc) native public Container getOwnerContainer()(Code)(Java Doc) public Element getRenderTo()(Code)(Java Doc) public String[] getStateEvents()(Code)(Java Doc) public String getStateId()(Code)(Java Doc) public String getStyle()(Code)(Java Doc) protected Element getStyleElement()(Code)(Java Doc) public String getTitle()(Code)(Java Doc) public String getXType()(Code)(Java Doc) native public String getXTypes()(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public void hide()(Code)(Java Doc) protected void initComponent()(Code)(Java Doc) public boolean isCreated()(Code)(Java Doc) public boolean isDisabled()(Code)(Java Doc) public boolean isHidden()(Code)(Java Doc) native public boolean isRendered()(Code)(Java Doc) native public boolean isVisible()(Code)(Java Doc) native public boolean isXType(String xtype)(Code)(Java Doc) native public boolean isXType(String xtype, boolean shallow)(Code)(Java Doc) protected void onDestroy()(Code)(Java Doc) native public void removeClass(String cls)(Code)(Java Doc) native public void render(String id)(Code)(Java Doc) native public void render(String id, String position)(Code)(Java Doc) native public void render(String id, int position)(Code)(Java Doc) native public void render(Element element)(Code)(Java Doc) native public void render(Element element, String position)(Code)(Java Doc) native public void render(Element element, int position)(Code)(Java Doc) public void setApplyTo(Element element) throws IllegalStateException(Code)(Java Doc) protected void setAttribute(String attribute, String value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, String value, boolean allowPostCreate, boolean allowPostRendered)(Code)(Java Doc) protected void setAttribute(String attribute, int[] value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, int[] value, boolean allowPostCreate, boolean allowPostRender)(Code)(Java Doc) protected void setAttribute(String attribute, long value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, double value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, int value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, int value, boolean allowPostCreate, boolean allowPostRender)(Code)(Java Doc) protected void setAttribute(String attribute, Date value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, JavaScriptObject value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, JavaScriptObject value, boolean allowPostCreate, boolean allowPostRender)(Code)(Java Doc) protected void setAttribute(String attribute, String[] value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, String[] value, boolean allowPostCreate, boolean allowPostRender)(Code)(Java Doc) protected void setAttribute(String attribute, boolean value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, boolean value, boolean allowPostCreate, boolean allowPostRendered)(Code)(Java Doc) protected void setAttribute(String attribute, Element value, boolean allowPostCreate)(Code)(Java Doc) protected void setAttribute(String attribute, Element value, boolean allowPostCreate, boolean allowPostRendered)(Code)(Java Doc) public void setAutoEl(String autoEl)(Code)(Java Doc) public void setAutoShow(boolean autoShow) throws IllegalStateException(Code)(Java Doc) public void setCls(String cls)(Code)(Java Doc) public void setCtCls(String ctCls) throws IllegalStateException(Code)(Java Doc) public void setDisabled(boolean disabled)(Code)(Java Doc) public void setDisabledClass(String disabledClass)(Code)(Java Doc) public void setEl(Element el) throws IllegalStateException(Code)(Java Doc) public void setEl(String elementID) throws IllegalStateException(Code)(Java Doc) public void setHeight(String height)(Code)(Java Doc) public void setHideMode(String hideMode)(Code)(Java Doc) public void setHideParent(boolean hideParent) throws IllegalStateException(Code)(Java Doc) final public void setId(String id) throws IllegalStateException(Code)(Java Doc) public void setRenderTo(Element elem) throws IllegalStateException(Code)(Java Doc) public void setStateEvents(String[] stateEvents) throws IllegalStateException(Code)(Java Doc) public void setStateId(String stateId) throws IllegalStateException(Code)(Java Doc) public void setStyle(String style) throws IllegalStateException(Code)(Java Doc) public void setTitle(String title)(Code)(Java Doc) public void setVisible(boolean visible)(Code)(Java Doc) public void setWidth(String width)(Code)(Java Doc) public void show()(Code)(Java Doc)
|
|
|