|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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 class com.itmill.toolkit.ui.AbstractComponent |
|---|
AbstractComponent.ComponentErrorEvent, AbstractComponent.ComponentErrorHandler |
| Nested classes/interfaces inherited from interface com.itmill.toolkit.ui.Field |
|---|
Field.ValueChangeEvent |
| 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 |
| 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 |
| Field Summary | |
|---|---|
static String |
STYLE_LINK
|
| Fields inherited from interface com.itmill.toolkit.terminal.Sizeable |
|---|
SIZE_UNDEFINED, UNIT_SYMBOLS, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS, UNITS_ROWS |
| 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 |
addListener(Button.ClickListener listener)
Adds the button click listener. |
boolean |
booleanValue()
Get the boolean value of the button state. |
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 |
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 java.lang.Object |
|---|
clone, equals, finalize, 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, addStyleName, childRequestedRepaint, detach, getApplication, getCaption, getIcon, getLocale, getParent, getStyleName, getWindow, isEnabled, isVisible, removeListener, removeStyleName, setEnabled, setIcon, setParent, setStyleName, setVisible |
| Methods inherited from interface com.itmill.toolkit.terminal.Paintable |
|---|
addListener, getDebugId, paint, removeListener, requestRepaint, requestRepaintRequests, setDebugId |
| Methods inherited from interface com.itmill.toolkit.terminal.VariableOwner |
|---|
isImmediate |
| Methods inherited from interface com.itmill.toolkit.terminal.Sizeable |
|---|
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUnits, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUnits |
| Field Detail |
|---|
public static final String STYLE_LINK
| 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)
Button(String, com.itmill.toolkit.ui.Button.ClickListener)
instead. The method must have either no parameters, or only one parameter
of Button.ClickEvent type.
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 AbstractFieldsource - variables - public boolean isSwitchMode()
true if it is in Switch Mode, otherwise
false.public void setSwitchMode(boolean switchMode)
switchMode - The switchMode to set.public boolean booleanValue()
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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||