/** Creates the menuBar */
  public void buildMenuBar() {
    menuBar = ScilabMenuBar.createMenuBar();

    fileMenu = ScilabMenu.createMenu();
    fileMenu.setText(MessagesGED.file);
    fileMenu.setMnemonic('F');
    fileMenu.add(CloseAction.createMenu());

    menuBar.add(fileMenu);
  }
Esempio n. 2
0
  /** Initialize the tab */
  private void initTab() {
    final TextBox infobar = ScilabTextBox.createTextBox();
    setWindowIcon("system-search");
    updateUI();

    CommonCallBack callback =
        new CommonCallBack(null) {
          @Override
          public void callBack() {
            ClosingOperationsManager.startClosingOperation((SwingScilabTab) SearchFile.this);
          }

          @Override
          public void actionPerformed(ActionEvent e) {
            callBack();
          }
        };

    setCallback(callback);
    MenuBar menubar = ScilabMenuBar.createMenuBar();
    Menu fileMenu = ScilabMenu.createMenu();
    fileMenu.setText(SciNotesMessages.FILE);
    fileMenu.setMnemonic('F');
    MenuItem menu = ScilabMenuItem.createMenuItem();
    menu.setCallback(callback);
    ((SwingScilabMenuItem) menu.getAsSimpleMenuItem())
        .setAccelerator(SciNotes.getActionKeys().get("scinotes-exit"));
    menu.setText(SciNotesMessages.EXIT);
    fileMenu.add(menu);
    menubar.add(fileMenu);

    addMenuBar(menubar);
    addInfoBar(infobar);

    setPreferredSize(new Dimension(650, 250));
  }
  /** Creates the menuBar */
  public void buildMenuBar() {
    menuBar = ScilabMenuBar.createMenuBar();

    fileMenu = ScilabMenu.createMenu();
    fileMenu.setText(UiDataMessages.FILE);
    fileMenu.setMnemonic('F');
    fileMenu.add(RefreshAction.createMenuItem(UiDataMessages.REFRESH));
    fileMenu.addSeparator();
    fileMenu.add(CloseAction.createMenu());

    menuBar.add(fileMenu);

    filterMenu = ScilabMenu.createMenu();
    filterMenu.setText(UiDataMessages.FILTER);
    filterMenu.setMnemonic('I');

    filterScilabVarCheckBox = ScilabVarFilteringAction.createCheckBoxMenu();
    filterScilabVarCheckBox.setChecked(true);
    filterMenu.add(filterScilabVarCheckBox);

    filterMenu.addSeparator();

    filterBooleanCheckBox = BooleanFilteringAction.createCheckBoxMenu();
    filterBooleanCheckBox.setChecked(true);
    filterMenu.add(filterBooleanCheckBox);

    filterDoubleCheckBox = DoubleFilteringAction.createCheckBoxMenu();
    filterDoubleCheckBox.setChecked(true);
    filterMenu.add(filterDoubleCheckBox);

    filterPolynomialCheckBox = PolynomialFilteringAction.createCheckBoxMenu();
    filterPolynomialCheckBox.setChecked(true);
    filterMenu.add(filterPolynomialCheckBox);

    filterFunctionLibCheckBox = FunctionLibFilteringAction.createCheckBoxMenu();
    filterMenu.add(filterFunctionLibCheckBox);

    filterStringCheckBox = StringFilteringAction.createCheckBoxMenu();
    filterStringCheckBox.setChecked(true);
    filterMenu.add(filterStringCheckBox);

    filterSparseCheckBox = SparseFilteringAction.createCheckBoxMenu();
    filterSparseCheckBox.setChecked(true);
    filterMenu.add(filterSparseCheckBox);

    filterSparseBoolCheckBox = SparseBoolFilteringAction.createCheckBoxMenu();
    filterSparseBoolCheckBox.setChecked(true);
    filterMenu.add(filterSparseBoolCheckBox);

    filterIntegerCheckBox = IntegerFilteringAction.createCheckBoxMenu();
    filterIntegerCheckBox.setChecked(true);
    filterMenu.add(filterIntegerCheckBox);

    filterGraphicHandlesCheckBox = GraphicHandlesFilteringAction.createCheckBoxMenu();
    filterGraphicHandlesCheckBox.setChecked(true);
    filterMenu.add(filterGraphicHandlesCheckBox);

    filterUncompiledFuncCheckBox = UncompiledFunctionFilteringAction.createCheckBoxMenu();
    filterMenu.add(filterUncompiledFuncCheckBox);

    filtercompiledFuncCheckBox = CompiledFunctionFilteringAction.createCheckBoxMenu();
    filterMenu.add(filtercompiledFuncCheckBox);

    filterListCheckBox = ListFilteringAction.createCheckBoxMenu();
    filterListCheckBox.setChecked(true);
    filterMenu.add(filterListCheckBox);

    filterTListCheckBox = TListFilteringAction.createCheckBoxMenu();
    filterTListCheckBox.setChecked(true);
    filterMenu.add(filterTListCheckBox);

    filterMListCheckBox = MListFilteringAction.createCheckBoxMenu();
    filterMListCheckBox.setChecked(true);
    filterMenu.add(filterMListCheckBox);

    filterPointerCheckBox = PointerFilteringAction.createCheckBoxMenu();
    filterPointerCheckBox.setChecked(true);
    filterMenu.add(filterPointerCheckBox);

    filterIntrinsicFunctionCheckBox = IntrinsicFunctionFilteringAction.createCheckBoxMenu();
    filterMenu.add(filterIntrinsicFunctionCheckBox);

    filterMatlabSparseCheckBox = MatlabSparseFilteringAction.createCheckBoxMenu();
    filterMenu.add(filterMatlabSparseCheckBox);

    filterImplicitPolynomialCheckBox = ImplicitPolynomialFilteringAction.createCheckBoxMenu();
    filterMenu.add(filterImplicitPolynomialCheckBox);

    menuBar.add(filterMenu);

    helpMenu = ScilabMenu.createMenu();
    helpMenu.setText("?");
    helpMenu.setMnemonic('?');
    helpMenu.add(HelpAction.createMenuItem(UiDataMessages.HELP));
    menuBar.add(helpMenu);
  }