Java Doc for Button.java in  » Ajax » gwtext-2.01 » com » gwtext » client » widgets » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Ajax » gwtext 2.01 » com.gwtext.client.widgets 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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 class Button extends Component (Code)
Simple Button class.



Constructor Summary
public  Button()
     Create a new Button.
public  Button(String text)
    
public  Button(String text, Menu menu)
     Create a new Button.
public  Button(String text, ButtonListener listener)
     Create a new Button.
public  Button(String text, ButtonListener listener, String icon)
     Create a new Button.
public  Button(JavaScriptObject jsObj)
    

Method Summary
native public  voidaddListener(ButtonListener listener)
     Add a Button listener.
native protected  JavaScriptObjectcreate(JavaScriptObject config)
    
public  voidfocus()
     Focus the button.
public  booleangetBindToForm()
    
native public  ElementgetButtonElement()
     An Ext Button consists of a table that wraps a button element.
public  StringgetClickEvent()
    
protected  JavaScriptObjectgetConfigPrototype()
    
public  booleangetHandleMouseEvents()
     False to disable visual cues on mouseover, mouseout and mousedown (defaults to true).
public  StringgetIcon()
    
public  StringgetIconCls()
    
public  StringgetMenuAlign()
     The position to align the menu to.
public  intgetMinWidth()
     The minimum width for this button.
public  intgetTabIndex()
    
public  StringgetText()
    
public  StringgetToggleGroup()
    
public  StringgetTooltip()
    
public  StringgetTooltipType()
     The type of tooltip to use.
public  StringgetType()
     The button's type, corresponding to the DOM input element type attribute.
public  StringgetXType()
    
native public  booleanhasVisibleMenu()
     Returns true if the button has a menu and it is visible.
native public  voidhideMenu()
     Hide this button's menu (if it has one).
public  booleanisDisabled()
     Returns true if button is disabled.
public  booleanisEnableToggle()
    
public  booleanisPressed()
     True if the Button is pressed.
native public  booleanisRepeat()
    
public  voidsetClickEvent(String clickEvent)
    
public  voidsetEnableToggle(boolean enableToggle)
     True to enable pressed/not pressed toggling (defaults to false).
public  voidsetFormBind(boolean bindToForm)
     You can bind your form buttons to the valid state of the form.
public  voidsetHandleMouseEvents(boolean handleMouseEvents)
     False to disable visual cues on mouseover, mouseout and mousedown (defaults to true).
public  voidsetHidden(boolean hidden)
     True to start hidden or hide rendered button (defaults to false).
public  voidsetIcon(String icon)
    
public  voidsetIconCls(String iconCls)
     A css class which sets a background image to be used as the icon for this button (defaults to undefined).
public  voidsetMenu(Menu menu)
     Assign a button menu.
public  voidsetMenuAlign(String anchorPosition)
     The position to align the menu to.
public  voidsetMinWidth(int minWidth)
     The minimum width for this button.
public  voidsetPressed(boolean pressed)
     True to start pressed (only if enableToggle = true).
public  voidsetRepeat(boolean repeat)
     True to repeat fire the click event while the mouse is down.
public  voidsetRepeat(ClickRepeaterConfig qconfig)
     Fire click event when mouse is down.
public  voidsetTabIndex(int tabIndex)
     Set a DOM tabIndex for this button.
public  voidsetTemplate(Template template)
     A Template with which to create the Button's main element.
public  voidsetText(String text)
     The button text.
public  voidsetToggleGroup(String toggleGroup)
     The group this toggle button is a member of (only 1 per group can be pressed, only applies if enableToggle = true).
public  voidsetTooltip(String tooltip)
     The tooltip for the button.
public  voidsetTooltip(String title, String text)
     The tooltip for the button.
public  voidsetTooltip(QuickTipsConfig qtipConfig)
     The tooltip for the button.
public  voidsetTooltipType(boolean quickTip)
     The type of tooltip to use.
public  voidsetType(String type)
     The button's type, corresponding to the DOM input element type attribute.
native public  voidshowMenu()
     Show this button's menu (if it has one).
public  voidtoggle()
     Toggle the current state.
public  voidtoggle(boolean state)
     Toggle the button to the passed state.


Constructor Detail
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(String text, ButtonListener listener)(Code)
Create a new Button.
Parameters:
  text - the button label
Parameters:
  listener - the Button listener.
See Also:   com.gwtext.client.widgets.event.ButtonListenerAdapter



Button
public Button(String text, ButtonListener listener, String icon)(Code)
Create a new Button.
Parameters:
  text - the button label
Parameters:
  listener - the Button listener
Parameters:
  icon - the button icon
See Also:   com.gwtext.client.widgets.event.ButtonListenerAdapter
See Also:   Button.setIcon(String)



Button
public Button(JavaScriptObject jsObj)(Code)




Method Detail
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



getText
public String getText()(Code)
the Button's text



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



getXType
public String getXType()(Code)



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



setMenu
public void setMenu(Menu menu) throws IllegalStateException(Code)
Assign a button menu.
Parameters:
  menu - the button menu
throws:
  IllegalStateException - this property cannot be changed after the Component has been rendered



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



setTooltip
public void setTooltip(QuickTipsConfig qtipConfig) throws IllegalStateException(Code)
The tooltip for the button.
Parameters:
  qtipConfig - the tooltip config
throws:
  IllegalStateException - this property cannot be changed after the Component has been rendered



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



Fields inherited from com.gwtext.client.widgets.Component
protected JavaScriptObject config(Code)(Java Doc)
protected String id(Code)(Java Doc)

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)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.