/** * Constructor * * @param type the variable type * @param data the JTable data. * @param variableName the name in Scilab of the variable being edited. */ private ScilabVariableEditor(String type, Object[][] data, String variableName) { super(); editorTab = new SwingScilabVariableEditor(variableName, type, data); tabPane = editorTab.getTabPane(); TextBox infobar = ScilabTextBox.createTextBox(); editorTab.addInfoBar(infobar); addTab(editorTab); map.put(variableName, tabPane.getSelectedComponent()); }
/** 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)); }