public class CmsPushButton
extends com.google.gwt.user.client.ui.PushButton
implements com.google.gwt.user.client.ui.HasHorizontalAlignment
Uses CSS classes cmsState and dependent from 'button.css', make sure it is injected.
com.google.gwt.user.client.ui.CustomButton.Face
构造器和说明 |
---|
CmsPushButton()
The constructor.
|
CmsPushButton(java.lang.String imageClass)
The constructor.
|
CmsPushButton(java.lang.String imageClass,
java.lang.String downImageClass)
The constructor.
|
限定符和类型 | 方法和说明 |
---|---|
void |
clearHoverState()
Clears the hover state of the button.
|
void |
disable(java.lang.String disabledReason)
Disables the button and changes the button title attribute to the disabled reason.
|
void |
enable()
Enables the button, switching the button title attribute from the disabled reason to the original title.
|
java.lang.String |
getDownImageClass()
Returns the image class of the down face.
|
protected java.lang.String |
getFaceHtml(java.lang.String text,
java.lang.String imageClass)
Convenience method to assemble the HTML to use for a button face.
|
com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant |
getHorizontalAlignment()
This is the alignment of the text in reference to the image, possible values are left or right.
|
java.lang.String |
getImageClass()
Returns the master image class.
|
I_CmsButton.Size |
getSize()
Returns the size.
|
java.lang.String |
getText()
Returns the text.
|
java.lang.String |
getTitle()
Returns the title.
|
boolean |
isDown() |
boolean |
isUseMinWidth()
Checks if the button is constraint to a minimal width.
|
void |
onBrowserEvent(com.google.gwt.user.client.Event event) |
void |
setButtonStyle(I_CmsButton.ButtonStyle style,
I_CmsButton.ButtonColor color)
Sets the button style.
|
void |
setDown(boolean down) |
void |
setDownFace(java.lang.String text,
java.lang.String imageClass)
Sets the down face text and image.
|
void |
setDownImageClass(java.lang.String downImageClass)
Sets the image class for the down face.
|
void |
setHorizontalAlignment(com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant align)
This is the alignment of the text in reference to the image, possible values are left or right.
|
void |
setImageClass(java.lang.String imageClass)
Sets the master image class.
|
void |
setSize(I_CmsButton.Size size)
Sets the size.
|
void |
setText(java.lang.String text)
Sets the text.
|
void |
setTitle(java.lang.String title) |
void |
setUpFace(java.lang.String text,
java.lang.String imageClass)
Sets the up face text and image.
|
void |
setUseMinWidth(boolean useMinWidth)
Tells the button to use a minimal width.
|
getDownDisabledFace, getDownFace, getDownHoveringFace, getHTML, getTabIndex, getUpDisabledFace, getUpFace, getUpHoveringFace, onAttach, onDetach, setAccessKey, setEnabled, setFocus, setHTML, setHTML, setTabIndex
addBlurHandler, addClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addFocusHandler, addFocusListener, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, getFocusImpl, isEnabled, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
public CmsPushButton()
public CmsPushButton(java.lang.String imageClass)
imageClass
- the class for the imagepublic CmsPushButton(java.lang.String imageClass, java.lang.String downImageClass)
imageClass
- the class for the up face imagedownImageClass
- the class for the down face imagepublic void clearHoverState()
Use when opening modal popups to ensure the button is not left in hovered state.
public void disable(java.lang.String disabledReason)
disabledReason
- the disabled reasonpublic void enable()
public java.lang.String getDownImageClass()
public com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant getHorizontalAlignment()
getHorizontalAlignment
在接口中 com.google.gwt.user.client.ui.HasHorizontalAlignment
HasHorizontalAlignment.getHorizontalAlignment()
public java.lang.String getImageClass()
public I_CmsButton.Size getSize()
public java.lang.String getText()
getText
在接口中 com.google.gwt.user.client.ui.HasText
getText
在类中 com.google.gwt.user.client.ui.CustomButton
public java.lang.String getTitle()
getTitle
在类中 com.google.gwt.user.client.ui.UIObject
public boolean isDown()
isDown
在类中 com.google.gwt.user.client.ui.CustomButton
CustomButton.isDown()
public boolean isUseMinWidth()
true
if the button is constraint to a minimal widthpublic void onBrowserEvent(com.google.gwt.user.client.Event event)
onBrowserEvent
在接口中 com.google.gwt.user.client.EventListener
onBrowserEvent
在类中 com.google.gwt.user.client.ui.CustomButton
CustomButton.onBrowserEvent(com.google.gwt.user.client.Event)
public void setButtonStyle(I_CmsButton.ButtonStyle style, I_CmsButton.ButtonColor color)
style
- the style to setcolor
- the color to setpublic void setDown(boolean down)
setDown
在类中 com.google.gwt.user.client.ui.CustomButton
CustomButton.setDown(boolean)
public void setDownFace(java.lang.String text, java.lang.String imageClass)
text
- the down face text to set, set to null
to not show anyimageClass
- the down face image class to use, set to null
to not show anypublic void setDownImageClass(java.lang.String downImageClass)
downImageClass
- the image class to setpublic void setHorizontalAlignment(com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant align)
setHorizontalAlignment
在接口中 com.google.gwt.user.client.ui.HasHorizontalAlignment
HasHorizontalAlignment.setHorizontalAlignment(com.google.gwt.user.client.ui.HasHorizontalAlignment.HorizontalAlignmentConstant)
public void setImageClass(java.lang.String imageClass)
imageClass
- the master image class to setpublic void setSize(I_CmsButton.Size size)
size
- the size to setpublic void setText(java.lang.String text)
setText
在接口中 com.google.gwt.user.client.ui.HasText
setText
在类中 com.google.gwt.user.client.ui.CustomButton
text
- the text to setpublic void setTitle(java.lang.String title)
setTitle
在类中 com.google.gwt.user.client.ui.UIObject
UIObject.setTitle(java.lang.String)
public void setUpFace(java.lang.String text, java.lang.String imageClass)
text
- the up face text to set, set to null
to not show anyimageClass
- the up face image class to use, set to null
to not show anypublic void setUseMinWidth(boolean useMinWidth)
useMinWidth
- true
to use a minimal widthprotected java.lang.String getFaceHtml(java.lang.String text, java.lang.String imageClass)
text
- text the up face text to set, set to null
to not show anyimageClass
- the up face image class to use, set to null
to not show any