Package jSimMacs.display

Examples of jSimMacs.display.JSimMenuItem


          JOptionPane.showMessageDialog(this, "Can't create file",
              "File error", JOptionPane.ERROR_MESSAGE);
        }
      }
    } else if (es instanceof JSimMenuItem) {
      JSimMenuItem item = (JSimMenuItem) es;
      Project project = item.getProject();
      try {
        JSimLogic.getInstance().loadProjectAttributes(project);
      } catch (IOException e1) {
        // TODO Auto-generated catch block
        e1.printStackTrace();
      }
      JSimRunWizard wizard = new JSimRunWizard();
      if (item.isAnalyze())
        JSimLogic.getInstance().setUpAnalyzeWizard(wizard, project);
      else {
        wizard.setMenuBar();
        JSimLogic.getInstance().setUpWizard(wizard, project);
      }
View Full Code Here


  /**
   * Add a RemoteProject to the Run and Analyze Menu
   * @param remoteProject
   */
  public void addRemoteProjectRunMenu(RemoteProject remoteProject) {
    JSimMenuItem remoteRunProjectItem = new JSimMenuItem(remoteProject);
    remoteRunProjectItem.addActionListener(this);
    JSimMenuItem remoteAnalyzeProjectItem = new JSimMenuItem(remoteProject,
        true);
    remoteAnalyzeProjectItem.addActionListener(this);
    remoteRunMenu.add(remoteRunProjectItem);
    remoteAnalyzeMenu.add(remoteAnalyzeProjectItem);

  }
View Full Code Here

  /**
   * Add a LocalProject to the Run and Analyze Menu
   * @param project
   */
  public void addLocalProjectRunMenu(Project project) {
    JSimMenuItem localRunProjectItem = new JSimMenuItem(project);
    localRunProjectItem.addActionListener(this);
    JSimMenuItem localAnalyzeProjectItem = new JSimMenuItem(project, true);
    localAnalyzeProjectItem.addActionListener(this);
    localRunMenu.add(localRunProjectItem);
    localAnalyzeMenu.add(localAnalyzeProjectItem);

  }
View Full Code Here

  /**
   * Remove RemoteProject from Run and Analyze Menu
   * @param remoteProject
   */
  public void removeRemoteProjectRunMenu(RemoteProject remoteProject) {
    JSimMenuItem item = findRemoteProjectItem(remoteProject);
    if (item != null)
      remoteRunMenu.remove(item);
    JSimMenuItem analyzeItem = findRemoteAnalyzeProjectItem(remoteProject);
    if (analyzeItem != null)
      remoteAnalyzeMenu.remove(analyzeItem);
  }
View Full Code Here

   * @return JSimMenuItem
   */
  private JSimMenuItem findRemoteProjectItem(RemoteProject remoteProject) {
    Component[] comp = remoteRunMenu.getMenuComponents();
    for (int i = 0; i < comp.length; i++) {
      JSimMenuItem menuItem = (JSimMenuItem) comp[i];
      if (menuItem.getProject() == remoteProject)
        return menuItem;
    }
    return null;
  }
View Full Code Here

   */
  private JSimMenuItem findRemoteAnalyzeProjectItem(
      RemoteProject remoteProject) {
    Component[] comp = remoteAnalyzeMenu.getMenuComponents();
    for (int i = 0; i < comp.length; i++) {
      JSimMenuItem menuItem = (JSimMenuItem) comp[i];
      if (menuItem.getProject() == remoteProject)
        return menuItem;
    }
    return null;
  }
View Full Code Here

   * @return JSimMenuItem
   */
  private JSimMenuItem findLocalProjectItem(Project project) {
    Component[] comp = localRunMenu.getMenuComponents();
    for (int i = 0; i < comp.length; i++) {
      JSimMenuItem menuItem = (JSimMenuItem) comp[i];
      if (menuItem.getProject().getName().equals(project.getName()))
        return menuItem;
    }
    return null;
  }
View Full Code Here

   * @return JSimMenuItem
   */
  private JSimMenuItem findLocalAnalyzeProjectItem(Project project) {
    Component[] comp = localAnalyzeMenu.getMenuComponents();
    for (int i = 0; i < comp.length; i++) {
      JSimMenuItem menuItem = (JSimMenuItem) comp[i];
      if (menuItem.getProject().getName().equals(project.getName()))
        return menuItem;
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of jSimMacs.display.JSimMenuItem

Copyright © 2018 www.massapicom. 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.