public class Action extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public Action(String caption)
caption
- the caption for the new action.public String getCaption()
String
.public Resource getIcon()
public void setCaption(String caption)
caption
- the caption to set.public void setIcon(Resource icon)
icon
- the icon to set.Copyright © 2017 Vaadin Ltd. All rights reserved.