|
|||||||||
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.menu.MenuButton
public class MenuButton
Simple subclass of button associated with a menu widget (gets shown below the button).
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 | |
---|---|
MenuButton()
|
|
MenuButton(JavaScriptObject jsObj)
|
|
MenuButton(java.lang.String title)
|
|
MenuButton(java.lang.String title,
Menu menu)
|
Method Summary | |
---|---|
protected JavaScriptObject |
create()
|
java.lang.Boolean |
getAutoDestroyMenu()
If this menuButton is destroyed , should it also destroy its menu ? |
java.lang.Boolean |
getHiliteAccessKey()
If this MenuButton has a specified accessKey , underline it in
the title of the button by default |
Menu |
getMenu()
The menu to show. |
java.lang.String |
getMenuAnimationEffect()
Allows you to specify an animation effect to apply to the menu when it is being shown. |
java.lang.String |
getMenuButtonImage()
Image for menu button indicating that the button expands a menu. |
java.lang.String |
getMenuButtonImageUp()
Image for menu button indicating that the button expands a menu. |
static MenuButton |
getOrCreateRef(JavaScriptObject jsObj)
|
int |
getRollOverMenuHideDelay()
When showMenuOnRollOver is true, this is the
delay in milliseconds before the menu is automatically hidden following mouseOut. |
java.lang.Boolean |
getShowMenuBelow()
The menu drops down below the menu button. |
java.lang.Boolean |
getShowMenuButtonImage()
Show menu button image (up / down arrowhead) for this menu button. |
java.lang.Boolean |
getShowMenuOnRollOver()
When set to true, show the menu automatically when the mouse moves over the button. |
java.lang.String |
getTitle()
Default title for the button. |
void |
setAutoDestroyMenu(java.lang.Boolean autoDestroyMenu)
If this menuButton is destroyed , should it also destroy its menu ? |
static void |
setDefaultProperties(MenuButton menuButtonProperties)
Class level method to set the default properties of this class. |
void |
setHiliteAccessKey(java.lang.Boolean hiliteAccessKey)
If this MenuButton has a specified accessKey , underline it in
the title of the button by default |
void |
setMenu(Menu menu)
The menu to show. |
void |
setMenuAnimationEffect(java.lang.String menuAnimationEffect)
Allows you to specify an animation effect to apply to the menu when it is being shown. |
void |
setMenuButtonImage(java.lang.String menuButtonImage)
Image for menu button indicating that the button expands a menu. |
void |
setMenuButtonImageUp(java.lang.String menuButtonImageUp)
Image for menu button indicating that the button expands a menu. |
void |
setRollOverMenuHideDelay(int rollOverMenuHideDelay)
When showMenuOnRollOver is true, this is the
delay in milliseconds before the menu is automatically hidden following mouseOut. |
void |
setShowMenuBelow(java.lang.Boolean showMenuBelow)
The menu drops down below the menu button. |
void |
setShowMenuButtonImage(java.lang.Boolean showMenuButtonImage)
Show menu button image (up / down arrowhead) for this menu button. |
void |
setShowMenuOnRollOver(java.lang.Boolean showMenuOnRollOver)
When set to true, show the menu automatically when the mouse moves over the button. |
void |
setTitle(java.lang.String title)
Default title for the button. |
void |
showMenu()
Shows the Menu associated with the MenuButton. |
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, 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, 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 MenuButton()
public MenuButton(JavaScriptObject jsObj)
public MenuButton(java.lang.String title)
public MenuButton(java.lang.String title, Menu menu)
Method Detail |
---|
public static MenuButton getOrCreateRef(JavaScriptObject jsObj)
protected JavaScriptObject create()
create
in class Button
public void setAutoDestroyMenu(java.lang.Boolean autoDestroyMenu)
destroyed
, should it also destroy its menu
?
autoDestroyMenu
- autoDestroyMenu Default value is truepublic java.lang.Boolean getAutoDestroyMenu()
destroyed
, should it also destroy its menu
?
public void setHiliteAccessKey(java.lang.Boolean hiliteAccessKey) throws java.lang.IllegalStateException
accessKey
, underline it in
the title of the button by default
setHiliteAccessKey
in class Button
hiliteAccessKey
- hiliteAccessKey Default value is true
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getHiliteAccessKey()
accessKey
, underline it in
the title of the button by default
getHiliteAccessKey
in class Button
public void setMenu(Menu menu)
For a menu button with no menu (menu: null) the up/down arrow image can be suppressed by setting
showMenuButtonImage
: false
.
menu
- menu Default value is nullpublic Menu getMenu()
For a menu button with no menu (menu: null) the up/down arrow image can be suppressed by setting
showMenuButtonImage
: false
.
public void setMenuAnimationEffect(java.lang.String menuAnimationEffect)
menu.showAnimationEffect
Note : This is an advanced setting
menuAnimationEffect
- menuAnimationEffect Default value is nullpublic java.lang.String getMenuAnimationEffect()
menu.showAnimationEffect
public void setMenuButtonImage(java.lang.String menuButtonImage) throws java.lang.IllegalStateException
showMenuBelow
.
Note : This is an advanced setting
menuButtonImage
- menuButtonImage Default value is "[SKIN]menu_button.gif"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdsetMenuButtonImageUp(java.lang.String)
public java.lang.String getMenuButtonImage()
showMenuBelow
.
getMenuButtonImageUp()
public void setMenuButtonImageUp(java.lang.String menuButtonImageUp) throws java.lang.IllegalStateException
showMenuBelow
.
Note : This is an advanced setting
menuButtonImageUp
- menuButtonImageUp Default value is "[SKIN]menu_button_up.gif"
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdsetMenuButtonImage(java.lang.String)
public java.lang.String getMenuButtonImageUp()
showMenuBelow
.
getMenuButtonImage()
public void setRollOverMenuHideDelay(int rollOverMenuHideDelay) throws java.lang.IllegalStateException
showMenuOnRollOver
is true, this is the
delay in milliseconds before the menu is automatically hidden following mouseOut.
Note : This is an advanced setting
rollOverMenuHideDelay
- rollOverMenuHideDelay Default value is 200
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdAppearance overview and related methods
public int getRollOverMenuHideDelay()
showMenuOnRollOver
is true, this is the
delay in milliseconds before the menu is automatically hidden following mouseOut.
Appearance overview and related methods
public void setShowMenuBelow(java.lang.Boolean showMenuBelow)
showMenuBelow
- True if the menu should be shown below the menubutton.. Default value is truepublic java.lang.Boolean getShowMenuBelow()
public void setShowMenuButtonImage(java.lang.Boolean showMenuButtonImage) throws java.lang.IllegalStateException
showMenuButtonImage
- Should the image be shown. Default value is true
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdpublic java.lang.Boolean getShowMenuButtonImage()
public void setShowMenuOnRollOver(java.lang.Boolean showMenuOnRollOver) throws java.lang.IllegalStateException
Note : This is an advanced setting
showMenuOnRollOver
- showMenuOnRollOver Default value is false
java.lang.IllegalStateException
- this property cannot be changed after the component has been createdAppearance overview and related methods
public java.lang.Boolean getShowMenuOnRollOver()
Appearance overview and related methods
public void setTitle(java.lang.String title)
setTitle
in class Button
title
- title Default value is "Show Menu"Basics overview and related methods
,
States Examplepublic java.lang.String getTitle()
getTitle
in class Button
Basics overview and related methods
,
States Examplepublic static void setDefaultProperties(MenuButton menuButtonProperties)
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.
menuButtonProperties
- properties that should be used as new defaults when instances of this class are createdpublic void showMenu()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |