Examples of ActionSet


Examples of org.jamesii.gui.application.action.ActionSet

      synchronized (this) {
        modelWindowManager = new SymbolicModelWindowManager(getWindowManager());
      }
    }

    baseActions.add(new ActionSet("model.new", "Model", new String[] {
        "org.jamesii.menu.main/org.jamesii.file/org.jamesii.new?first",
        "org.jamesii.toolbar.main/org.jamesii.new?first" }, null));

    baseActions.add(new ActionSet("model.open", "Model", new String[] {
        "org.jamesii.menu.main/org.jamesii.file/org.jamesii.open?first",
        "org.jamesii.toolbar.main/org.jamesii.open?first" }, null));

    History.addListener(new IHistoryItemListener() {
View Full Code Here

Examples of org.jamesii.gui.application.action.ActionSet

                "org.jamesii.menu.main/org.jamesii.file/org.jamesii.open/model.open?last",
                "org.jamesii.toolbar.main/org.jamesii.open/model.open?last" },
            null));

    recentlyOpenedActions
        .add(new ActionSet(
            "model.open.recent",
            "Recently opened",
            new String[] {
                "org.jamesii.menu.main/org.jamesii.file/org.jamesii.open/model.open?after=model.open.recent.seprator",
                "org.jamesii.toolbar.main/org.jamesii.open/model.open?after=model.open.recent.seprator" },
View Full Code Here

Examples of org.jamesii.gui.application.action.ActionSet

  @Override
  protected List<IAction> generateActions() {
    List<IAction> actions = new ArrayList<>();

    actions.add(new ActionSet("org.jamesii.workflow", "Workflow",
        "org.jamesii.menu.main?before=org.jamesii.help", null));
    actions.add(new AbstractAction("org.jamesii.workflow.overview",
        "Start simple M&S",
        new String[] { "org.jamesii.menu.main/org.jamesii.workflow" }, null) {
View Full Code Here

Examples of org.jamesii.gui.application.action.ActionSet

    initIconSet();

    task++;

    l.taskInfo(this, "Creating Perspectives...");
    ActionManager.registerAction(new ActionSet("org.jamesii.file", "File",
        "org.jamesii.menu.main?first", null));

    ActionManager.registerAction(new ActionIAction(new QuitAction(manager),
        "quit", new String[] { "org.jamesii.menu.main/org.jamesii.file?last" },
        null));
View Full Code Here

Examples of org.jamesii.gui.application.action.ActionSet

  @Override
  protected List<IAction> generateActions() {
    final IWindowManager windowManager = getWindowManager();

    final List<IAction> actions = new ArrayList<>();
    actions.add(new ActionSet("org.jamesii.edit", "Edit",
        "org.jamesii.menu.main?after=org.jamesii.file", null));
    actions
        .add(new AbstractAction(
            "org.jamesii.preferences",
            "Preferences...",
            new String[] { "org.jamesii.menu.main/org.jamesii.edit?after=org.jamesii.edit.additionals" },
            null) {
          @Override
          public void execute() {
            PreferencesDialog.showPreferencesDialog(windowManager);
          }
        });

    Icon newIcon = null;
    newIcon = IconManager.getIcon(IconIdentifier.NEW_SMALL, "New");

    actions.add(new ActionSet("org.jamesii.new", "New", new String[] {
        "org.jamesii.menu.main/org.jamesii.file?first",
        "org.jamesii.toolbar.main?first" }, null, null, newIcon, null));

    Icon openIcon = null;
    openIcon = IconManager.getIcon(IconIdentifier.OPEN_SMALL, "Open");

    actions.add(new ActionSet("org.jamesii.open", "Open", new String[] {
        "org.jamesii.menu.main/org.jamesii.file?after=org.jamesii.new",
        "org.jamesii.toolbar.main?after=org.jamesii.new" }, null, null,
        openIcon, null));

    Icon saveIcon = null;
    saveIcon = IconManager.getIcon(IconIdentifier.SAVE_SMALL, "Save");

    actions.add(new SaveAction("org.jamesii.save", "Save", windowManager,
        saveIcon, new String[] {
            "org.jamesii.menu.main/org.jamesii.file?after=org.jamesii.open",
            "org.jamesii.toolbar.main?after=org.jamesii.open" }, KeyStroke
            .getKeyStroke(KeyEvent.VK_S,
                Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())
            .toString(), Integer.valueOf(KeyEvent.VK_S), null));

    Icon saveAsIcon = null;
    saveAsIcon = IconManager.getIcon(IconIdentifier.SAVE_SMALL, "Save As...");
    actions
        .add(new SaveAsAction(
            "org.jamesii.saveas",
            "Save As...",
            windowManager,
            saveAsIcon,
            new String[] { "org.jamesii.menu.main/org.jamesii.file?after=org.jamesii.save" },
            null, null, null));

    actions
        .add(new SeparatorAction(
            "org.jamesii.file.additionals1",
            new String[] { "org.jamesii.menu.main/org.jamesii.file?after=org.jamesii.saveas" },
            null));

    actions.add(new SeparatorAction("org.jamesii.toolbar.edit",
        new String[] { "org.jamesii.toolbar.main?after=org.jamesii.save" },
        null));

    actions.add(new ActionIAction(new UndoAction(windowManager),
        "org.jamesii.undo", new String[] {
            "org.jamesii.toolbar.main?after=org.jamesii.toolbar.edit",
            "org.jamesii.menu.main/org.jamesii.edit?first" }, null));

    actions.add(new ActionIAction(new RedoAction(windowManager),
        "org.jamesii.redo", new String[] {
            "org.jamesii.toolbar.main?after=org.jamesii.undo",
            "org.jamesii.menu.main/org.jamesii.edit?after=org.jamesii.undo" },
        null));

    actions.add(new SeparatorAction("org.jamesii.toolbar.additionals",
        new String[] { "org.jamesii.toolbar.main?after=org.jamesii.redo" },
        null));
    actions
        .add(new SeparatorAction(
            "org.jamesii.edit.additionals",
            new String[] { "org.jamesii.menu.main/org.jamesii.edit?after=org.jamesii.redo" },
            null));

    actions.add(new ActionSet("org.jamesii.help", "Help",
        "org.jamesii.menu.main?last", null));

    actions.add(new AbstractAction("org.jamesii.showSystemInfo",
        "Show System Information",
        new String[] { "org.jamesii.menu.main/org.jamesii.help?first" }, null) {
View Full Code Here

Examples of org.jamesii.gui.application.action.ActionSet

    String[] openExpPaths =
        new String[] {
            "org.jamesii.menu.main/org.jamesii.file/org.jamesii.open",
            "org.jamesii.toolbar.main/org.jamesii.open" };
    actions.add(new ActionSet("org.jamesii.open.experiment", "Experiment",
        openExpPaths, null));

    String[] openExpSuitePaths =
        new String[] {
            "org.jamesii.menu.main/org.jamesii.file/org.jamesii.open",
            "org.jamesii.toolbar.main/org.jamesii.open" };
    actions.add(new ActionSet("org.jamesii.open.experimentsuite",
        "Experiment Suite", openExpSuitePaths, null));

    try {
      ParameterBlock paramBlock =
          FactoryParameterDialogParameter.getParameterBlock(
View Full Code Here

Examples of org.jamesii.gui.application.action.ActionSet

  @Override
  protected List<IAction> generateActions() {
    List<IAction> actions = new ArrayList<>();

    actions.add(new ActionSet("org.jamesii.laf", "Change Look and Feel",
        "org.jamesii.menu.main/org.jamesii.edit?after=org.jamesii.preferences",
        null));

    for (final LookAndFeelInfo info : LafManager.getLookAndFeels()) {
      ToggleAction action =
View Full Code Here

Examples of org.jamesii.gui.application.action.ActionSet

  protected List<IAction> generateActions() {
    List<PerspectivePreset> presets =
        PerspectivePresetManager.getAvailablePresets();

    if (presets != null) {
      actions.add(new ActionSet("org.jamesii.presets", "Perspective Presets",
          "org.jamesii.menu.main/org.jamesii.edit?last", null));
      actions.add(SeparatorAction.getSeparatorFor(
          "org.jamesii.menu.main/org.jamesii.edit?before=org.jamesii.presets",
          null));
View Full Code Here

Examples of org.jamesii.gui.application.action.ActionSet

          "Directories can't be null or an empty list!");
    }

    icon = IconManager.getIcon(IconIdentifier.FOLDER_SMALL, "Choose");

    actions.add(new ActionSet("org.jamesii.choose", null, "Choose", null, null,
        icon, this));

    for (int i = 0; i < directories.length; i++) {
      final File dir = directories[i];
      actions.add(new AbstractAction(directories[i].getName(), FileSystemView
View Full Code Here

Examples of org.jboss.seam.security.permission.PermissionMetadata.ActionSet

            List<?> permissions = createPermissionQuery(resource, null, identity).getResultList();

            if (permissions.isEmpty()) {
                if (!set) return true;

                ActionSet actionSet = metadata.createActionSet(resource.getClass(), null);
                for (String action : actions) {
                    actionSet.add(action);
                }

                Object instance = identityPermissionClass.newInstance();
                resourceProperty.setValue(instance, identifierPolicy.getIdentifier(resource));
                permissionProperty.setValue(instance, actionSet.toString());
                identityProperty.setValue(instance, resolveIdentityEntity(identity));

                lookupEntityManager().persist(instance);
                return true;
            }

            Object instance = permissions.get(0);

            ActionSet actionSet = metadata.createActionSet(resource.getClass(),
                    permissionProperty.getValue(instance).toString());

            for (String action : actions) {
                if (set) {
                    actionSet.add(action);
                } else {
                    actionSet.remove(action);
                }
            }

            if (permissions.size() > 1) {
                // Same as with roles, consolidate the records if there is more than one
                for (Object p : permissions) {
                    actionSet.addMembers(permissionProperty.getValue(p).toString());
                    if (!p.equals(instance)) {
                        lookupEntityManager().remove(p);
                    }
                }
            }

            if (!actionSet.isEmpty()) {
                permissionProperty.setValue(instance, actionSet.toString());
                lookupEntityManager().merge(instance);
            } else {
                // No actions remaining in set, so just remove the record
                lookupEntityManager().remove(instance);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.