Package com.levigo.jadice.web.client.ui
Class JadiceButtonBuilder
java.lang.Object
com.levigo.jadice.web.client.ui.JadiceButtonBuilder
- All Implemented Interfaces:
com.google.gwt.user.client.ui.IsWidget
Builder for a JadiceButton. The builder instance has to be fed with button related aspects, like
command, icon, label, key binding and so on before actually creating the button by calling
build().
Attention: From jadice web toolkit version 5.5.0.0 on this class should only be used for buttons
within short-living widgets (like the calibrate resolution widget). The actions of the buttons
created by this class are not registered in an ActionRegistry.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Commandprotected Collection<Object> protected Stringprotected Stringprotected JadiceButtonStyle -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddStyleName(String style) com.google.gwt.user.client.ui.WidgetasWidget()build()Creates the button.setCommand(Command command) Sets the command to associate with the button.setContext(Collection<Object> context) setDescription(String description) setIcon(StateEffectIcon icon) setIconFont(ToggleIconFont iconFont) setInitialEffect(int initialEffect) Sets the effect of the button, with effects as specified in theIconManager's EFFECT_* constants.setPopupExecutor(PopupExecutor popupExecutor) setStyle(JadiceButtonBuilder.ResourceType resource) setStyle(JadiceButtonStyle style)
-
Field Details
-
description
-
label
-
command
-
context
-
style
-
addedStyleNames
-
-
Constructor Details
-
JadiceButtonBuilder
public JadiceButtonBuilder()
-
-
Method Details
-
setDescription
-
setIcon
-
setIconFont
-
setLabel
-
setCommand
Sets the command to associate with the button.- Parameters:
command- Command to associate with the button.- Returns:
- this (BuilderPattern)
-
setContext
-
setStyle
-
addStyleName
-
setStyle
-
setInitialEffect
Sets the effect of the button, with effects as specified in theIconManager's EFFECT_* constants.- Parameters:
initialEffect- The intial effect.- Returns:
- The builder itself (according to Builder Pattern).
-
setPopupExecutor
-
build
Creates the button. At least a command must have been set prior to calling this method.- Returns:
- The new Button.
-
asWidget
public com.google.gwt.user.client.ui.Widget asWidget()- Specified by:
asWidgetin interfacecom.google.gwt.user.client.ui.IsWidget
-