We use cookies to serve our customers and website visitors in the best possible way. Cookies are used for the proper functioning of the website and for improving the user experience, monitoring visitor traffic and marketing purposes. By continuing to browse the site, you agree to our use of cookies. You can read more about cookies here.
com.vaadin.event.
Class Action
java.lang.Object
com.vaadin.event.Action
All Implemented Interfaces:
Direct Known Subclasses:
- extends Object
- implements Serializable
public class Action
Implements the action framework. This class contains subinterfaces for action handling and listing, and for action handler registrations and unregistration.
Since:
3.0
Version:
6.8.18
Author:
Vaadin Ltd.
See Also:
Nested Class Summary | |
---|---|
static interface |
Action.Container
Interface implemented by all components where actions can be registered. |
static interface |
Action.Handler
Interface implemented by classes who wish to handle actions. |
static interface |
Action.Listener
An Action that implements this interface can be added to an Action.Notifier (or NotifierProxy) via the addAction()
-method, which in many cases is easier than implementing the
Action.Handler interface. |
static interface |
Action.Notifier
Action.Containers implementing this support an easier way of adding single Actions than the more involved Action.Handler. |
static interface |
Action.ShortcutNotifier
|
Constructor Summary | |
---|---|
Action(String caption)
Constructs a new action with the given caption. |
|
Action(String caption,
Resource icon)
Constructs a new action with the given caption string and icon. |
Method Summary | |
---|---|
String |
getCaption()
Returns the action's caption. |
Resource |
getIcon()
Returns the action's icon. |
void |
setCaption(String caption)
Sets the caption. |
void |
setIcon(Resource icon)
Sets the icon. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
Action
public Action(String caption)
- Parameters:
caption
- the caption for the new action.
Constructs a new action with the given caption.
Action
public Action(String caption,
Resource icon)
- Parameters:
caption
- the caption for the new action.icon
- the icon for the new action.
Constructs a new action with the given caption string and icon.
Method Detail |
---|
getCaption
public String getCaption()
- Returns:
- the action's caption as a
String
.
Returns the action's caption.
getIcon
public Resource getIcon()
- Returns:
- the action's Icon.
Returns the action's icon.
setCaption
public void setCaption(String caption)
- Parameters:
caption
- the caption to set.
Sets the caption.
setIcon
public void setIcon(Resource icon)
- Parameters:
icon
- the icon to set.
Sets the icon.