public class ActionBuilder extends java.lang.Object implements IActionBuilder
Constructor and Description |
---|
ActionBuilder() |
ActionBuilder(IActionBuilder builder) |
Modifier and Type | Method and Description |
---|---|
ICommandAction |
build()
Creates a new command action defined by the builder setup
|
static IActionBuilder |
builder() |
IActionBuilder |
setAccelerator(Accelerator accelerator)
Sets the actions accelerator
|
IActionBuilder |
setAccelerator(char key,
Modifier... modifier)
Sets the actions accelerator
|
IActionBuilder |
setAccelerator(VirtualKey virtualKey,
Modifier... modifier)
Sets the actions accelerator
|
IActionBuilder |
setActionExceptionHandler(IExceptionHandler exceptionHandler)
Set's the ExceptionHandler of the action.
|
IActionBuilder |
setCommand(ICommand command)
Sets the actions command
|
IActionBuilder |
setCommand(ICommandExecutor command)
Sets the actions command defined by a command executor
The command that will be set has no enabled checker and no exception handler
|
IActionBuilder |
setCommand(ICommandExecutor command,
IEnabledChecker executableStateChecker)
Sets the actions command defined by a command executor and enabled checker
The command that will be set has no exception handler
|
IActionBuilder |
setCommand(ICommandExecutor command,
IEnabledChecker enabledChecker,
IExceptionHandler exceptionHandler)
Sets the actions command defined by a command executor, enabled checker and exception handler
|
IActionBuilder |
setCommand(ICommandExecutor command,
IExceptionHandler exceptionHandler)
Sets the actions command defined by a command executor and exception handler
The command that will be set has no enabled checker
|
IActionBuilder |
setEnabled(boolean enabled)
Sets the enabled state of the action
|
IActionBuilder |
setIcon(IImageConstant icon)
Sets the actions icon
|
IActionBuilder |
setMnemonic(char mnemonic)
Sets the actions mnemonic
|
IActionBuilder |
setMnemonic(java.lang.Character mnemonic)
Sets the actions mnemonic
|
IActionBuilder |
setText(java.lang.String text)
Sets the actions label text
|
IActionBuilder |
setToolTipText(java.lang.String toolTipText)
Sets the actions tooltip text
|
public ActionBuilder()
public ActionBuilder(IActionBuilder builder)
public IActionBuilder setText(java.lang.String text)
IActionBuilder
setText
in interface IActionBuilder
text
- The text to setpublic IActionBuilder setToolTipText(java.lang.String toolTipText)
IActionBuilder
setToolTipText
in interface IActionBuilder
toolTipText
- The text to setpublic IActionBuilder setIcon(IImageConstant icon)
IActionBuilder
setIcon
in interface IActionBuilder
icon
- The icon to setpublic IActionBuilder setMnemonic(java.lang.Character mnemonic)
IActionBuilder
setMnemonic
in interface IActionBuilder
mnemonic
- The mnemonic to set, may be nullpublic IActionBuilder setMnemonic(char mnemonic)
IActionBuilder
setMnemonic
in interface IActionBuilder
mnemonic
- The mnemonic to setpublic IActionBuilder setAccelerator(Accelerator accelerator)
IActionBuilder
setAccelerator
in interface IActionBuilder
public IActionBuilder setAccelerator(char key, Modifier... modifier)
IActionBuilder
setAccelerator
in interface IActionBuilder
key
- The accelerator keymodifier
- The accelerator modifierpublic IActionBuilder setAccelerator(VirtualKey virtualKey, Modifier... modifier)
IActionBuilder
setAccelerator
in interface IActionBuilder
virtualKey
- The accelerator keymodifier
- The accelerator modifierpublic IActionBuilder setEnabled(boolean enabled)
IActionBuilder
setEnabled
in interface IActionBuilder
enabled
- The enabled state to setpublic IActionBuilder setCommand(ICommand command)
IActionBuilder
setCommand
in interface IActionBuilder
command
- The command to set, may be null if the action should not have a commandpublic IActionBuilder setCommand(ICommandExecutor command)
IActionBuilder
setCommand
in interface IActionBuilder
command
- The executor of the command to setpublic IActionBuilder setCommand(ICommandExecutor command, IEnabledChecker executableStateChecker)
IActionBuilder
setCommand
in interface IActionBuilder
command
- The executor of the command to setpublic IActionBuilder setCommand(ICommandExecutor command, IExceptionHandler exceptionHandler)
IActionBuilder
setCommand
in interface IActionBuilder
command
- The executor of the command to setexceptionHandler
- The exception handler of the command to setpublic IActionBuilder setCommand(ICommandExecutor command, IEnabledChecker enabledChecker, IExceptionHandler exceptionHandler)
IActionBuilder
setCommand
in interface IActionBuilder
command
- The executor of the command to setenabledChecker
- The enabled checker of the command to setexceptionHandler
- The exception handler of the command to setpublic IActionBuilder setActionExceptionHandler(IExceptionHandler exceptionHandler)
IActionBuilder
setActionExceptionHandler
in interface IActionBuilder
exceptionHandler
- The ExceptionHandler to setpublic ICommandAction build()
IActionBuilder
build
in interface IActionBuilder
public static IActionBuilder builder()
Siehe auch Jowidgets Nutzerhandbuch