Package jmt.framework.gui.components

Examples of jmt.framework.gui.components.JMTToolBar


  /**
   * @return the toolbar for the exact wizard. Shamelessly uses icon from the main jmt frame
   */
  protected JMTToolBar makeToolbar() {

    JMTToolBar tb = new JMTToolBar(JMTImageLoader.getImageLoader());
    tb.setFloatable(false);

    //null values add a gap between toolbar icons
    AbstractJMTAction[] actions = { FILE_NEW, FILE_OPEN, FILE_SAVE, null, ACTION_SOLVE, SWITCH_TO_SIMULATOR, ACTION_RANDOMIZE_MODEL, null, HELP,null };
    String[] htext = { "Creates a new model", "Opens a saved model", "Saves the current model", "Solves the current model",
        "Import current model to JSIMwiz to solve it with the simulator", "Randomize model data", "Show help"};
    ArrayList<AbstractButton> buttons = new ArrayList<AbstractButton>();
    buttons.addAll(tb.populateToolbar(actions));
   
    //adds the algorithm selection box
    amvaPanel = new AMVAPanel(this);
    tb.add(amvaPanel);
   
    // Adds help
    for (int i = 0; i < buttons.size(); i++) {
      AbstractButton button = buttons.get(i);
      help.addHelp(button, htext[i]);
View Full Code Here


   * @return the toolbar for the jaba wizard. Shamelessly uses icon from the
   *         main jmt frame
   */
  protected JMTToolBar makeToolbar() {

    JMTToolBar tb = new JMTToolBar(JMTImageLoader.getImageLoader());
    tb.setFloatable(false);

    // null values add a gap between toolbar icons
    AbstractJMTAction[] actions = { FILE_NEW, FILE_OPEN, FILE_SAVE, null,
        ACTION_SOLVE, SWITCH_TO_SIMULATOR, ACTION_RANDOMIZE_MODEL
        , null, HELP };
    String[] htext = {
        "Creates a new model",
        "Opens a saved model",
        "Saves the current model",
        "Solves the current model",
        "Import current model to JSIMwiz to solve it with the simulator",
        "Randomize model data", "Show help" };
    ArrayList<AbstractButton> buttons = tb.populateToolbar(actions);
    // Adds help
    for (int i = 0; i < buttons.size(); i++) {
      AbstractButton button = (AbstractButton) buttons.get(i);
      help.addHelp(button, htext[i]);
    }
View Full Code Here

      addPanel(panel);
    }
  }

  private JMTToolBar createToolBar() {
    JMTToolBar toolbar = new JMTToolBar(JMTImageLoader.getImageLoader());
    AbstractJMTAction[] items = new AbstractJMTAction[] { FILE_NEW, FILE_OPEN, FILE_SAVE, null, ACTION_SWITCH_JMVA, null, SIM_START, SIM_PAUSE,
        SIM_STOP, SHOW_RESULTS, null, OPTIONS_DEFAULTS, null, HELP_SHOWHELP };
    toolbar.populateToolbar(items);
    toolbar.setFloatable(false);
    return toolbar;
  }
View Full Code Here

  /**
   * Creates a toolbar to be displayed in main window.
   * @return created toolbar.
   */
  public JMTToolBar createToolbar() {
    JMTToolBar toolbar = new JMTToolBar(JMTImageLoader.getImageLoader());
    // Builds an array with all actions to be put in the toolbar
    AbstractJmodelAction[] actions = new AbstractJmodelAction[] { newModel, openModel, saveModel, null,
        // editUndo, editRedo, null,
        actionCut, actionCopy, actionPaste, null, editUserClasses, editMeasures, editSimParams, editPAParams, null, switchToExactSolver,
        null, simulate, pauseSimulation, stopSimulation, showResults, null, editDefaults, openHelp };
    toolbar.populateToolbar(actions);
    return toolbar;
  }
View Full Code Here

TOP

Related Classes of jmt.framework.gui.components.JMTToolBar

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.