com.sencha.gxt.widget.core.client.button
Class CellButtonBase<C>

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.sencha.gxt.widget.core.client.Component
              extended by com.sencha.gxt.widget.core.client.cell.CellComponent<C>
                  extended by com.sencha.gxt.widget.core.client.button.CellButtonBase<C>
All Implemented Interfaces:
Editor<C>, LeafValueEditor<C>, HasAttachHandlers, HasResizeHandlers, HasValueChangeHandlers<C>, HasHandlers, HasSafeHtml, EventListener, TakesValue<C>, HasEnabled, HasHTML, HasText, HasValue<C>, HasVisibility, IsWidget, HasKeyProvider<C>, ArrowSelectEvent.HasArrowSelectHandlers, BeforeHideEvent.HasBeforeHideHandlers, BeforeSelectEvent.HasBeforeSelectHandlers, BeforeShowContextMenuEvent.HasBeforeShowContextMenuHandler, BeforeShowEvent.HasBeforeShowHandlers, BlurEvent.HasBlurHandlers, DisableEvent.HasDisableHandlers, EnableEvent.HasEnableHandlers, FocusEvent.HasFocusHandlers, HideEvent.HasHideHandlers, MoveEvent.HasMoveHandlers, SelectEvent.HasSelectHandlers, ShowContextMenuEvent.HasShowContextMenuHandler, ShowEvent.HasShowHandlers, HasFocusSupport, HasIcon, HasItemId
Direct Known Subclasses:
TextButton, ToggleButton

public class CellButtonBase<C>
extends CellComponent<C>
implements HasHTML, HasIcon, BeforeSelectEvent.HasBeforeSelectHandlers, SelectEvent.HasSelectHandlers, ArrowSelectEvent.HasArrowSelectHandlers, HasSafeHtml


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
 
Nested classes/interfaces inherited from interface com.google.gwt.editor.client.Editor
Editor.Ignore, Editor.Path
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
CellButtonBase()
           
CellButtonBase(ButtonCell<C> cell)
           
CellButtonBase(ButtonCell<C> cell, C initialValue)
           
 
Method Summary
 HandlerRegistration addArrowSelectHandler(ArrowSelectEvent.ArrowSelectHandler handler)
          Adds a ArrowSelectEvent.ArrowSelectHandler handler for ArrowSelectEvent events.
 HandlerRegistration addBeforeSelectHandler(BeforeSelectEvent.BeforeSelectHandler handler)
          Adds a BeforeSelectEvent.BeforeSelectHandler handler for BeforeSelectEvent events.
 HandlerRegistration addSelectHandler(SelectEvent.SelectHandler handler)
          Adds a SelectEvent.SelectHandler handler for SelectEvent events.
 ButtonCell.ButtonArrowAlign getArrowAlign()
          Returns the button's arrow alignment.
 java.lang.String getHTML()
           
 ImageResource getIcon()
          Returns the icon.
 ButtonCell.IconAlign getIconAlign()
          Returns the button's icon alignment.
 Menu getMenu()
          Returns the button's menu (if it has one).
 Style.AnchorAlignment getMenuAlign()
          Returns the button's menu alignment.
 int getMinWidth()
          Returns the button's minimum width.
 boolean getMouseEvents()
          Returns false if mouse over effect is disabled.
 ButtonCell.ButtonScale getScale()
          Returns the button's scale.
 java.lang.String getText()
           
 void hideMenu()
          Hide this button's menu (if it has one).
 void onBrowserEvent(Event event)
           
 void setArrowAlign(ButtonCell.ButtonArrowAlign arrowAlign)
          Sets the arrow alignment (defaults to RIGHT).
 void setHTML(SafeHtml html)
           
 void setHTML(java.lang.String html)
           
 void setIcon(ImageResource icon)
          Sets the icon.
 void setIconAlign(ButtonCell.IconAlign iconAlign)
          Sets the icon alignment (defaults to LEFT).
 void setMenu(Menu menu)
          Sets the button's menu.
 void setMenuAlign(Style.AnchorAlignment menuAlign)
          Sets the position to align the menu to, see XElement.alignTo(com.google.gwt.dom.client.Element, com.sencha.gxt.core.client.Style.AnchorAlignment, 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 setScale(ButtonCell.ButtonScale scale)
          Sets the button's scale.
 void setText(java.lang.String text)
           
 void showMenu()
          Show this button's menu (if it has one).
 
Methods inherited from class com.sencha.gxt.widget.core.client.cell.CellComponent
addValueChangeHandler, getCell, getElement, getKeyProvider, getValue, redraw, setValue, setValue, setValue
 
Methods inherited from class com.sencha.gxt.widget.core.client.Component
addBeforeHideHandler, addBeforeShowContextMenuHandler, addBeforeShowHandler, addBlurHandler, addDisableHandler, addEnableHandler, addFocusHandler, addHideHandler, addMoveHandler, addResizeHandler, addShowContextMenuHandler, addShowHandler, addStyleOnOver, clearSizeCache, disable, disableEvents, enable, enableEvents, fireEvent, focus, getData, getFocusSupport, getHideMode, getId, getItemId, getOffsetHeight, getOffsetWidth, getShadow, getStateId, getToolTip, hide, hideToolTip, isAllowTextSelection, isAutoHeight, isAutoWidth, isDeferHeight, isEnabled, isRendered, isStateful, isVisible, isVisible, mask, mask, removeToolTip, setAllowTextSelection, setBorders, setBounds, setBounds, setContextMenu, setData, setDeferHeight, setEnabled, setHeight, setHeight, setHideMode, setId, setItemId, setPagePosition, setPixelSize, setPosition, setShadow, setSize, setStateful, setStateId, setTabIndex, setToolTip, setToolTipConfig, setVisible, setWidth, setWidth, show, sync, syncSize, unmask
 
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
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

CellButtonBase

public CellButtonBase()

CellButtonBase

public CellButtonBase(ButtonCell<C> cell)

CellButtonBase

public CellButtonBase(ButtonCell<C> cell,
                      C initialValue)
Method Detail

addArrowSelectHandler

public HandlerRegistration addArrowSelectHandler(ArrowSelectEvent.ArrowSelectHandler handler)
Description copied from interface: ArrowSelectEvent.HasArrowSelectHandlers
Adds a ArrowSelectEvent.ArrowSelectHandler handler for ArrowSelectEvent events.

Specified by:
addArrowSelectHandler in interface ArrowSelectEvent.HasArrowSelectHandlers
Parameters:
handler - the handler
Returns:
the registration for the event

addBeforeSelectHandler

public HandlerRegistration addBeforeSelectHandler(BeforeSelectEvent.BeforeSelectHandler handler)
Description copied from interface: BeforeSelectEvent.HasBeforeSelectHandlers
Adds a BeforeSelectEvent.BeforeSelectHandler handler for BeforeSelectEvent events.

Specified by:
addBeforeSelectHandler in interface BeforeSelectEvent.HasBeforeSelectHandlers
Parameters:
handler - the handler
Returns:
the registration for the event

addSelectHandler

public HandlerRegistration addSelectHandler(SelectEvent.SelectHandler handler)
Description copied from interface: SelectEvent.HasSelectHandlers
Adds a SelectEvent.SelectHandler handler for SelectEvent events.

Specified by:
addSelectHandler in interface SelectEvent.HasSelectHandlers
Parameters:
handler - the handler
Returns:
the registration for the event

getArrowAlign

public ButtonCell.ButtonArrowAlign getArrowAlign()
Returns the button's arrow alignment.

Returns:
the arrow alignment

getHTML

public java.lang.String getHTML()
Specified by:
getHTML in interface HasHTML

getIcon

public ImageResource getIcon()
Description copied from interface: HasIcon
Returns the icon.

Specified by:
getIcon in interface HasIcon
Returns:
the icon

getIconAlign

public ButtonCell.IconAlign getIconAlign()
Returns the button's icon alignment.

Returns:
the icon alignment

getMenu

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

Returns:
the menu

getMenuAlign

public Style.AnchorAlignment getMenuAlign()
Returns the button's menu alignment.

Returns:
the menu alignment

getMinWidth

public int getMinWidth()
Returns the button's minimum width.

Returns:
the minWidth the minimum width

getMouseEvents

public boolean getMouseEvents()
Returns false if mouse over effect is disabled.

Returns:
false if mouse effects disabled

getScale

public ButtonCell.ButtonScale getScale()
Returns the button's scale.

Returns:
the button scale

getText

public java.lang.String getText()
Specified by:
getText in interface HasText

hideMenu

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


onBrowserEvent

public void onBrowserEvent(Event event)
Specified by:
onBrowserEvent in interface EventListener
Overrides:
onBrowserEvent in class CellComponent<C>

setArrowAlign

public void setArrowAlign(ButtonCell.ButtonArrowAlign arrowAlign)
Sets the arrow alignment (defaults to RIGHT).

Parameters:
arrowAlign - the arrow alignment

setHTML

public void setHTML(SafeHtml html)
Specified by:
setHTML in interface HasSafeHtml

setHTML

public void setHTML(java.lang.String html)
Specified by:
setHTML in interface HasHTML

setIcon

public void setIcon(ImageResource icon)
Description copied from interface: HasIcon
Sets the icon.

Specified by:
setIcon in interface HasIcon
Parameters:
icon - the icon

setIconAlign

public void setIconAlign(ButtonCell.IconAlign iconAlign)
Sets the icon alignment (defaults to LEFT).

Parameters:
iconAlign - the icon alignment

setMenu

@UiChild(limit=1,
         tagname="menu")
public void setMenu(Menu menu)
Sets the button's menu.

Parameters:
menu - the menu

setMenuAlign

public void setMenuAlign(Style.AnchorAlignment menuAlign)
Sets the position to align the menu to, see XElement.alignTo(com.google.gwt.dom.client.Element, com.sencha.gxt.core.client.Style.AnchorAlignment, int[]) for more details (defaults to 'tl-bl?', pre-render).

Parameters:
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)

Parameters:
minWidth - the minimum width

setMouseEvents

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

Parameters:
handleMouseEvents - false to disable mouse over changes

setScale

public void setScale(ButtonCell.ButtonScale scale)
Sets the button's scale.

Parameters:
scale - the scale

setText

public void setText(java.lang.String text)
Specified by:
setText in interface HasText

showMenu

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



Copyright © 2012. All Rights Reserved.