|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpivot.wtk.Component
pivot.wtk.Button
public abstract class Button
Abstract base class for button components. TODO Ensure that button group names are unique across applications? Applets downloaded from different domains won't clash, but multiple instances of the same application from the same domain would. Put the groups in the application context? TODO Allow callers to remove a button group (possibly by exposing group dictionary interface).
Nested Class Summary | |
---|---|
static interface |
Button.DataRenderer
Button data renderer interface. |
static class |
Button.Group
Class representing a toggle button group. |
static interface |
Button.GroupListener
Listener interface for toggle button groups. |
static class |
Button.State
Enumeration representing a button's selection state. |
Nested classes/interfaces inherited from class pivot.wtk.Component |
---|
Component.Attributes, Component.ComponentDictionary, Component.DecoratorSequence, Component.StyleDictionary, Component.UserDataDictionary |
Constructor Summary | |
---|---|
Button()
|
|
Button(Object buttonData)
|
Method Summary | |
---|---|
Action |
getAction()
Returns the action associated with this button. |
Object |
getButtonData()
|
ListenerList<ButtonListener> |
getButtonListeners()
|
ListenerList<ButtonPressListener> |
getButtonPressListeners()
|
ListenerList<ButtonStateListener> |
getButtonStateListeners()
|
Button.DataRenderer |
getDataRenderer()
|
Button.Group |
getGroup()
Returns the button's group. |
static Button.Group |
getGroup(String groupName)
|
String |
getSelectedKey()
|
Button.State |
getState()
Returns the button's selection state. |
String |
getStateKey()
|
boolean |
isSelected()
Returns the button's selected state. |
boolean |
isToggleButton()
Returns the button's toggle state. |
boolean |
isTriState()
Returns the button's tri-state state. |
void |
load(Dictionary<String,?> context)
Copies bound values from the bind context to the component. |
void |
press()
"Presses" the button. |
void |
setAction(Action action)
Sets this button's action. |
void |
setAction(String actionID)
Sets this button's action. |
void |
setButtonData(Object buttonData)
|
void |
setDataRenderer(Button.DataRenderer dataRenderer)
|
void |
setEnabled(boolean enabled)
Sets the component's enabled state. |
void |
setGroup(Button.Group group)
Sets the button's group. |
void |
setGroup(String group)
|
void |
setSelected(boolean selected)
Sets the button's selected state. |
void |
setSelectedKey(String selectedKey)
|
void |
setState(Button.State state)
Sets the button's selection state. |
void |
setState(String state)
|
void |
setStateKey(String stateKey)
|
void |
setToggleButton(boolean toggleButton)
Sets the button's toggle state. |
void |
setTriState(boolean triState)
Sets the button's tri-state state. |
void |
store(Dictionary<String,?> context)
Copies bound values from the component to the bind context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Button()
public Button(Object buttonData)
Method Detail |
---|
public Object getButtonData()
public void setButtonData(Object buttonData)
public Button.DataRenderer getDataRenderer()
public void setDataRenderer(Button.DataRenderer dataRenderer)
public Action getAction()
public void setAction(Action action)
action
- The action to be triggered when this button is pressed, or null
for no action.public void setAction(String actionID)
actionID
- The ID of the action to be triggered when this button is pressed.
IllegalArgumentException
- If an action with the given ID does not exist.public void setEnabled(boolean enabled)
Component
setEnabled
in class Component
enabled
- true if the component is enabled; false, otherwise.public void press()
public boolean isSelected()
public void setSelected(boolean selected)
selected
- public Button.State getState()
public void setState(Button.State state)
state
- public void setState(String state)
public boolean isToggleButton()
public void setToggleButton(boolean toggleButton)
toggleButton
- public boolean isTriState()
public void setTriState(boolean triState)
triState
- public Button.Group getGroup()
public void setGroup(Button.Group group)
group
- public void setGroup(String group)
public String getSelectedKey()
public void setSelectedKey(String selectedKey)
public String getStateKey()
public void setStateKey(String stateKey)
public void load(Dictionary<String,?> context)
Component
load
in class Component
public void store(Dictionary<String,?> context)
Component
store
in class Component
public static Button.Group getGroup(String groupName)
public ListenerList<ButtonListener> getButtonListeners()
public ListenerList<ButtonStateListener> getButtonStateListeners()
public ListenerList<ButtonPressListener> getButtonPressListeners()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |