|
|||||||||
| 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.smartgwt.client.widgets.BaseWidget
com.smartgwt.client.widgets.Canvas
com.smartgwt.client.widgets.StatefulCanvas
com.smartgwt.client.widgets.Button
com.smartgwt.client.widgets.IconButton
public class IconButton
A Button subclass that displays an icon, title and optional menuIcon and is capable of horizontal and vertical orientation.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled |
| Field Summary |
|---|
| Fields inherited from class com.smartgwt.client.widgets.BaseWidget |
|---|
config, configOnly, id, isElementSet, scClassName |
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
IconButton()
|
|
IconButton(JavaScriptObject jsObj)
|
|
IconButton(String title)
|
|
| Method Summary | |
|---|---|
protected JavaScriptObject |
create()
|
String |
getBaseStyle()
Default CSS class. |
String |
getIcon()
Icon to show to the left of or above the title, according to the button's Orientation. |
int |
getIconSize()
The size of the normal icon for this button. |
String |
getLargeIcon()
Icon to show above the title when Orientation is "vertical". |
int |
getLargeIconSize()
The size of the large icon for this button. |
String |
getMenuIconSrc()
Image that shows a menu when clicked. |
static IconButton |
getOrCreateRef(JavaScriptObject jsObj)
|
String |
getOrientation()
The orientation of this IconButton. |
Boolean |
getShowMenuIcon()
Whether to show the menu-icon which fires the menuIconClicked notification method when clicked. |
Boolean |
getShowMenuIconOver()
Image that shows a menu when clicked. |
void |
menuIconClick()
Notification method fired when a user clicks on the menuIcon on this IconButton. |
void |
setBaseStyle(String baseStyle)
Default CSS class. |
static void |
setDefaultProperties(IconButton iconButtonProperties)
Class level method to set the default properties of this class. |
void |
setIcon(String icon)
Icon to show to the left of or above the title, according to the button's Orientation. |
void |
setIconSize(int iconSize)
The size of the normal icon for this button. |
void |
setLargeIcon(String largeIcon)
Icon to show above the title when Orientation is "vertical". |
void |
setLargeIconSize(int largeIconSize)
The size of the large icon for this button. |
void |
setMenuIconSrc(String menuIconSrc)
Image that shows a menu when clicked. |
void |
setOrientation(String orientation)
The orientation of this IconButton. |
void |
setShowMenuIcon(Boolean showMenuIcon)
Whether to show the menu-icon which fires the menuIconClicked notification method when clicked. |
void |
setShowMenuIconOver(Boolean showMenuIconOver)
Image that shows a menu when clicked. |
| Methods inherited from class com.smartgwt.client.widgets.StatefulCanvas |
|---|
getOverCanvasConstructor, getRedrawOnStateChange, getShowFocusedAsOver, getShowOverCanvas, getStateSuffix, setDefaultProperties, setOverCanvasConstructor, setRedrawOnStateChange, setShowFocusedAsOver, setShowOverCanvas, setTitleStyle |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getStyleElement, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, unsinkEvents |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.google.gwt.event.shared.HasHandlers |
|---|
fireEvent |
| Constructor Detail |
|---|
public IconButton()
public IconButton(JavaScriptObject jsObj)
public IconButton(String title)
| Method Detail |
|---|
public static IconButton getOrCreateRef(JavaScriptObject jsObj)
protected JavaScriptObject create()
create in class Buttonpublic void setBaseStyle(String baseStyle)
setBaseStyle in class ButtonbaseStyle - baseStyle Default value is "iconButton"public String getBaseStyle()
getBaseStyle in class Buttonpublic void setIcon(String icon)
Orientation.
When specifying titleOrientation = "vertical", this icon will be stretched to the largeIconSize unless a largeIcon is specified.
setIcon in class Buttonicon - icon Default value is nullButtonIcon overview and related methods,
Icons Examplepublic String getIcon()
Orientation.
When specifying titleOrientation = "vertical", this icon will be stretched to the largeIconSize unless a largeIcon is specified.
getIcon in class ButtonButtonIcon overview and related methods,
Icons Examplepublic void setIconSize(int iconSize)
setIconSize in class ButtoniconSize - iconSize Default value is 16ButtonIcon overview and related methodspublic int getIconSize()
getIconSize in class ButtonButtonIcon overview and related methodspublic void setLargeIcon(String largeIcon)
Orientation is "vertical". If a largeIcon is not
specified, the normal icon will be stretched to the largeIconSize.
largeIcon - largeIcon Default value is nullpublic String getLargeIcon()
Orientation is "vertical". If a largeIcon is not
specified, the normal icon will be stretched to the largeIconSize.
public void setLargeIconSize(int largeIconSize)
largeIcon is
not specified, the normal icon will be stretched to this size.
largeIconSize - largeIconSize Default value is 32public int getLargeIconSize()
largeIcon is
not specified, the normal icon will be stretched to this size.
public void setMenuIconSrc(String menuIconSrc)
menu when clicked.
menuIconSrc - menuIconSrc Default value is "[SKINIMG]/Menu/submenu_down.png"public String getMenuIconSrc()
menu when clicked.
public void setOrientation(String orientation)
orientation - orientation Default value is "horizontal"public String getOrientation()
public void setShowMenuIcon(Boolean showMenuIcon)
menu-icon which fires the menuIconClicked notification method when clicked.
showMenuIcon - showMenuIcon Default value is falsepublic Boolean getShowMenuIcon()
menu-icon which fires the menuIconClicked notification method when clicked.
public void setShowMenuIconOver(Boolean showMenuIconOver)
menu when clicked.
showMenuIconOver - showMenuIconOver Default value is falsepublic Boolean getShowMenuIconOver()
menu when clicked.
public void menuIconClick()
public static void setDefaultProperties(IconButton iconButtonProperties)
Note: This method is intended for setting default attributes only and will effect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead.
iconButtonProperties - properties that should be used as new defaults when instances of this class are created
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||