|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.millstone.base.ui.AbstractComponent
|
+--org.millstone.base.ui.AbstractField
|
+--org.millstone.base.ui.Button
A generic button component.
| Nested Class Summary | |
class |
Button.ClickEvent
Click event. |
static interface |
Button.ClickListener
Button click listener |
| Nested classes inherited from class org.millstone.base.ui.AbstractField |
AbstractField.ReadOnlyStatusChangeEvent, AbstractField.ValueChangeEvent |
| Nested classes inherited from class org.millstone.base.data.Buffered |
Buffered.SourceException |
| Nested classes inherited from class org.millstone.base.data.Property |
Property.ConversionException, Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeEvent, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.ValueChangeEvent, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer |
| Nested classes inherited from class org.millstone.base.ui.Component |
Component.Listener |
| Nested classes inherited from class org.millstone.base.terminal.Paintable |
Paintable.RepaintRequestEvent, Paintable.RepaintRequestListener |
| Constructor Summary | |
Button(java.lang.String caption)
Creates a new push button. |
|
Button(java.lang.String caption,
boolean initialState)
Creates new switch button with initial value. |
|
Button(java.lang.String caption,
Button.ClickListener listener)
Creates a new push button with click listener. |
|
Button(java.lang.String caption,
java.lang.Object target,
java.lang.String methodName)
Creates a new push button with a method listening button clicks. |
|
Button(java.lang.String caption,
Property dataSource)
Creates new switch button that is connected to a boolean property. |
|
| Method Summary | |
void |
addListener(Button.ClickListener listener)
Add button click listener |
void |
changeVariables(java.lang.Object source,
java.util.Map variables)
Invoked when the value of a variable has changed. |
protected void |
fireClick()
Emit options change event. |
java.lang.String |
getTag()
Get component UIDL tag. |
java.lang.Class |
getType()
The type of the button as a property. |
boolean |
isSwitchMode()
Returns the switchMode. |
void |
paintContent(PaintTarget target)
Paint the content of this component. |
void |
removeListener(Button.ClickListener listener)
Remove button click listener |
void |
setImmediate(boolean immediate)
Set immediate mode. |
void |
setSwitchMode(boolean switchMode)
Sets the switchMode. |
| Methods inherited from class org.millstone.base.ui.AbstractField |
addListener, addListener, addValidator, commit, constructField, discard, fireReadOnlyStatusChange, fireValueChange, focus, getErrorMessage, getPropertyDataSource, getValidators, getValue, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isReadThrough, isValid, isWriteThrough, removeListener, removeListener, removeValidator, setInvalidAllowed, setInvalidCommitted, setPropertyDataSource, setReadOnly, setReadThrough, setValue, setWriteThrough, toString, validate, valueChange |
| Methods inherited from class org.millstone.base.ui.AbstractComponent |
addListener, addListener, addListener, addListener, attach, childRequestedRepaint, dependsOn, detach, fireComponentEvent, fireEvent, getApplication, getCaption, getComponentError, getDescription, getDirectDependencies, getIcon, getLocale, getParent, getStyle, getWindow, isEnabled, isImmediate, isVisible, paint, removeDirectDependency, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintRequests, setCaption, setComponentError, setDescription, setEnabled, setIcon, setLocale, setParent, setStyle, setVisible |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Button(java.lang.String caption)
caption - Button caption
public Button(java.lang.String caption,
Button.ClickListener listener)
caption - Button captionlistener - Button click listener
public Button(java.lang.String caption,
java.lang.Object target,
java.lang.String methodName)
caption - Button captiontarget - Object having the method for listening button clicksmethodName - The name of the method in target object, that
receives button click events.
public Button(java.lang.String caption,
boolean initialState)
public Button(java.lang.String caption,
Property dataSource)
| Method Detail |
public java.lang.String getTag()
getTag in class AbstractComponent
public void paintContent(PaintTarget target)
throws PaintException
paintContent in class AbstractFieldtarget - target UIDL stream where the component should paint
itself to
IOException - Passed from the UIDLStream.
PaintException - The paint operation failed.
public void changeVariables(java.lang.Object source,
java.util.Map variables)
changeVariables in interface VariableOwnerchangeVariables in class AbstractComponentsource - Source of the variable change. This is the origin of the
event. For example in Web Adapter this is the request.variables - Mapping from variable names to new variable valuespublic boolean isSwitchMode()
public void setSwitchMode(boolean switchMode)
switchMode - The switchMode to setpublic void setImmediate(boolean immediate)
setImmediate in class AbstractComponentimmediate - boolean value specifying if the component should
be in the immediate mode after the call.Push buttons can not be set in non-immediate mode.public java.lang.Class getType()
getType in interface PropertygetType in class AbstractFieldProperty.getType()public void addListener(Button.ClickListener listener)
listener - Listener to be added.public void removeListener(Button.ClickListener listener)
listener - Listener to be removed.protected void fireClick()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||