Search in sources :

Example 46 with BaseAction

use of io.jmix.ui.action.BaseAction in project jmix by jmix-framework.

the class StandardEditor method addDefaultCloseAction.

protected Action addDefaultCloseAction(Messages messages, Icons icons) {
    Action action = new BaseAction(WINDOW_CLOSE).withCaption(messages.getMessage("actions.Cancel")).withIcon(icons.get(JmixIcon.EDITOR_CANCEL));
    getWindow().addAction(action);
    return action;
}
Also used : Action(io.jmix.ui.action.Action) BaseAction(io.jmix.ui.action.BaseAction) BaseAction(io.jmix.ui.action.BaseAction)

Example 47 with BaseAction

use of io.jmix.ui.action.BaseAction in project jmix by jmix-framework.

the class StandardEditor method addDefaultEnableEditingAction.

protected Action addDefaultEnableEditingAction(Messages messages, Icons icons) {
    Action action = new BaseAction(ENABLE_EDITING).withCaption(messages.getMessage("actions.EnableEditing")).withIcon(icons.get(JmixIcon.ENABLE_EDITING));
    action.setVisible(false);
    getWindow().addAction(action);
    return action;
}
Also used : Action(io.jmix.ui.action.Action) BaseAction(io.jmix.ui.action.BaseAction) BaseAction(io.jmix.ui.action.BaseAction)

Example 48 with BaseAction

use of io.jmix.ui.action.BaseAction in project jmix by jmix-framework.

the class StandardEditor method addDefaultCommitAction.

protected Action addDefaultCommitAction(Messages messages, Icons icons) {
    Action action = new BaseAction(WINDOW_COMMIT).withCaption(messages.getMessage("actions.Save")).withIcon(icons.get(JmixIcon.EDITOR_SAVE));
    getWindow().addAction(action);
    return action;
}
Also used : Action(io.jmix.ui.action.Action) BaseAction(io.jmix.ui.action.BaseAction) BaseAction(io.jmix.ui.action.BaseAction)

Example 49 with BaseAction

use of io.jmix.ui.action.BaseAction in project jmix by jmix-framework.

the class StandardLookup method addDefaultSelectAction.

protected Action addDefaultSelectAction(Messages messages, Icons icons) {
    String commitShortcut = getApplicationContext().getBean(UiScreenProperties.class).getCommitShortcut();
    Action action = new BaseAction(LOOKUP_SELECT_ACTION_ID).withCaption(messages.getMessage("actions.Select")).withIcon(icons.get(JmixIcon.LOOKUP_OK)).withPrimary(true).withShortcut(commitShortcut);
    getWindow().addAction(action);
    return action;
}
Also used : Action(io.jmix.ui.action.Action) BaseAction(io.jmix.ui.action.BaseAction) UiScreenProperties(io.jmix.ui.UiScreenProperties) BaseAction(io.jmix.ui.action.BaseAction)

Aggregations

BaseAction (io.jmix.ui.action.BaseAction)49 Action (io.jmix.ui.action.Action)30 Autowired (org.springframework.beans.factory.annotation.Autowired)12 Icons (io.jmix.ui.icon.Icons)11 io.jmix.ui.screen (io.jmix.ui.screen)9 DialogAction (io.jmix.ui.action.DialogAction)8 Window (io.jmix.ui.component.Window)8 UiScreenProperties (io.jmix.ui.UiScreenProperties)7 io.jmix.ui.component (io.jmix.ui.component)7 JmixIcon (io.jmix.ui.icon.JmixIcon)7 GuiDevelopmentException (io.jmix.ui.GuiDevelopmentException)6 Notifications (io.jmix.ui.Notifications)6 Component (io.jmix.ui.component.Component)6 Collection (java.util.Collection)6 Messages (io.jmix.core.Messages)5 UiComponents (io.jmix.ui.UiComponents)5 Nullable (javax.annotation.Nullable)5 Strings (com.google.common.base.Strings)4 Dialogs (io.jmix.ui.Dialogs)4 ItemTrackingAction (io.jmix.ui.action.ItemTrackingAction)4