com.extjs.gxt.ui.client.widget.button
クラス Button

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.extjs.gxt.ui.client.widget.Component
              extended by com.extjs.gxt.ui.client.widget.button.Button
すべての実装インターフェース:
Observable, com.google.gwt.user.client.EventListener
Direct Known Subclasses:
ButtonAdapter, FillButton, SplitButton, ToggleButton

public class Button
extends Component

A button component.

Events:
BeforeSelect : ButtonEvent(button, event)
Fires before this button is selected.
Select : ButtonEvent(button, event)
Fires when this button is selected.
MenuShow : ButtonEvent(button, item)
If this button has a menu, this event fires when it is shown.
MenuHide : ButtonEvent(button, item)
If this button has a menu, this event fires when it is hidden.


入れ子クラス 概要
 
クラス com.google.gwt.user.client.ui.UIObject から継承された 入れ子クラス/インターフェース
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field 概要
static Template buttonTemplate
          Template used by buttons if a template is not provided.
 
クラス com.google.gwt.user.client.ui.UIObject から継承されたフィールド(Fields)
DEBUG_ID_PREFIX
 
コンストラクタ 概要
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.
 
メソッド 概要
 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 onAttach()
           
 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)
          A CSS style which sets a background image to be used as the icon.
 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).
 
クラス com.extjs.gxt.ui.client.widget.Component から継承されたメソッド
addListener, 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, 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, toString
 
クラス com.google.gwt.user.client.ui.Widget から継承されたメソッド
getParent, isAttached
 
クラス com.google.gwt.user.client.ui.UIObject から継承されたメソッド
addStyleDependentName, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, isVisible, removeStyleDependentName, setStylePrimaryName, setVisible, sinkEvents, unsinkEvents
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field 詳細

buttonTemplate

public static Template buttonTemplate
Template used by buttons if a template is not provided.

コンストラクタ 詳細

Button

public Button()
Creates a new button.


Button

public Button(java.lang.String text)
Creates a new button with the given text.

パラメータ:
text - the button text

Button

public Button(java.lang.String text,
              SelectionListener listener)
Creates a new button with the given text and specified selection listener.

パラメータ:
text - the button's text
listener - the selection listener
メソッド 詳細

addSelectionListener

public void addSelectionListener(SelectionListener listener)
Adds a selection listener.

パラメータ:
listener - the listener to add

getMouseEvents

public boolean getMouseEvents()
Retutns true if mouse over effect is disabled.

戻り値:
the handleMouseEvents the handle mouse event state

getIconStyle

public java.lang.String getIconStyle()
Returns the button's icon style.

戻り値:
the icon style

getMenu

public Menu getMenu()
Returns the button's menu (if it has one).

戻り値:
the menu

getMenuAlign

public java.lang.String getMenuAlign()
Returns the button's menu alignment.

戻り値:
the menu alignment

getMinWidth

public int getMinWidth()
戻り値:
the minWidth

getText

public java.lang.String getText()
Returns the button's text.

戻り値:
the button text

getType

public java.lang.String getType()
戻り値:
the type

hideMenu

public void hideMenu()
Hide this button's menu (if it has one).


onAttach

public void onAttach()

onComponentEvent

public void onComponentEvent(ComponentEvent ce)
Description copied from class: Component
Any events a component receives will be forwarded to this method. Subclasses should override as needed. The Component.onBrowserEvent(com.google.gwt.user.client.Event) method should not be overridden or modified.

オーバーライド:
onComponentEvent in class Component
パラメータ:
ce - the base event

removeSelectionListener

public void removeSelectionListener(SelectionListener listener)
Removes a previously added listener.

パラメータ:
listener - the listener to be removed

setMouseEvents

public void setMouseEvents(boolean handleMouseEvents)
False to disable visual cues on mouseover, mouseout and mousedown (defaults to true).

パラメータ:
handleMouseEvents - false to disable mouse over cahnges

setIconStyle

public void setIconStyle(java.lang.String iconStyle)
A CSS style which sets a background image to be used as the icon.

パラメータ:
iconStyle - the CSS class name

setMenu

public void setMenu(Menu menu)
Sets the button's menu.

パラメータ:
menu - the menu

setMenuAlign

public 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).

パラメータ:
menuAlign - the menu alignment

setMinWidth

public void setMinWidth(int minWidth)
Sets he minimum width for this button (used to give a set of buttons a common width)

パラメータ:
minWidth - the minimum width

setTabIndex

public void setTabIndex(int index)
Sets the button's tab index.

パラメータ:
index - the tab index

setText

public void setText(java.lang.String text)
Sets the button's text.

パラメータ:
text - the new text

setType

public void setType(java.lang.String type)
Submit, reset or button (defaults to 'button').

パラメータ:
type - the new type

showMenu

public void showMenu()
Show this button's menu (if it has one).