Search in sources :

Example 11 with IActionBuilder

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

the class CopyActionBuilder method doBuild.

@Override
public IAction doBuild() {
    setDefaultTextIfNecessary();
    setDefaultToolTipTextIfNecessary();
    final BeanCopyCommand<BEAN_TYPE> command = new BeanCopyCommand<BEAN_TYPE>(model, transferableFactory, enabledCheckers, executableCheckers, multiSelection, beanModificationStatePolicy, beanMessageStatePolicy);
    final IActionBuilder builder = getBuilder();
    builder.setCommand((ICommand) command);
    return builder.build();
}
Also used : IActionBuilder(org.jowidgets.api.command.IActionBuilder)

Example 12 with IActionBuilder

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

the class PasteLinkActionBuilderImpl method buildAction.

private IAction buildAction() {
    setDefaultTextIfNecessary();
    final ICommand command = new PasteLinkCommand<SOURCE_BEAN_TYPE, LINK_BEAN_TYPE, LINKABLE_BEAN_TYPE>(linkCreatorService, source, sourceSelectionAutoRefresh, sourceMultiSelection, sourceModificationPolicy, sourceMessageStatePolicy, sourceExecutableCheckers, linkedModel, linkedCardinality, linkBeanTypeId, linkBeanType, linkDefaultFactory, linkableBeanTypeId, linkableBeanType, enabledCheckers, serviceBasedEnabledChecking, executionInterceptors, exceptionConverter, disposeObservable);
    final IActionBuilder builder = getBuilder();
    builder.setCommand(command);
    return builder.build();
}
Also used : ICommand(org.jowidgets.api.command.ICommand) IActionBuilder(org.jowidgets.api.command.IActionBuilder)

Example 13 with IActionBuilder

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

the class RefreshLookUpsActionBuilderImpl method doBuild.

@Override
protected IAction doBuild() {
    final ICommand command = new RefreshLookUpsCommand();
    final IActionBuilder builder = getBuilder();
    builder.setCommand(command);
    return builder.build();
}
Also used : ICommand(org.jowidgets.api.command.ICommand) IActionBuilder(org.jowidgets.api.command.IActionBuilder)

Example 14 with IActionBuilder

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

the class LinkDeleterActionBuilderImpl method buildAction.

private IAction buildAction() {
    setDefaultTextIfNecessary();
    setDefaultToolTipTextIfNecessary();
    final ICommand command = new BeanLinkDeleterCommand<SOURCE_BEAN_TYPE, LINKED_BEAN_TYPE>(deleterService, deletionConfirmDialog, source, sourceSelectionAutoRefresh, sourceMultiSelection, sourceModificationPolicy, sourceMessageStatePolicy, sourceExecutableCheckers, linkedModel, linkedMultiSelection, linkedModificationPolicy, linkedMessageStatePolicy, linkedExecutableCheckers, enabledCheckers, autoSelection, executionInterceptors, exceptionConverter);
    final IActionBuilder builder = getBuilder();
    builder.setCommand(command);
    return builder.build();
}
Also used : ICommand(org.jowidgets.api.command.ICommand) IActionBuilder(org.jowidgets.api.command.IActionBuilder)

Example 15 with IActionBuilder

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

the class PasteBeansActionBuilderImpl method doBuild.

@Override
public IAction doBuild() {
    final BeanPasteCommand<BEAN_TYPE> command = new BeanPasteCommand<BEAN_TYPE>(beanTypeId, beanType, model, disposeObservable, attributes, enabledCheckers, anySelection);
    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)

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