Examples of IWindowManager


Examples of net.sf.robocode.ui.IWindowManager

      }
    }
  }

  public void cleanup() {
    final IWindowManager windowManager = Container.getComponent(IWindowManager.class);

    if (windowManager != null) {
      windowManager.cleanup();
    }
    Container.getComponent(IBattleManager.class).cleanup();
    Container.getComponent(IHostManager.class).cleanup();
  }
View Full Code Here

Examples of net.sf.robocode.ui.IWindowManager

    Container.getComponent(IBattleManager.class).cleanup();
    Container.getComponent(IHostManager.class).cleanup();
  }

  public void initForRobocodeEngine(IBattleListener listener) {
    final IWindowManager windowManager = Container.getComponent(IWindowManager.class);

    if (windowManager != null) {
      windowManager.setSlave(true);
      windowManager.setEnableGUI(false);
    }
    Container.getComponent(IHostManager.class).initSecurity();
    if (listener != null) {
      Container.getComponent(IBattleManager.class).addListener(listener);
    }
View Full Code Here

Examples of net.sf.robocode.ui.IWindowManager

    cpuConstant = Math.max(1, (long) (1000000.0 * APPROXIMATE_CYCLES_ALLOWED * TEST_PERIOD_MILLIS / count));
  }

  private void setStatus(String message) {
    IWindowManager windowManager = Container.getComponent(IWindowManager.class);

    if (windowManager != null) {
      windowManager.setStatus(message);
    }
  }
View Full Code Here

Examples of net.sf.robocode.ui.IWindowManager

  public void refreshRobotList(final boolean withClear) {

    final Runnable runnable = new Runnable() {
      public void run() {
        final IWindowManager windowManager = Container.getComponent(IWindowManager.class);

        try {
          windowManager.setBusyPointer(true);
          repositoryManager.refresh(withClear);

          List<IRobotSpecItem> robotList = repositoryManager.getRepositoryItems(onlyShowSource,
              onlyShowWithPackage, onlyShowRobots, onlyShowDevelopment, false, ignoreTeamRobots, onlyShowInJar);

          getAvailableRobotsPanel().setRobotList(robotList);
          if (preSelectedRobots != null && preSelectedRobots.length() > 0) {
            setSelectedRobots(preSelectedRobots);
            preSelectedRobots = null;
          }
        } finally {
          windowManager.setBusyPointer(false);
        }
      }
    };

    SwingUtilities.invokeLater(runnable);
View Full Code Here

Examples of net.sf.robocode.ui.IWindowManager

    }
    return (IRobotSpecItem) repositoryItem;
  }

  private void setStatus(String message) {
    IWindowManager windowManager = Container.getComponent(IWindowManager.class);

    if (windowManager != null) {
      windowManager.setStatus(message);
    }
    if (message.length() > 0) {
      Logger.logMessage(message);
    }
  }
View Full Code Here

Examples of net.sf.robocode.ui.IWindowManager

    }
    return false;
  }

  protected static void setStatus(String message) {
    IWindowManager windowManager = net.sf.robocode.core.Container.getComponent(IWindowManager.class);
    if (windowManager != null) {
      windowManager.setStatus(message);
    }
  }
View Full Code Here

Examples of org.jamesii.gui.application.IWindowManager

    return "Default Perspective";
  }

  @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) {

      @Override
      public void execute() {
        BasicUtilities.invokeLaterOnEDT(new Runnable() {
          @Override
          public void run() {
            JavaInfo info = new JavaInfo();
            windowManager.addWindow(new SystemInfoView(info, "this system",
                Contribution.DIALOG));
          }
        });
      }

    });

    actions
        .add(new AbstractAction(
            "org.jamesii.showPlugInInfo",
            "Inspect PlugIns",
            new String[] { "org.jamesii.menu.main/org.jamesii.help?after=org.jamesii.showSystemInfo" },
            null) {

          @Override
          public void execute() {
            BasicUtilities.invokeLaterOnEDT(new Runnable() {
              @Override
              public void run() {
                windowManager.addWindow(new PlugInView(Contribution.DIALOG));
              }
            });
          }

        });

    actions
        .add(new AbstractAction(
            "org.jamesii.showLogView",
            "Show Log View",
            new String[] { "org.jamesii.menu.main/org.jamesii.help?after=org.jamesii.showPlugInInfo" },
            null) {

          @Override
          public void execute() {
            BasicUtilities.invokeLaterOnEDT(new Runnable() {
              @Override
              public void run() {
                windowManager.addWindow(LogView.getInstance());
              }
            });
          }

        });

    actions.add(new ActionIAction(new HelpAction(), "help",
        new String[] { "org.jamesii.menu.main/org.jamesii.help" }, null));

    actions
        .add(new AbstractAction(
            "org.jamesii.showBackgroundTaskManager",
            "Show Background Tasks",
            new String[] { "org.jamesii.menu.main/org.jamesii.help?after=org.jamesii.showLogView" },
            null) {

          @Override
          public void execute() {
            BasicUtilities.invokeLaterOnEDT(new Runnable() {
              @Override
              public void run() {
                windowManager.addWindow(BackgroundTaskView.getInstance());
              }
            });
          }

        });
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.