Class DynamicRegisteredAction
java.lang.Object
com.levigo.jadice.web.client.util.action.RegisteredAction
com.levigo.jadice.web.client.util.action.DynamicRegisteredAction
- All Implemented Interfaces:
Action,DynamicAction
An implementation of DynamicAction that creates labels and descriptions from the context using
functions.
-
Constructor Summary
ConstructorsConstructorDescriptionDynamicRegisteredAction(Function<Collection<Object>, String> labelMaker, KeyStroke acceleratorKey, StateIcon icon, Command command, Collection<Object> context) DynamicRegisteredAction(Function<Collection<Object>, String> labelMaker, Function<Collection<Object>, String> descriptionMaker, KeyStroke acceleratorKey, KeyStroke alternativeAcceleratorKey, StateIcon icon, Command command, Collection<Object> context, boolean closeOnExecution) -
Method Summary
Modifier and TypeMethodDescriptionReturns the description of the action which should be displayed when hovering over the GUI component containing this action.getLabel()Returns the label of the action which should be displayed in the toolbar or context menu.Methods inherited from class com.levigo.jadice.web.client.util.action.RegisteredAction
canExecuteCommand, executeCommand, getAcceleratorKey, getAlternativeAcceleratorKey, getCloseOnExecution, getCommand, getContext, getIcon, setAlternativeAcceleratorKey, setCommandMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.levigo.jadice.web.client.util.action.Action
getAcceleratorKey, getAlternativeAcceleratorKey, getCloseOnExecution, getCommand, getContext, getIcon, setAlternativeAcceleratorKey, setCommand
-
Constructor Details
-
DynamicRegisteredAction
public DynamicRegisteredAction(Function<Collection<Object>, String> labelMaker, KeyStroke acceleratorKey, StateIcon icon, Command command, Collection<Object> context) -
DynamicRegisteredAction
public DynamicRegisteredAction(Function<Collection<Object>, String> labelMaker, Function<Collection<Object>, String> descriptionMaker, KeyStroke acceleratorKey, KeyStroke alternativeAcceleratorKey, StateIcon icon, Command command, Collection<Object> context, boolean closeOnExecution)
-
-
Method Details
-
getLabel
Description copied from interface:ActionReturns the label of the action which should be displayed in the toolbar or context menu.- Specified by:
getLabelin interfaceAction- Overrides:
getLabelin classRegisteredAction- Returns:
- the label
-
getDescription
Description copied from interface:ActionReturns the description of the action which should be displayed when hovering over the GUI component containing this action.- Specified by:
getDescriptionin interfaceAction- Overrides:
getDescriptionin classRegisteredAction- Returns:
- the description
-