Search in sources :

Example 6 with IActionBuilder

use of org.jowidgets.api.command.IActionBuilder in project jo-client-platform by jo-source.

the class BeanTableMenuFactoryImpl method packSelectedActionBuilder.

@Override
public IActionBuilder packSelectedActionBuilder(final IBeanTable<BEAN_TYPE> table) {
    Assert.paramNotNull(table, "table");
    IActionBuilder builder = new BeanTablePackSelectedActionBuilder(table);
    for (final IBeanTableMenuInterceptor<BEAN_TYPE> interceptor : interceptors) {
        if (builder != null) {
            builder = interceptor.packSelectedActionBuilder(table, builder);
        } else {
            break;
        }
    }
    return builder;
}
Also used : IActionBuilder(org.jowidgets.api.command.IActionBuilder)

Example 7 with IActionBuilder

use of org.jowidgets.api.command.IActionBuilder in project jo-client-platform by jo-source.

the class BeanTableMenuFactoryImpl method packAllActionBuilder.

@Override
public IActionBuilder packAllActionBuilder(final IBeanTable<BEAN_TYPE> table) {
    Assert.paramNotNull(table, "table");
    IActionBuilder builder = new BeanTablePackAllActionBuilder(table);
    for (final IBeanTableMenuInterceptor<BEAN_TYPE> interceptor : interceptors) {
        if (builder != null) {
            builder = interceptor.packAllActionBuilder(table, builder);
        } else {
            break;
        }
    }
    return builder;
}
Also used : IActionBuilder(org.jowidgets.api.command.IActionBuilder)

Example 8 with IActionBuilder

use of org.jowidgets.api.command.IActionBuilder in project jo-client-platform by jo-source.

the class BeanTableMenuFactoryImpl method settingsActionBuilder.

@Override
public IActionBuilder settingsActionBuilder(final IBeanTable<BEAN_TYPE> table) {
    Assert.paramNotNull(table, "table");
    IActionBuilder builder = new BeanTableSettingsActionBuilder(table);
    for (final IBeanTableMenuInterceptor<BEAN_TYPE> interceptor : interceptors) {
        if (builder != null) {
            builder = interceptor.settingsActionBuilder(table, builder);
        } else {
            break;
        }
    }
    return builder;
}
Also used : IActionBuilder(org.jowidgets.api.command.IActionBuilder)

Example 9 with IActionBuilder

use of org.jowidgets.api.command.IActionBuilder in project jo-client-platform by jo-source.

the class DeleterActionBuilder method buildAction.

private IAction buildAction() {
    setDefaultTextIfNecessary();
    setDefaultToolTipTextIfNecessary();
    final BeanDeleterCommand<BEAN_TYPE> command = new BeanDeleterCommand<BEAN_TYPE>(model, enabledCheckers, executableCheckers, deleterService, executionInterceptors, multiSelection, beanModificationStatePolicy, beanMessageStatePolicy, exceptionConverter, autoSelection, deletionConfirmDialog);
    final IActionBuilder builder = getBuilder();
    if (model instanceof IDataModelContextProvider) {
        builder.setCommand(new DataModelContextCommandWrapper((IDataModelContextProvider) model, DataModelChangeType.SELECTION_CHANGE, command));
    } else {
        builder.setCommand((ICommand) command);
    }
    return builder.build();
}
Also used : IDataModelContextProvider(org.jowidgets.cap.ui.api.model.IDataModelContextProvider) DataModelContextCommandWrapper(org.jowidgets.cap.ui.tools.command.DataModelContextCommandWrapper) IActionBuilder(org.jowidgets.api.command.IActionBuilder)

Example 10 with IActionBuilder

use of org.jowidgets.api.command.IActionBuilder in project jo-client-platform by jo-source.

the class CreatorActionBuilderImpl method buildAction.

private IAction buildAction() {
    final IBeanFormBluePrint<BEAN_TYPE> formBp = getBeanFormBp();
    Collection<IAttribute<?>> attr = attributes;
    if (attr == null && formBp != null) {
        attr = formBp.getCreateModeAttributes();
    }
    final BeanCreatorCommand<BEAN_TYPE> command = new BeanCreatorCommand<BEAN_TYPE>(beanTypeId, beanType, beanPropertyValidators, model, attr, formBp, enabledCheckers, anySelection, creatorService, parentBeanKeysProvider, getDefaultValueProvider(attr), exceptionConverter, executionInterceptors, creatorInterceptors);
    final IActionBuilder builder = getBuilder();
    if (model instanceof IDataModelContextProvider) {
        builder.setCommand(new DataModelContextCommandWrapper((IDataModelContextProvider) model, DataModelChangeType.SELECTION_CHANGE, command));
    } else {
        builder.setCommand((ICommand) command);
    }
    return builder.build();
}
Also used : IDataModelContextProvider(org.jowidgets.cap.ui.api.model.IDataModelContextProvider) IAttribute(org.jowidgets.cap.ui.api.attribute.IAttribute) DataModelContextCommandWrapper(org.jowidgets.cap.ui.tools.command.DataModelContextCommandWrapper) IActionBuilder(org.jowidgets.api.command.IActionBuilder)

Aggregations

IActionBuilder (org.jowidgets.api.command.IActionBuilder)19 ICommand (org.jowidgets.api.command.ICommand)4 IDataModelContextProvider (org.jowidgets.cap.ui.api.model.IDataModelContextProvider)3 DataModelContextCommandWrapper (org.jowidgets.cap.ui.tools.command.DataModelContextCommandWrapper)3 UnsupportedFlavorException (java.awt.datatransfer.UnsupportedFlavorException)1 BufferedImage (java.awt.image.BufferedImage)1 IOException (java.io.IOException)1 IActionBuilderFactory (org.jowidgets.api.command.IActionBuilderFactory)1 ICommandAction (org.jowidgets.api.command.ICommandAction)1 ICommandExecutor (org.jowidgets.api.command.ICommandExecutor)1 IExecutionContext (org.jowidgets.api.command.IExecutionContext)1 ICheckedItemModel (org.jowidgets.api.model.item.ICheckedItemModel)1 IToolBarModel (org.jowidgets.api.model.item.IToolBarModel)1 IAttribute (org.jowidgets.cap.ui.api.attribute.IAttribute)1 IInputListener (org.jowidgets.common.widgets.controller.IInputListener)1 IItemStateListener (org.jowidgets.common.widgets.controller.IItemStateListener)1 InputControlItemModel (org.jowidgets.tools.model.item.InputControlItemModel)1 ToolBarModel (org.jowidgets.tools.model.item.ToolBarModel)1