|
|||||||||
| 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.button.Button
public class Button
A button component.
| 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 | |
|---|---|
static Template |
buttonTemplate
Template used by buttons if a template is not provided. |
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
Button()
Creates a new button. |
|
Button(java.lang.String text)
Creates a new button with the given text. |
|
Button(java.lang.String text,
SelectionListener listener)
Creates a new button with the given text and specified selection listener. |
|
| Method Summary | |
|---|---|
void |
addSelectionListener(SelectionListener listener)
Adds a selection listener. |
java.lang.String |
getIconStyle()
Returns the button's icon style. |
Menu |
getMenu()
Returns the button's menu (if it has one). |
java.lang.String |
getMenuAlign()
Returns the button's menu alignment. |
int |
getMinWidth()
|
boolean |
getMouseEvents()
Retutns true if mouse over effect is disabled. |
java.lang.String |
getText()
Returns the button's text. |
java.lang.String |
getType()
|
void |
hideMenu()
Hide this button's menu (if it has one). |
void |
onComponentEvent(ComponentEvent ce)
Any events a component receives will be forwarded to this method. |
void |
removeSelectionListener(SelectionListener listener)
Removes a previously added listener. |
void |
setIconStyle(java.lang.String iconStyle)
Sets the button's icon style. |
void |
setMenu(Menu menu)
Sets the button's menu. |
void |
setMenuAlign(java.lang.String menuAlign)
Sets the position to align the menu to, see El.alignTo(com.google.gwt.user.client.Element, java.lang.String, int[]) for more
details (defaults to 'tl-bl?', pre-render). |
void |
setMinWidth(int minWidth)
Sets he minimum width for this button (used to give a set of buttons a common width) |
void |
setMouseEvents(boolean handleMouseEvents)
False to disable visual cues on mouseover, mouseout and mousedown (defaults to true). |
void |
setTabIndex(int index)
Sets the button's tab index. |
void |
setText(java.lang.String text)
Sets the button's text. |
void |
setType(java.lang.String type)
Submit, reset or button (defaults to 'button'). |
void |
showMenu()
Show this button's menu (if it has one). |
| Methods inherited from class com.extjs.gxt.ui.client.widget.Component |
|---|
addListener, addPlugin, addStyleName, addWidgetListener, disable, disableEvents, disableTextSelection, el, enable, enableEvents, fireEvent, fireEvent, fireEvent, fly, focus, getBaseStyle, getBorders, getData, getData, getElement, getId, getItemId, getModel, getState, getToolTip, hide, hideToolTip, isDisabledEvents, isEnabled, isRendered, isVisible, onBrowserEvent, recalculate, removeAllListeners, removeFromParent, removeListener, removeStyleName, removeWidgetListener, render, render, saveState, setBorders, setData, setData, setElement, setEnabled, setEnableState, setHeight, setId, setIntStyleAttribute, setItemId, setPixelSize, setSize, setStyleAttribute, setStyleName, setTitle, setToolTip, setToolTip, setVisible, setWidth, show, sinkEvents, toString |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
getParent, isAttached |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, setStylePrimaryName, setVisible, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static Template buttonTemplate
| Constructor Detail |
|---|
public Button()
public Button(java.lang.String text)
text - the button text
public Button(java.lang.String text,
SelectionListener listener)
text - the button's textlistener - the selection listener| Method Detail |
|---|
public void addSelectionListener(SelectionListener listener)
listener - the listener to addpublic java.lang.String getIconStyle()
public Menu getMenu()
public java.lang.String getMenuAlign()
public int getMinWidth()
public boolean getMouseEvents()
public java.lang.String getText()
public java.lang.String getType()
public void hideMenu()
public void onComponentEvent(ComponentEvent ce)
ComponentComponent.onBrowserEvent(com.google.gwt.user.client.Event) method
should not be overridden or modified.
onComponentEvent in class Componentce - the base eventpublic void removeSelectionListener(SelectionListener listener)
listener - the listener to be removedpublic void setIconStyle(java.lang.String iconStyle)
.my-icon { background: url(images/icons/my-icon.png) no-repeat
center left !important; }
iconStyle - the icon stylepublic void setMenu(Menu menu)
menu - the menupublic void setMenuAlign(java.lang.String menuAlign)
El.alignTo(com.google.gwt.user.client.Element, java.lang.String, int[]) for more
details (defaults to 'tl-bl?', pre-render).
menuAlign - the menu alignmentpublic void setMinWidth(int minWidth)
minWidth - the minimum widthpublic void setMouseEvents(boolean handleMouseEvents)
handleMouseEvents - false to disable mouse over cahngespublic void setTabIndex(int index)
index - the tab indexpublic void setText(java.lang.String text)
text - the new textpublic void setType(java.lang.String type)
type - the new typepublic void showMenu()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||