org.exoplatform.gwtframework.ui.client.component
Class TextButton

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Composite
              extended by org.exoplatform.gwtframework.ui.client.component.TextButton
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget
Direct Known Subclasses:
TextButtonControl

public class TextButton
extends com.google.gwt.user.client.ui.Composite

Created by The eXo Platform SAS .

Version:
$
Author:
Vitaliy Gulyy

Nested Class Summary
static interface TextButton.Style
           
static class TextButton.TextAlignment
           
 
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
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
TextButton(java.lang.String text)
          Create StatusText component.
TextButton(java.lang.String text, com.google.gwt.user.client.Command command)
          Create StatusText component.
TextButton(java.lang.String text, TextButton.TextAlignment textAlignment)
          Create StatusText component.
TextButton(java.lang.String text, TextButton.TextAlignment textAlignment, com.google.gwt.user.client.Command command)
          Create StatusText component.
 
Method Summary
 com.google.gwt.user.client.Command getCommand()
          Get command.
 java.lang.String getText()
          Get status text.
 TextButton.TextAlignment getTextAlignment()
          Get text alignment.
 boolean isExecuteCommandOnSingleClick()
          Get is execute command on single mouse click.
protected  void onMouseClick()
          Handler of MouseClick event.
protected  void onMouseDClick()
          Handler of MouseDoubleClick event.
protected  void onMouseDown()
          Handler of MouseDown event.
protected  void onMouseOut()
          Handler of MouseOut event.
protected  void onMouseOver()
          Handler of MouseOver event.
protected  void onMouseUp()
          Handler of MouseUp event.
 void setCommand(com.google.gwt.user.client.Command command)
          Set command which will be executed when component will be clicked.
 void setExecuteCommandOnSingleClick(boolean executeCommandOnSingleClick)
          Enable or disable execution of command on single mouse clicking.
 void setText(java.lang.String text)
          Set status text.
 void setTextAlignment(TextButton.TextAlignment textAlignment)
          Set text alignment.
 void setTitle(java.lang.String title)
          Sets new title of this TextButton.
 void setWidth(int width)
          Sets new width of this TextButton.
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, performDetachedInitialization, render, render, resolvePotentialElement, setWidget, wrapElement
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextButton

public TextButton(java.lang.String text)
Create StatusText component.

Parameters:
text - status text

TextButton

public TextButton(java.lang.String text,
                  com.google.gwt.user.client.Command command)
Create StatusText component.

Parameters:
text - status text
command - command which will be executed when StatusText command will be clicked

TextButton

public TextButton(java.lang.String text,
                  TextButton.TextAlignment textAlignment)
Create StatusText component.

Parameters:
text - status text
textAlignment - alignment of the text

TextButton

public TextButton(java.lang.String text,
                  TextButton.TextAlignment textAlignment,
                  com.google.gwt.user.client.Command command)
Create StatusText component.

Parameters:
text - status text
textAlignment - alignment of the text
command - command which will be executed when StatusText command will be clicked
Method Detail

getCommand

public com.google.gwt.user.client.Command getCommand()
Get command.

Returns:
command which will be executed when component will be clicked

getText

public java.lang.String getText()
Get status text.

Returns:
status text

getTextAlignment

public TextButton.TextAlignment getTextAlignment()
Get text alignment.

Returns:
text alignment

isExecuteCommandOnSingleClick

public boolean isExecuteCommandOnSingleClick()
Get is execute command on single mouse click.

Returns:
is execute command on single mouse click

onMouseClick

protected void onMouseClick()
Handler of MouseClick event.


onMouseDClick

protected void onMouseDClick()
Handler of MouseDoubleClick event.


onMouseDown

protected void onMouseDown()
Handler of MouseDown event.


onMouseOut

protected void onMouseOut()
Handler of MouseOut event.


onMouseOver

protected void onMouseOver()
Handler of MouseOver event.


onMouseUp

protected void onMouseUp()
Handler of MouseUp event.


setCommand

public void setCommand(com.google.gwt.user.client.Command command)
Set command which will be executed when component will be clicked.

Parameters:
command - command which will be executed when component will be clicked

setExecuteCommandOnSingleClick

public void setExecuteCommandOnSingleClick(boolean executeCommandOnSingleClick)
Enable or disable execution of command on single mouse clicking.

Parameters:
executeCommandOnSingleClick - enable or disable execution of command on single mouse clicking

setText

public void setText(java.lang.String text)
Set status text.

Parameters:
text - status text

setTextAlignment

public void setTextAlignment(TextButton.TextAlignment textAlignment)
Set text alignment.

Parameters:
textAlignment - text alignment

setTitle

public void setTitle(java.lang.String title)
Sets new title of this TextButton.

Overrides:
setTitle in class com.google.gwt.user.client.ui.UIObject
See Also:
UIObject.setTitle(java.lang.String)

setWidth

public void setWidth(int width)
Sets new width of this TextButton.

Parameters:
width - new width


Copyright © 2012 eXo Platform SAS. All Rights Reserved.