Search in sources :

Example 6 with IDataModelActionBuilder

use of org.jowidgets.cap.ui.api.command.IDataModelActionBuilder in project jo-client-platform by jo-source.

the class CapActionFactoryImpl method dataModelSaveActionBuilder.

@Override
public IDataModelActionBuilder dataModelSaveActionBuilder() {
    final IDataModelActionBuilder builder = new DataModelActionBuilderImpl(new DataModelSaveCommand());
    builder.setText(Messages.getString("CapActionFactoryImpl.save"));
    builder.setIcon(IconsSmall.DISK);
    builder.setAccelerator(VirtualKey.S, Modifier.CTRL);
    return builder;
}
Also used : IDataModelActionBuilder(org.jowidgets.cap.ui.api.command.IDataModelActionBuilder)

Example 7 with IDataModelActionBuilder

use of org.jowidgets.cap.ui.api.command.IDataModelActionBuilder in project jo-client-platform by jo-source.

the class CapActionFactoryImpl method dataModelLoadActionBuilder.

@Override
public IDataModelActionBuilder dataModelLoadActionBuilder() {
    final IDataModelActionBuilder builder = new DataModelActionBuilderImpl(new DataModelLoadCommand());
    builder.setText(Messages.getString("CapActionFactoryImpl.reload"));
    builder.setIcon(IconsSmall.REFRESH);
    return builder;
}
Also used : IDataModelActionBuilder(org.jowidgets.cap.ui.api.command.IDataModelActionBuilder)

Example 8 with IDataModelActionBuilder

use of org.jowidgets.cap.ui.api.command.IDataModelActionBuilder in project jo-client-platform by jo-source.

the class CapWorkbenchActionsProviderImpl method undoAction.

@Override
public IDataModelAction undoAction() {
    IDataModelAction result = Toolkit.getValue(UNDO_ACTION_KEY);
    if (result == null) {
        IDataModelActionBuilder builder = actionFactory.dataModelUndoActionBuilder();
        for (final IWorkbenchMenuInterceptorPlugin plugin : PluginProvider.getPlugins(IWorkbenchMenuInterceptorPlugin.ID)) {
            builder = plugin.getMenuInterceptor().undoAction(builder);
            if (builder == null) {
                break;
            }
        }
        if (builder != null) {
            result = builder.build();
        } else {
            result = null;
        }
        Toolkit.setValue(UNDO_ACTION_KEY, result);
    }
    return result;
}
Also used : IDataModelActionBuilder(org.jowidgets.cap.ui.api.command.IDataModelActionBuilder) IWorkbenchMenuInterceptorPlugin(org.jowidgets.cap.ui.api.plugin.IWorkbenchMenuInterceptorPlugin) IDataModelAction(org.jowidgets.cap.ui.api.command.IDataModelAction)

Aggregations

IDataModelActionBuilder (org.jowidgets.cap.ui.api.command.IDataModelActionBuilder)8 IDataModelAction (org.jowidgets.cap.ui.api.command.IDataModelAction)4 IWorkbenchMenuInterceptorPlugin (org.jowidgets.cap.ui.api.plugin.IWorkbenchMenuInterceptorPlugin)4