ToolItemActionpublic class ToolItemAction extends Object implements ICommonActionWrapper around {@link ToolItem} to implement {@link ICommonAction} |
Fields Summary |
---|
public org.eclipse.swt.widgets.ToolItem | item |
Methods Summary |
---|
public void | setChecked(boolean checked)Sets the enabled state of this action.
item.setSelection(checked);
| public void | setEnabled(boolean enabled)Sets the enabled state of this action.
item.setEnabled(enabled);
| public void | setRunnable(java.lang.Runnable runnable)Sets the {@link Runnable} that will be executed when the action is triggered (through
{@link SelectionListener#widgetSelected(SelectionEvent)} on the wrapped {@link ToolItem}).
item.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
runnable.run();
}
});
|
|