|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.itmill.toolkit.terminal.Identifiable
com.itmill.toolkit.ui.AbstractComponent
com.itmill.toolkit.ui.AbstractField
com.itmill.toolkit.ui.Button
public class Button
A generic button component.
| Nested Class Summary | |
|---|---|
class |
Button.ClickEvent
Click event. |
static interface |
Button.ClickListener
Button click listener |
| Nested classes/interfaces inherited from class com.itmill.toolkit.ui.AbstractField |
|---|
AbstractField.ReadOnlyStatusChangeEvent |
| Nested classes/interfaces inherited from interface com.itmill.toolkit.ui.Field |
|---|
Field.ValueChangeEvent |
| Nested classes/interfaces inherited from interface com.itmill.toolkit.ui.Component |
|---|
Component.ErrorEvent, Component.ErrorListener, Component.Event, Component.Focusable, Component.Listener |
| Nested classes/interfaces inherited from interface com.itmill.toolkit.terminal.Paintable |
|---|
Paintable.RepaintRequestEvent, Paintable.RepaintRequestListener |
| Nested classes/interfaces inherited from interface com.itmill.toolkit.data.Buffered |
|---|
Buffered.SourceException |
| Nested classes/interfaces inherited from interface com.itmill.toolkit.data.Property |
|---|
Property.ConversionException, Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer |
| Constructor Summary | |
|---|---|
Button()
Creates a new push button. |
|
Button(String caption)
Creates a new push button. |
|
Button(String caption,
boolean initialState)
Creates a new switch button with initial value. |
|
Button(String caption,
Button.ClickListener listener)
Creates a new push button with click listener. |
|
Button(String caption,
Object target,
String methodName)
Creates a new push button with a method listening button clicks. |
|
Button(String caption,
Property dataSource)
Creates a new switch button that is connected to a boolean property. |
|
| Method Summary | |
|---|---|
void |
addActionHandler(Action.Handler actionHandler)
Adds an action handler. |
void |
addListener(Button.ClickListener listener)
Adds the button click listener. |
void |
changeVariables(Object source,
Map variables)
Invoked when the value of a variable has changed. |
protected void |
fireClick()
Emits the options change event. |
String |
getTag()
Gets component UIDL tag. |
Class |
getType()
The type of the button as a property. |
boolean |
isSwitchMode()
Checks if it is switchMode. |
void |
paintContent(PaintTarget target)
Paints the content of this component. |
void |
removeActionHandler(Action.Handler actionHandler)
Removes an action handler. |
void |
removeListener(Button.ClickListener listener)
Removes the button click listener. |
void |
setImmediate(boolean immediate)
Sets immediate mode. |
void |
setSwitchMode(boolean switchMode)
Sets the switchMode. |
| Methods inherited from class com.itmill.toolkit.ui.AbstractField |
|---|
addListener, addListener, addValidator, attach, commit, constructField, discard, finalize, fireReadOnlyStatusChange, fireValueChange, focus, getErrorMessage, getFocusableId, getPropertyDataSource, getTabIndex, getValidators, getValue, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isReadThrough, isRequired, isValid, isWriteThrough, removeListener, removeListener, removeValidator, setInternalValue, setInvalidAllowed, setInvalidCommitted, setPropertyDataSource, setReadOnly, setReadThrough, setRequired, setTabIndex, setValue, setWriteThrough, toString, validate, valueChange |
| Methods inherited from class com.itmill.toolkit.ui.AbstractComponent |
|---|
addListener, addListener, addListener, addListener, childRequestedRepaint, dependsOn, detach, fireComponentErrorEvent, fireComponentEvent, fireEvent, getApplication, getCaption, getComponentError, getData, getDescription, getDirectDependencies, getIcon, getLocale, getParent, getStyle, getWindow, isEnabled, isImmediate, isVisible, paint, removeDirectDependency, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintRequests, setCaption, setComponentError, setData, setDescription, setEnabled, setIcon, setLocale, setParent, setStyle, setVisible |
| Methods inherited from class com.itmill.toolkit.terminal.Identifiable |
|---|
getDebugId, getUIID, setDebugId, setUIID |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.itmill.toolkit.ui.Field |
|---|
getDescription, setCaption, setDescription |
| Methods inherited from interface com.itmill.toolkit.ui.Component |
|---|
addListener, childRequestedRepaint, detach, getApplication, getCaption, getIcon, getLocale, getParent, getStyle, getWindow, isEnabled, isVisible, removeListener, setEnabled, setParent, setStyle, setVisible |
| Methods inherited from interface com.itmill.toolkit.terminal.Paintable |
|---|
addListener, paint, removeListener, requestRepaint, requestRepaintRequests |
| Methods inherited from interface com.itmill.toolkit.terminal.VariableOwner |
|---|
dependsOn, getDirectDependencies, isImmediate, removeDirectDependency |
| Constructor Detail |
|---|
public Button()
public Button(String caption)
caption - the Button caption.
public Button(String caption,
Button.ClickListener listener)
caption - the Button caption.listener - the Button click listener.
public Button(String caption,
Object target,
String methodName)
caption - the Button caption.target - the Object having the method for listening button clicks.methodName - the name of the method in target object, that receives button
click events.
public Button(String caption,
boolean initialState)
state - the Initial state of the switch-button.initialState -
public Button(String caption,
Property dataSource)
state - the Initial state of the switch-button.dataSource - | Method Detail |
|---|
public String getTag()
getTag in class AbstractComponent
public void paintContent(PaintTarget target)
throws PaintException
paintContent in class AbstractFieldevent - the PaintEvent.
IOException - if the writing failed due to input/output error.
PaintException - if the paint operation failed.
public void changeVariables(Object source,
Map variables)
changeVariables in interface VariableOwnerchangeVariables in class AbstractComponentsource - variables - public boolean isSwitchMode()
true if it is in Switch Mode, otherwise
false.public void setSwitchMode(boolean switchMode)
switchMode - The switchMode to set.public void setImmediate(boolean immediate)
setImmediate in class AbstractComponentimmediate - the boolean value specifying if the component should be in the
immediate mode after the call.AbstractComponent.setImmediate(boolean)public Class getType()
getType in interface PropertygetType in class AbstractFieldProperty.getType()public void addListener(Button.ClickListener listener)
listener - the Listener to be added.public void removeListener(Button.ClickListener listener)
listener - the Listener to be removed.protected void fireClick()
public void addActionHandler(Action.Handler actionHandler)
addActionHandler in interface Action.ContaineractionHandler - the new handler to be added.Action.Container.addActionHandler(Action.Handler)public void removeActionHandler(Action.Handler actionHandler)
removeActionHandler in interface Action.ContaineractionHandler - the handler to be removed.Action.Container.removeActionHandler(Action.Handler)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||