List of usage examples for javax.swing GroupLayout DEFAULT_SIZE
int DEFAULT_SIZE
To view the source code for javax.swing GroupLayout DEFAULT_SIZE.
Click Source Link
From source file:org.domainmath.gui.MainFrame.java
/** This method is called from within the constructor to * initialize the form./*from w w w. j av a2 s .c om*/ * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { buttonGroup1 = new javax.swing.ButtonGroup(); jToolBar1 = new javax.swing.JToolBar(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton(); jSeparator4 = new javax.swing.JToolBar.Separator(); connectButton = new javax.swing.JButton(); disconnectButton = new javax.swing.JButton(); jSeparator9 = new javax.swing.JToolBar.Separator(); jButton4 = new javax.swing.JButton(); jButton5 = new javax.swing.JButton(); jSeparator15 = new javax.swing.JToolBar.Separator(); jButton6 = new javax.swing.JButton(); jButton7 = new javax.swing.JButton(); jButton8 = new javax.swing.JButton(); jSeparator13 = new javax.swing.JToolBar.Separator(); jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); dirComboBox = new javax.swing.JComboBox(); folderUpButton = new javax.swing.JButton(); browseButton = new javax.swing.JButton(); addButton = new javax.swing.JButton(); jMenuBar1 = new javax.swing.JMenuBar(); fileMenu = new javax.swing.JMenu(); newFileItem = new javax.swing.JMenuItem(); openItem = new javax.swing.JMenuItem(); jSeparator17 = new javax.swing.JPopupMenu.Separator(); saveFileItem = new javax.swing.JMenuItem(); saveAsItem = new javax.swing.JMenuItem(); savePlotItem = new javax.swing.JMenuItem(); saveAllItem = new javax.swing.JMenuItem(); jSeparator1 = new javax.swing.JPopupMenu.Separator(); printFileItem = new javax.swing.JMenuItem(); printItem = new javax.swing.JMenuItem(); jSeparator19 = new javax.swing.JPopupMenu.Separator(); preferencesItem = new javax.swing.JMenuItem(); jSeparator2 = new javax.swing.JPopupMenu.Separator(); connectItem = new javax.swing.JMenuItem(); disconnectItem = new javax.swing.JMenuItem(); jSeparator3 = new javax.swing.JPopupMenu.Separator(); exitItem = new javax.swing.JMenuItem(); editMenu = new javax.swing.JMenu(); undoItem = new javax.swing.JMenuItem(); redoItem = new javax.swing.JMenuItem(); jSeparator20 = new javax.swing.JPopupMenu.Separator(); cutItem = new javax.swing.JMenuItem(); copyItem = new javax.swing.JMenuItem(); pasteItem = new javax.swing.JMenuItem(); jSeparator21 = new javax.swing.JPopupMenu.Separator(); deleteItem = new javax.swing.JMenuItem(); selectAllItem = new javax.swing.JMenuItem(); jSeparator22 = new javax.swing.JPopupMenu.Separator(); jMenuItem2 = new javax.swing.JMenuItem(); jMenuItem3 = new javax.swing.JMenuItem(); jSeparator23 = new javax.swing.JPopupMenu.Separator(); jMenuItem4 = new javax.swing.JMenuItem(); jMenuItem5 = new javax.swing.JMenuItem(); jSeparator24 = new javax.swing.JPopupMenu.Separator(); jMenuItem6 = new javax.swing.JMenuItem(); jMenuItem1 = new javax.swing.JMenuItem(); jSeparator11 = new javax.swing.JPopupMenu.Separator(); clearOutWindowItem = new javax.swing.JMenuItem(); jMenu3 = new javax.swing.JMenu(); consoleItem = new javax.swing.JMenuItem(); historyItem = new javax.swing.JMenuItem(); filesItem = new javax.swing.JMenuItem(); workspaceItem = new javax.swing.JMenuItem(); codeEditorItem = new javax.swing.JMenuItem(); pathsItem = new javax.swing.JMenuItem(); pkgsItem = new javax.swing.JMenuItem(); arrayEditItem = new javax.swing.JMenuItem(); jMenuItem7 = new javax.swing.JMenuItem(); jMenu1 = new javax.swing.JMenu(); findItem = new javax.swing.JMenuItem(); replaceItem = new javax.swing.JMenuItem(); gotoItem = new javax.swing.JMenuItem(); jSeparator25 = new javax.swing.JPopupMenu.Separator(); googleItem = new javax.swing.JMenuItem(); wikiItem = new javax.swing.JMenuItem(); pkgMenu = new javax.swing.JMenu(); debugMenu = new javax.swing.JMenu(); runScriptItem = new javax.swing.JMenuItem(); runScriptCItem = new javax.swing.JMenuItem(); jMenuItem8 = new javax.swing.JMenuItem(); jSeparator8 = new javax.swing.JPopupMenu.Separator(); debugScriptMenuItem = new javax.swing.JMenuItem(); testScriptMenuItem = new javax.swing.JMenuItem(); toggleBreakpointItem = new javax.swing.JMenuItem(); removeToggleBreakpointItem = new javax.swing.JMenuItem(); clearAllBreakpointsItem = new javax.swing.JMenuItem(); jSeparator10 = new javax.swing.JPopupMenu.Separator(); stepItem = new javax.swing.JMenuItem(); stepInItem = new javax.swing.JMenuItem(); stepOutItem = new javax.swing.JMenuItem(); continueItem = new javax.swing.JMenuItem(); jSeparator5 = new javax.swing.JPopupMenu.Separator(); finishDebugItem = new javax.swing.JMenuItem(); toolsMenu = new javax.swing.JMenu(); fltkplotItem = new javax.swing.JMenuItem(); octaveCmdItem = new javax.swing.JMenuItem(); jMenu2 = new javax.swing.JMenu(); previousWindowItem = new javax.swing.JMenuItem(); nextWindowItem = new javax.swing.JMenuItem(); jSeparator29 = new javax.swing.JPopupMenu.Separator(); closeItem = new javax.swing.JMenuItem(); closeAllItem = new javax.swing.JMenuItem(); jSeparator18 = new javax.swing.JPopupMenu.Separator(); windowsItem = new javax.swing.JMenuItem(); helpMenu = new javax.swing.JMenu(); forumItem = new javax.swing.JMenuItem(); octaveInfoItem = new javax.swing.JMenuItem(); jSeparator12 = new javax.swing.JPopupMenu.Separator(); quickHelpItem = new javax.swing.JMenuItem(); jMenuItem9 = new javax.swing.JMenuItem(); docPkgItem = new javax.swing.JMenuItem(); referenceMenu = new javax.swing.JMenu(); referenceItem = new javax.swing.JMenuItem(); jSeparator6 = new javax.swing.JPopupMenu.Separator(); checkForUpdatesMenuItem = new javax.swing.JMenuItem(); onlineHelpItem = new javax.swing.JMenuItem(); faqItem = new javax.swing.JMenuItem(); jSeparator14 = new javax.swing.JPopupMenu.Separator(); reportBugItem = new javax.swing.JMenuItem(); feedBackItem = new javax.swing.JMenuItem(); jSeparator7 = new javax.swing.JPopupMenu.Separator(); AboutItem = new javax.swing.JMenuItem(); setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); java.util.ResourceBundle bundle = java.util.ResourceBundle .getBundle("org/domainmath/gui/resources/DomainMath_en"); // NOI18N setTitle(bundle.getString("DomainMath.title")); // NOI18N addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { formWindowClosing(evt); } public void windowOpened(java.awt.event.WindowEvent evt) { formWindowOpened(evt); } }); jToolBar1.setRollover(true); jToolBar1.setName("Standard"); // NOI18N jButton1.setIcon(new javax.swing.ImageIcon( getClass().getResource("/org/domainmath/gui/icons/size22x22/document-new.png"))); // NOI18N jButton1.setFocusable(false); jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jToolBar1.add(jButton1); jButton2.setIcon(new javax.swing.ImageIcon( getClass().getResource("/org/domainmath/gui/icons/size22x22/document-open.png"))); // NOI18N jButton2.setFocusable(false); jButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButton2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jToolBar1.add(jButton2); jButton3.setIcon(new javax.swing.ImageIcon( getClass().getResource("/org/domainmath/gui/icons/size22x22/document-save-all.png"))); // NOI18N jButton3.setFocusable(false); jButton3.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButton3.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); jToolBar1.add(jButton3); jToolBar1.add(jSeparator4); connectButton.setIcon(new javax.swing.ImageIcon( getClass().getResource("/org/domainmath/gui/icons/size22x22/connect.png"))); // NOI18N connectButton.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en") .getString("connectItem.mnemonic").charAt(0)); connectButton.setToolTipText(bundle.getString("connectItem.tooltip")); // NOI18N connectButton.setFocusable(false); connectButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); connectButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); connectButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { connectButtonActionPerformed(evt); } }); jToolBar1.add(connectButton); disconnectButton.setIcon(new javax.swing.ImageIcon( getClass().getResource("/org/domainmath/gui/icons/size22x22/disconnect.png"))); // NOI18N disconnectButton .setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en") .getString("disconnectItem.mnemonic").charAt(0)); disconnectButton.setToolTipText(bundle.getString("disconnectItem.tooltip")); // NOI18N disconnectButton.setFocusable(false); disconnectButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); disconnectButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); disconnectButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { disconnectButtonActionPerformed(evt); } }); jToolBar1.add(disconnectButton); jToolBar1.add(jSeparator9); jButton4.setIcon(new javax.swing.ImageIcon( getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-undo.png"))); // NOI18N jButton4.setFocusable(false); jButton4.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButton4.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton4ActionPerformed(evt); } }); jToolBar1.add(jButton4); jButton5.setIcon(new javax.swing.ImageIcon( getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-redo.png"))); // NOI18N jButton5.setFocusable(false); jButton5.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButton5.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButton5.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton5ActionPerformed(evt); } }); jToolBar1.add(jButton5); jToolBar1.add(jSeparator15); jButton6.setIcon(new javax.swing.ImageIcon( getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-cut.png"))); // NOI18N jButton6.setFocusable(false); jButton6.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButton6.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButton6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton6ActionPerformed(evt); } }); jToolBar1.add(jButton6); jButton7.setIcon(new javax.swing.ImageIcon( getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-copy.png"))); // NOI18N jButton7.setFocusable(false); jButton7.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButton7.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButton7.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton7ActionPerformed(evt); } }); jToolBar1.add(jButton7); jButton8.setIcon(new javax.swing.ImageIcon( getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-paste.png"))); // NOI18N jButton8.setFocusable(false); jButton8.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButton8.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButton8.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton8ActionPerformed(evt); } }); jToolBar1.add(jButton8); jToolBar1.add(jSeparator13); jLabel1.setText("Current Directory:"); dirComboBox.setEditable(true); dirComboBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { dirComboBoxItemStateChanged(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout .setHorizontalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGap(1, 1, 1).addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(dirComboBox, 0, 112, Short.MAX_VALUE).addGap(1, 1, 1))); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGap(5, 5, 5).addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel1) .addComponent(dirComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(3, 3, 3))); jToolBar1.add(jPanel1); folderUpButton.setIcon( new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/size22x22/go-up.png"))); // NOI18N folderUpButton.setToolTipText("Up"); folderUpButton.setFocusable(false); folderUpButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); folderUpButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); folderUpButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { folderUpButtonActionPerformed(evt); } }); jToolBar1.add(folderUpButton); browseButton.setIcon(new javax.swing.ImageIcon( getClass().getResource("/org/domainmath/gui/icons/size22x22/document-open.png"))); // NOI18N browseButton.setToolTipText(bundle.getString("browseButton.title")); // NOI18N browseButton.setFocusable(false); browseButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); browseButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); browseButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { browseButtonActionPerformed(evt); } }); jToolBar1.add(browseButton); addButton.setIcon(new javax.swing.ImageIcon( getClass().getResource("/org/domainmath/gui/icons/size22x22/edit-add.png"))); // NOI18N addButton.setToolTipText(bundle.getString("addButton.title")); // NOI18N addButton.setFocusable(false); addButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); addButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); addButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { addButtonActionPerformed(evt); } }); jToolBar1.add(addButton); getContentPane().add(jToolBar1, java.awt.BorderLayout.PAGE_START); fileMenu.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en") .getString("fileMenu.mnemonic").charAt(0)); fileMenu.setText(bundle.getString("fileMenu.name")); // NOI18N newFileItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK)); newFileItem.setIcon( new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/document-new.png"))); // NOI18N newFileItem.setText("New"); newFileItem.setToolTipText(bundle.getString("newMenuItem.tooltip")); // NOI18N newFileItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { newFileItemActionPerformed(evt); } }); fileMenu.add(newFileItem); openItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK)); openItem.setIcon( new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/document-open.png"))); // NOI18N openItem.setText("Open..."); openItem.setToolTipText("Open File"); openItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { openItemActionPerformed(evt); } }); fileMenu.add(openItem); fileMenu.add(jSeparator17); saveFileItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK)); saveFileItem.setIcon( new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/document-save.png"))); // NOI18N saveFileItem.setText("Save "); saveFileItem.setToolTipText(bundle.getString("saveMenuItem.tooltp")); // NOI18N saveFileItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveFileItemActionPerformed(evt); } }); fileMenu.add(saveFileItem); saveAsItem.setText("Save As..."); saveAsItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveAsItemActionPerformed(evt); } }); fileMenu.add(saveAsItem); savePlotItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en") .getString("savePlotItem.mnemonic").charAt(0)); savePlotItem.setText(bundle.getString("savePlotItem.name")); // NOI18N savePlotItem.setToolTipText(bundle.getString("savePlotItem.tooltip")); // NOI18N savePlotItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { savePlotItemActionPerformed(evt); } }); fileMenu.add(savePlotItem); saveAllItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); saveAllItem.setIcon(new javax.swing.ImageIcon( getClass().getResource("/org/domainmath/gui/icons/document-save-all.png"))); // NOI18N saveAllItem.setText(bundle.getString("saveAllMenuItem.text")); // NOI18N saveAllItem.setToolTipText(bundle.getString("saveAllMenuItem.tooltip")); // NOI18N saveAllItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveAllItemActionPerformed(evt); } }); fileMenu.add(saveAllItem); fileMenu.add(jSeparator1); printFileItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.CTRL_MASK)); printFileItem.setIcon( new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/document-print2.png"))); // NOI18N printFileItem.setText("Print"); printFileItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { printFileItemActionPerformed(evt); } }); fileMenu.add(printFileItem); printItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); printItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en") .getString("printItem.mnemonic").charAt(0)); printItem.setText(bundle.getString("printItem.name")); // NOI18N printItem.setToolTipText(bundle.getString("printItem.tooltip")); // NOI18N printItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { printItemActionPerformed(evt); } }); fileMenu.add(printItem); fileMenu.add(jSeparator19); preferencesItem.setIcon( new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/preferences.png"))); // NOI18N preferencesItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en") .getString("preferecesItem.mnemonic").charAt(0)); preferencesItem.setText(bundle.getString("preferencesItem.name")); // NOI18N preferencesItem.setToolTipText(bundle.getString("preferencesItem.tooltip")); // NOI18N preferencesItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { preferencesItemActionPerformed(evt); } }); fileMenu.add(preferencesItem); fileMenu.add(jSeparator2); connectItem.setIcon( new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/connect.png"))); // NOI18N connectItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en") .getString("connectItem.mnemonic").charAt(0)); connectItem.setText(bundle.getString("connectItem.name")); // NOI18N connectItem.setToolTipText(bundle.getString("connectItem.tooltip")); // NOI18N connectItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { connectItemActionPerformed(evt); } }); fileMenu.add(connectItem); disconnectItem.setIcon( new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/disconnect.png"))); // NOI18N disconnectItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en") .getString("disconnectItem.mnemonic").charAt(0)); disconnectItem.setText(bundle.getString("disconnectItem.name")); // NOI18N disconnectItem.setToolTipText(bundle.getString("disconnectItem.tooltip")); // NOI18N disconnectItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { disconnectItemActionPerformed(evt); } }); fileMenu.add(disconnectItem); fileMenu.add(jSeparator3); exitItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en") .getString("exitItem.mnemonic").charAt(0)); exitItem.setText(bundle.getString("exitItem.name")); // NOI18N exitItem.setToolTipText(bundle.getString("exitItem.tooltip")); // NOI18N exitItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { exitItemActionPerformed(evt); } }); fileMenu.add(exitItem); jMenuBar1.add(fileMenu); editMenu.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en") .getString("editMenu.mnemonic").charAt(0)); editMenu.setText("Edit"); undoItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Z, java.awt.event.InputEvent.CTRL_MASK)); undoItem.setIcon( new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-undo.png"))); // NOI18N undoItem.setText("Undo"); undoItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { undoItemActionPerformed(evt); } }); editMenu.add(undoItem); redoItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Y, java.awt.event.InputEvent.CTRL_MASK)); redoItem.setIcon( new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-redo.png"))); // NOI18N redoItem.setText("Redo"); redoItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { redoItemActionPerformed(evt); } }); editMenu.add(redoItem); editMenu.add(jSeparator20); cutItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK)); cutItem.setIcon( new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-cut.png"))); // NOI18N cutItem.setText("Cut"); cutItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cutItemActionPerformed(evt); } }); editMenu.add(cutItem); copyItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.CTRL_MASK)); copyItem.setIcon( new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-copy.png"))); // NOI18N copyItem.setText("Copy"); copyItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { copyItemActionPerformed(evt); } }); editMenu.add(copyItem); pasteItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_V, java.awt.event.InputEvent.CTRL_MASK)); pasteItem.setIcon( new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-paste.png"))); // NOI18N pasteItem.setText("Paste"); pasteItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { pasteItemActionPerformed(evt); } }); editMenu.add(pasteItem); editMenu.add(jSeparator21); deleteItem.setIcon( new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-delete.png"))); // NOI18N deleteItem.setText("Delete"); deleteItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { deleteItemActionPerformed(evt); } }); editMenu.add(deleteItem); selectAllItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.CTRL_MASK)); selectAllItem.setIcon( new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-select-all.png"))); // NOI18N selectAllItem.setText("Select All"); selectAllItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { selectAllItemActionPerformed(evt); } }); editMenu.add(selectAllItem); editMenu.add(jSeparator22); jMenuItem2.setAction(new RSyntaxTextAreaEditorKit.InsertTabAction()); jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_TAB, java.awt.event.InputEvent.CTRL_MASK)); jMenuItem2.setText("Increase Indent"); editMenu.add(jMenuItem2); jMenuItem3.setAction(new RSyntaxTextAreaEditorKit.DecreaseIndentAction()); jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_TAB, java.awt.event.InputEvent.SHIFT_MASK)); jMenuItem3.setText("Decrease Indent"); editMenu.add(jMenuItem3); editMenu.add(jSeparator23); jMenuItem4.setAction(new RTextAreaEditorKit.UpperSelectionCaseAction()); jMenuItem4.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U, java.awt.event.InputEvent.CTRL_MASK)); jMenuItem4.setText("Make Uppercase"); editMenu.add(jMenuItem4); jMenuItem5.setAction(new RTextAreaEditorKit.LowerSelectionCaseAction()); jMenuItem5.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); jMenuItem5.setText("Make Lowercase"); editMenu.add(jMenuItem5); editMenu.add(jSeparator24); jMenuItem6.setText("Clear All Marks..."); jMenuItem6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem6ActionPerformed(evt); } }); editMenu.add(jMenuItem6); jMenuItem1.setAction(new RSyntaxTextAreaEditorKit.ToggleCommentAction()); jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_SLASH, java.awt.event.InputEvent.CTRL_MASK)); jMenuItem1.setText("Toggle Comment"); jMenuItem1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem1ActionPerformed(evt); } }); editMenu.add(jMenuItem1); editMenu.add(jSeparator11); clearOutWindowItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W, java.awt.event.InputEvent.CTRL_MASK)); clearOutWindowItem .setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en") .getString("clearOutputWindowItem.mnemonic").charAt(0)); clearOutWindowItem.setText(bundle.getString("clearOutputWindowItem.name")); // NOI18N clearOutWindowItem.setToolTipText(bundle.getString("clearOutputWindowItem.tooltip")); // NOI18N clearOutWindowItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { clearOutWindowItemActionPerformed(evt); } }); editMenu.add(clearOutWindowItem); jMenuBar1.add(editMenu); jMenu3.setText(bundle.getString("viewMenu.title")); // NOI18N consoleItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_0, java.awt.event.InputEvent.CTRL_MASK)); consoleItem.setText(bundle.getString("consoleItem.title")); // NOI18N consoleItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { consoleItemActionPerformed(evt); } }); jMenu3.add(consoleItem); historyItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_1, java.awt.event.InputEvent.CTRL_MASK)); historyItem.setText(bundle.getString("historyItem.title")); // NOI18N historyItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { historyItemActionPerformed(evt); } }); jMenu3.add(historyItem); filesItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_2, java.awt.event.InputEvent.CTRL_MASK)); filesItem.setText(bundle.getString("filesItem.title")); // NOI18N filesItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { filesItemActionPerformed(evt); } }); jMenu3.add(filesItem); workspaceItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_3, java.awt.event.InputEvent.CTRL_MASK)); workspaceItem.setText(bundle.getString("worksaceItem.title")); // NOI18N workspaceItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { workspaceItemActionPerformed(evt); } }); jMenu3.add(workspaceItem); codeEditorItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_4, java.awt.event.InputEvent.CTRL_MASK)); codeEditorItem.setText(bundle.getString("codeEditorItem.title")); // NOI18N codeEditorItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { codeEditorItemActionPerformed(evt); } }); jMenu3.add(codeEditorItem); pathsItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_5, java.awt.event.InputEvent.CTRL_MASK)); pathsItem.setText(bundle.getString("setPathsItem.title")); // NOI18N pathsItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { pathsItemActionPerformed(evt); } }); jMenu3.add(pathsItem); pkgsItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_6, java.awt.event.InputEvent.CTRL_MASK)); pkgsItem.setText(bundle.getString("pkgsItem.title")); // NOI18N pkgsItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { pkgsItemActionPerformed(evt); } }); jMenu3.add(pkgsItem); arrayEditItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_7, java.awt.event.InputEvent.CTRL_MASK)); arrayEditItem.setText(bundle.getString("arrayEidtorItem.title")); // NOI18N arrayEditItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { arrayEditItemActionPerformed(evt); } }); jMenu3.add(arrayEditItem); jMenuItem7.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_8, java.awt.event.InputEvent.CTRL_MASK)); jMenuItem7.setText("Debugger Window"); jMenuItem7.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem7ActionPerformed(evt); } }); jMenu3.add(jMenuItem7); jMenuBar1.add(jMenu3); jMenu1.setMnemonic('S'); jMenu1.setText("Search"); findItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, java.awt.event.InputEvent.CTRL_MASK)); findItem.setIcon( new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/edit-find.png"))); // NOI18N findItem.setMnemonic('F'); findItem.setText("Find..."); findItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { findItemActionPerformed(evt); } }); jMenu1.add(findItem); replaceItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK)); replaceItem.setIcon(new javax.swing.ImageIcon( getClass().getResource("/org/domainmath/gui/icons/edit-find-replace.png"))); // NOI18N replaceItem.setText("Replace..."); replaceItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { replaceItemActionPerformed(evt); } }); jMenu1.add(replaceItem); gotoItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_G, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); gotoItem.setText("Go To..."); gotoItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { gotoItemActionPerformed(evt); } }); jMenu1.add(gotoItem); jMenu1.add(jSeparator25); googleItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_G, java.awt.event.InputEvent.CTRL_MASK)); googleItem.setText("Google Search"); googleItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { googleItemActionPerformed(evt); } }); jMenu1.add(googleItem); wikiItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); wikiItem.setText("Wikipedia Search"); wikiItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { wikiItemActionPerformed(evt); } }); jMenu1.add(wikiItem); jMenuBar1.add(jMenu1); pkgMenu.setText(bundle.getString("pkgMenu.name")); // NOI18N jMenuBar1.add(pkgMenu); debugMenu.setText("Debug"); runScriptItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F6, 0)); runScriptItem .setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/Run.png"))); // NOI18N runScriptItem.setText("Run Script"); runScriptItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { runScriptItemActionPerformed(evt); } }); debugMenu.add(runScriptItem); runScriptCItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F6, java.awt.event.InputEvent.SHIFT_MASK)); runScriptCItem.setText("Run Script from Console"); runScriptCItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { runScriptCItemActionPerformed(evt); } }); debugMenu.add(runScriptCItem); jMenuItem8.setText("Edit Run Configuration"); jMenuItem8.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem8ActionPerformed(evt); } }); debugMenu.add(jMenuItem8); debugMenu.add(jSeparator8); debugScriptMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F5, java.awt.event.InputEvent.CTRL_MASK)); debugScriptMenuItem.setText("Debug Script"); debugScriptMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { debugScriptMenuItemActionPerformed(evt); } }); debugMenu.add(debugScriptMenuItem); testScriptMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_T, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); testScriptMenuItem.setText("Test Script"); testScriptMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { testScriptMenuItemActionPerformed(evt); } }); debugMenu.add(testScriptMenuItem); toggleBreakpointItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F9, 0)); toggleBreakpointItem.setIcon( new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/resources/stop.png"))); // NOI18N toggleBreakpointItem.setText("Toggle Breakpoint"); toggleBreakpointItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { toggleBreakpointItemActionPerformed(evt); } }); debugMenu.add(toggleBreakpointItem); removeToggleBreakpointItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F9, java.awt.event.InputEvent.SHIFT_MASK)); removeToggleBreakpointItem.setText("Remove Toggle Breakpoint"); removeToggleBreakpointItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { removeToggleBreakpointItemActionPerformed(evt); } }); debugMenu.add(removeToggleBreakpointItem); clearAllBreakpointsItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F9, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); clearAllBreakpointsItem.setText("Clear All Breakpoints..."); clearAllBreakpointsItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { clearAllBreakpointsItemActionPerformed(evt); } }); debugMenu.add(clearAllBreakpointsItem); debugMenu.add(jSeparator10); stepItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F10, java.awt.event.InputEvent.SHIFT_MASK)); stepItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/step.png"))); // NOI18N stepItem.setText("Step"); stepItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { stepItemActionPerformed(evt); } }); debugMenu.add(stepItem); stepInItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F11, 0)); stepInItem.setIcon( new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/step-in.png"))); // NOI18N stepInItem.setText("Step in"); stepInItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { stepInItemActionPerformed(evt); } }); debugMenu.add(stepInItem); stepOutItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F11, java.awt.event.InputEvent.SHIFT_MASK)); stepOutItem.setIcon( new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/step-out.png"))); // NOI18N stepOutItem.setText("Step out"); stepOutItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { stepOutItemActionPerformed(evt); } }); debugMenu.add(stepOutItem); continueItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F8, 0)); continueItem.setText("Continue"); continueItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { continueItemActionPerformed(evt); } }); debugMenu.add(continueItem); debugMenu.add(jSeparator5); finishDebugItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F5, java.awt.event.InputEvent.SHIFT_MASK)); finishDebugItem .setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/finish.png"))); // NOI18N finishDebugItem.setText("Finish Debugger Session"); finishDebugItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { finishDebugItemActionPerformed(evt); } }); debugMenu.add(finishDebugItem); jMenuBar1.add(debugMenu); toolsMenu.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en") .getString("ToolsMenu.mnemonic").charAt(0)); toolsMenu.setText(bundle.getString("ToolsMenu.name")); // NOI18N fltkplotItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); fltkplotItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en") .getString("fltkPlotItem.mnemonic").charAt(0)); fltkplotItem.setText(bundle.getString("fltkPlotItem.name")); // NOI18N fltkplotItem.setToolTipText(bundle.getString("fltkPlotItem.tooltip")); // NOI18N fltkplotItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { fltkplotItemActionPerformed(evt); } }); toolsMenu.add(fltkplotItem); octaveCmdItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en") .getString("octaveCmdItem.mnemonic").charAt(0)); octaveCmdItem.setText(bundle.getString("octaveCmdItem.name")); // NOI18N octaveCmdItem.setToolTipText(bundle.getString("octaveCmdItem.tooltip")); // NOI18N octaveCmdItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { octaveCmdItemActionPerformed(evt); } }); toolsMenu.add(octaveCmdItem); jMenuBar1.add(toolsMenu); jMenu2.setText(bundle.getString("windowMenu.title")); // NOI18N previousWindowItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_PAGE_DOWN, java.awt.event.InputEvent.CTRL_MASK)); previousWindowItem.setIcon( new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/go-previous.png"))); // NOI18N previousWindowItem.setText(bundle.getString("previousWindowItem.title")); // NOI18N previousWindowItem.setToolTipText(bundle.getString("previousWindowItem.tooltip")); // NOI18N previousWindowItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { previousWindowItemActionPerformed(evt); } }); jMenu2.add(previousWindowItem); nextWindowItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_PAGE_UP, java.awt.event.InputEvent.CTRL_MASK)); nextWindowItem.setIcon( new javax.swing.ImageIcon(getClass().getResource("/org/domainmath/gui/icons/go-next.png"))); // NOI18N nextWindowItem.setText(bundle.getString("nextWindowItem.title")); // NOI18N nextWindowItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { nextWindowItemActionPerformed(evt); } }); jMenu2.add(nextWindowItem); jMenu2.add(jSeparator29); closeItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W, java.awt.event.InputEvent.ALT_MASK)); closeItem.setText(bundle.getString("closeMenuItem.name")); // NOI18N closeItem.setToolTipText(bundle.getString("closeItem.tooltip")); // NOI18N closeItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { closeItemActionPerformed(evt); } }); jMenu2.add(closeItem); closeAllItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.SHIFT_MASK)); closeAllItem.setText(bundle.getString("closeAllItem.name")); // NOI18N closeAllItem.setToolTipText(bundle.getString("closeAllItem.tooltip")); // NOI18N closeAllItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { closeAllItemActionPerformed(evt); } }); jMenu2.add(closeAllItem); jMenu2.add(jSeparator18); windowsItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4, java.awt.event.InputEvent.SHIFT_MASK)); windowsItem.setText(bundle.getString("windowsItem.title")); // NOI18N windowsItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { windowsItemActionPerformed(evt); } }); jMenu2.add(windowsItem); jMenuBar1.add(jMenu2); helpMenu.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en") .getString("helpMenu.mnemonic").charAt(0)); helpMenu.setText(bundle.getString("helpMenu.name")); // NOI18N forumItem.setText("Forum"); forumItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { forumItemActionPerformed(evt); } }); helpMenu.add(forumItem); octaveInfoItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en") .getString("octInfoItem.mnemonic").charAt(0)); octaveInfoItem.setText(bundle.getString("octInfoItem.name")); // NOI18N octaveInfoItem.setToolTipText(bundle.getString("octInfoItem.tooltip")); // NOI18N octaveInfoItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { octaveInfoItemActionPerformed(evt); } }); helpMenu.add(octaveInfoItem); helpMenu.add(jSeparator12); quickHelpItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0)); quickHelpItem.setText(bundle.getString("quickHelpItem.name")); // NOI18N quickHelpItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { quickHelpItemActionPerformed(evt); } }); helpMenu.add(quickHelpItem); jMenuItem9.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, java.awt.event.InputEvent.SHIFT_MASK)); jMenuItem9.setText("Package Documentation"); jMenuItem9.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem9ActionPerformed(evt); } }); helpMenu.add(jMenuItem9); docPkgItem.setText("Package Online Documentation"); docPkgItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { docPkgItemActionPerformed(evt); } }); helpMenu.add(docPkgItem); referenceMenu.setText(bundle.getString("referencesMenu.name")); // NOI18N helpMenu.add(referenceMenu); referenceItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en") .getString("addReferencesItem.mnemonic").charAt(0)); referenceItem.setText(bundle.getString("addReferencesItem.name")); // NOI18N referenceItem.setToolTipText(bundle.getString("addReferencesItem.tooltip")); // NOI18N referenceItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { referenceItemActionPerformed(evt); } }); helpMenu.add(referenceItem); helpMenu.add(jSeparator6); checkForUpdatesMenuItem.setText(bundle.getString("checkForUpdatesMenuItem.text")); // NOI18N checkForUpdatesMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { checkForUpdatesMenuItemActionPerformed(evt); } }); helpMenu.add(checkForUpdatesMenuItem); onlineHelpItem.setText("Help and Support"); onlineHelpItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { onlineHelpItemActionPerformed(evt); } }); helpMenu.add(onlineHelpItem); faqItem.setText("Online FAQ"); faqItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { faqItemActionPerformed(evt); } }); helpMenu.add(faqItem); helpMenu.add(jSeparator14); reportBugItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en") .getString("reportBugItem.mnemonic").charAt(0)); reportBugItem.setText(bundle.getString("reportBugItem.name")); // NOI18N reportBugItem.setToolTipText(bundle.getString("reportBugItem.tooltip")); // NOI18N reportBugItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { reportBugItemActionPerformed(evt); } }); helpMenu.add(reportBugItem); feedBackItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en") .getString("yourFeedbackItem.mnemonic").charAt(0)); feedBackItem.setText(bundle.getString("yourFeedbackItem.name")); // NOI18N feedBackItem.setToolTipText(bundle.getString("yourFeedbackItem.tooltip")); // NOI18N feedBackItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { feedBackItemActionPerformed(evt); } }); helpMenu.add(feedBackItem); helpMenu.add(jSeparator7); AboutItem.setMnemonic(java.util.ResourceBundle.getBundle("org/domainmath/gui/resources/DomainMath_en") .getString("aboutItem.mnemonic").charAt(0)); AboutItem.setText(bundle.getString("aboutItem.name")); // NOI18N AboutItem.setToolTipText(bundle.getString("aboutItem.tooltip")); // NOI18N AboutItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { AboutItemActionPerformed(evt); } }); helpMenu.add(AboutItem); jMenuBar1.add(helpMenu); setJMenuBar(jMenuBar1); pack(); }
From source file:org.gitools.ui.platform.dialog.ExceptionGlassPane.java
@SuppressWarnings("unchecked") private void initComponents() { closeButton = new javax.swing.JButton(); copyButton = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); descriptionArea = new javax.swing.JTextArea(); jScrollPane2 = new javax.swing.JScrollPane(); traceArea = new javax.swing.JTextArea(); jSeparator1 = new javax.swing.JSeparator(); closeButton.setText("Close"); closeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { closeButtonActionPerformed(evt); }//from ww w .j av a2 s . c o m }); copyButton.setText("Copy"); copyButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { copyButtonActionPerformed(evt); } }); jLabel1.setText("Error"); jLabel2.setText("Trace (for developers)"); descriptionArea.setColumns(20); descriptionArea.setEditable(false); descriptionArea.setRows(2); jScrollPane1.setViewportView(descriptionArea); traceArea.setColumns(20); traceArea.setRows(5); jScrollPane2.setViewportView(traceArea); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout.createSequentialGroup() .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 451, Short.MAX_VALUE) .addGap(180, 180, 180)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 619, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout .createSequentialGroup().addComponent(copyButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 521, Short.MAX_VALUE) .addComponent(closeButton)) .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 619, Short.MAX_VALUE)) .addContainerGap()) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 619, Short.MAX_VALUE) .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 619, Short.MAX_VALUE)) .addContainerGap())))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap().addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(copyButton).addComponent(closeButton)) .addContainerGap())); //pack(); }
From source file:org.opendatakit.briefcase.ui.MainBriefcaseWindow.java
/** * Create the application./* ww w .j a v a 2 s. c om*/ */ public MainBriefcaseWindow() { frame = new JFrame(); frame.setBounds(100, 100, 680, 595); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.addWindowListener(new WindowListener() { @Override public void windowOpened(WindowEvent e) { } @Override public void windowClosing(WindowEvent e) { } @Override public void windowClosed(WindowEvent e) { } @Override public void windowIconified(WindowEvent e) { } @Override public void windowDeiconified(WindowEvent e) { } @Override public void windowActivated(WindowEvent e) { } @Override public void windowDeactivated(WindowEvent e) { } }); JLabel lblBriefcaseDirectory = new JLabel(MessageStrings.BRIEFCASE_STORAGE_LOCATION); txtBriefcaseDir = new JTextField(); txtBriefcaseDir.setFocusable(false); txtBriefcaseDir.setEditable(false); txtBriefcaseDir.setColumns(10); btnChoose = new JButton("Change..."); btnChoose.addActionListener(new FolderActionListener()); tabbedPane = new JTabbedPane(JTabbedPane.TOP); GroupLayout groupLayout = new GroupLayout(frame.getContentPane()); groupLayout.setHorizontalGroup(groupLayout.createParallelGroup(Alignment.LEADING).addGroup(groupLayout .createSequentialGroup().addContainerGap() .addGroup(groupLayout.createParallelGroup(Alignment.LEADING) .addComponent(tabbedPane, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 628, Short.MAX_VALUE) .addGroup(groupLayout.createSequentialGroup().addComponent(lblBriefcaseDirectory).addGap(18) .addComponent(txtBriefcaseDir, GroupLayout.DEFAULT_SIZE, 362, Short.MAX_VALUE) .addGap(18).addComponent(btnChoose))) .addContainerGap())); groupLayout.setVerticalGroup(groupLayout.createParallelGroup(Alignment.LEADING) .addGroup(groupLayout.createSequentialGroup().addContainerGap() .addGroup(groupLayout.createParallelGroup(Alignment.BASELINE) .addComponent(txtBriefcaseDir, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(btnChoose).addComponent(lblBriefcaseDirectory)) .addGap(33).addComponent(tabbedPane, GroupLayout.DEFAULT_SIZE, 446, Short.MAX_VALUE) .addContainerGap())); gatherPanel = new PullTransferPanel(transferTerminationFuture); tabbedPane.addTab(PullTransferPanel.TAB_NAME, null, gatherPanel, null); PullTransferPanel.TAB_POSITION = 0; uploadPanel = new PushTransferPanel(transferTerminationFuture); tabbedPane.addTab(PushTransferPanel.TAB_NAME, null, uploadPanel, null); PushTransferPanel.TAB_POSITION = 1; exportPanel = new ExportPanel(exportTerminationFuture); tabbedPane.addTab(ExportPanel.TAB_NAME, null, exportPanel, null); frame.getContentPane().setLayout(groupLayout); ExportPanel.TAB_POSITION = 2; frame.addWindowListener(this); setFullUIEnabled(false); frame.setFocusTraversalPolicy(new FocusTraversalPolicy() { @Override public Component getComponentAfter(Container arg0, Component arg1) { ArrayList<Component> componentOrdering = new ArrayList<Component>(); for (;;) { int nextPanel = PullTransferPanel.TAB_POSITION; componentOrdering.clear(); componentOrdering.add(txtBriefcaseDir); componentOrdering.add(btnChoose); componentOrdering.add(tabbedPane); int idx = tabbedPane.getSelectedIndex(); if (idx == PullTransferPanel.TAB_POSITION) { componentOrdering.addAll(gatherPanel.getTraversalOrdering()); nextPanel = PushTransferPanel.TAB_POSITION; } else if (idx == PushTransferPanel.TAB_POSITION) { componentOrdering.addAll(uploadPanel.getTraversalOrdering()); nextPanel = ExportPanel.TAB_POSITION; } else if (idx == ExportPanel.TAB_POSITION) { componentOrdering.addAll(exportPanel.getTraversalOrdering()); nextPanel = PullTransferPanel.TAB_POSITION; } componentOrdering.add(btnChoose); boolean found = false; for (int i = 0; i < componentOrdering.size() - 1; ++i) { if (found || arg1 == componentOrdering.get(i)) { found = true; Component comp = componentOrdering.get(i + 1); if (comp == tabbedPane) { return comp; } if (comp.isVisible() && comp.isEnabled() && (!(comp instanceof JTextField) || ((JTextField) comp).isEditable())) { return comp; } } } if (!found) { return componentOrdering.get(0); } tabbedPane.setSelectedIndex(nextPanel); } } @Override public Component getComponentBefore(Container arg0, Component arg1) { ArrayList<Component> componentOrdering = new ArrayList<Component>(); for (;;) { int nextPanel = PullTransferPanel.TAB_POSITION; componentOrdering.clear(); componentOrdering.add(txtBriefcaseDir); componentOrdering.add(btnChoose); componentOrdering.add(tabbedPane); int idx = tabbedPane.getSelectedIndex(); if (idx == PullTransferPanel.TAB_POSITION) { componentOrdering.addAll(gatherPanel.getTraversalOrdering()); nextPanel = ExportPanel.TAB_POSITION; } else if (idx == PushTransferPanel.TAB_POSITION) { componentOrdering.addAll(uploadPanel.getTraversalOrdering()); nextPanel = PullTransferPanel.TAB_POSITION; } else if (idx == ExportPanel.TAB_POSITION) { componentOrdering.addAll(exportPanel.getTraversalOrdering()); nextPanel = PushTransferPanel.TAB_POSITION; } componentOrdering.add(btnChoose); boolean found = false; for (int i = componentOrdering.size() - 1; i > 0; --i) { if (found || arg1 == componentOrdering.get(i)) { found = true; Component comp = componentOrdering.get(i - 1); if (comp == tabbedPane) { return comp; } if (comp.isVisible() && comp.isEnabled() && (!(comp instanceof JTextField) || ((JTextField) comp).isEditable())) { return comp; } } } if (!found) { return componentOrdering.get(componentOrdering.size() - 1); } tabbedPane.setSelectedIndex(nextPanel); } } @Override public Component getDefaultComponent(Container arg0) { return btnChoose; } @Override public Component getFirstComponent(Container arg0) { return btnChoose; } @Override public Component getLastComponent(Container arg0) { return tabbedPane; } }); }
From source file:org.opendatakit.briefcase.ui.MainFormUploaderWindow.java
/** * Initialize the contents of the frame. *//*from w w w . j av a 2 s . c o m*/ private void initialize() { frame = new JFrame(); frame.setBounds(100, 100, 680, 206); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JLabel lblFormDefinitionFile = new JLabel("Form Definition to upload:"); txtFormDefinitionFile = new JTextField(); txtFormDefinitionFile.setFocusable(false); txtFormDefinitionFile.setEditable(false); txtFormDefinitionFile.setColumns(10); btnChoose = new JButton("Choose..."); btnChoose.addActionListener(new FormDefinitionActionListener()); txtDestinationName = new JTextField(); txtDestinationName.setFocusable(false); txtDestinationName.setEditable(false); txtDestinationName.setColumns(10); btnChooseServer = new JButton("Configure..."); btnChooseServer.addActionListener(new DestinationActionListener()); lblUploading = new JLabel(""); btnDetails = new JButton("Details..."); btnDetails.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { if (fs != null) { ScrollingStatusListDialog.showDialog(MainFormUploaderWindow.this.frame, fs.getFormDefinition(), fs.getStatusHistory()); } } }); btnUploadForm = new JButton("Upload Form"); btnUploadForm.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { setActiveTransferState(true); File formDefn = new File(txtFormDefinitionFile.getText()); TransferAction.uploadForm(MainFormUploaderWindow.this.frame.getOwner(), destinationServerInfo, terminationFuture, formDefn, fs); } }); btnCancel = new JButton("Cancel"); btnCancel.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { terminationFuture.markAsCancelled(new TransferAbortEvent("Form upload cancelled by user.")); } }); btnClose = new JButton("Close"); btnClose.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { if (transferStateActive) { if (JOptionPane.YES_OPTION != JOptionPane.showOptionDialog(frame, "An upload is in progress. Are you sure you want to abort and exit?", "Confirm Stop Form Upload", JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE, null, null, null)) { return; // no-op } terminationFuture.markAsCancelled(new TransferAbortEvent("User closes window")); } frame.setVisible(false); frame.dispose(); System.exit(0); } }); JLabel lblUploadToServer = new JLabel("Upload to server:"); GroupLayout groupLayout = new GroupLayout(frame.getContentPane()); groupLayout.setHorizontalGroup(groupLayout.createSequentialGroup().addContainerGap() .addGroup(groupLayout.createParallelGroup(Alignment.LEADING).addComponent(lblFormDefinitionFile) .addComponent(lblUploadToServer).addComponent(lblUploading)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(groupLayout.createParallelGroup(Alignment.LEADING) .addComponent(txtFormDefinitionFile, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE) .addComponent(txtDestinationName, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE) .addGroup(Alignment.TRAILING, groupLayout.createSequentialGroup().addComponent(btnDetails) .addPreferredGap(ComponentPlacement.RELATED).addComponent(btnUploadForm) .addPreferredGap(ComponentPlacement.RELATED).addComponent(btnCancel))) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(groupLayout.createParallelGroup(Alignment.TRAILING) .addGroup(groupLayout.createParallelGroup(Alignment.LEADING) .addComponent(btnChoose, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE) .addComponent(btnChooseServer, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE)) .addComponent(btnClose)) .addContainerGap()); groupLayout.setVerticalGroup(groupLayout.createParallelGroup(Alignment.LEADING) .addGroup(groupLayout.createSequentialGroup().addContainerGap() .addGroup(groupLayout.createParallelGroup(Alignment.BASELINE) .addComponent(txtFormDefinitionFile, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(lblFormDefinitionFile).addComponent(btnChoose)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup( groupLayout.createParallelGroup(Alignment.BASELINE).addComponent(lblUploadToServer) .addComponent(txtDestinationName, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(btnChooseServer)) .addPreferredGap(ComponentPlacement.UNRELATED, 10, Short.MAX_VALUE) .addGroup(groupLayout.createParallelGroup(Alignment.BASELINE).addComponent(lblUploading) .addComponent(btnDetails).addComponent(btnUploadForm).addComponent(btnCancel) .addComponent(btnClose)) .addContainerGap())); frame.getContentPane().setLayout(groupLayout); setActiveTransferState(false); }
From source file:org.panbox.desktop.common.gui.PairNewDeviceDialog.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor./*from w ww .j av a 2s . co m*/ */ // <editor-fold defaultstate="collapsed" // desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { pairingPanel = new javax.swing.JPanel(); pairingQrCodePanel = new javax.swing.JPanel(); pairingPasswordField = new javax.swing.JTextField(); pairingModeSelectionComboBox = new javax.swing.JComboBox<>(); cancelPairingButton = new javax.swing.JButton(); statusInfoLabel = new javax.swing.JLabel(); qrCode = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle(bundle.getString("client.deviceList.devicepairing.title")); setResizable(false); pairingPanel.setMaximumSize(new java.awt.Dimension(390, 330)); pairingPanel.setMinimumSize(new java.awt.Dimension(390, 330)); pairingQrCodePanel.setLayout(new java.awt.GridLayout(1, 1)); pairingQrCodePanel.add(qrCode); pairingPasswordField.setText(""); pairingPasswordField.setEditable(false); pairingModeSelectionComboBox.setModel(new javax.swing.DefaultComboBoxModel<>( new String[] { bundle.getString("client.deviceList.devicepairing.slave"), bundle.getString("client.deviceList.devicepairing.master") })); pairingModeSelectionComboBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { pairingModeSelectionComboBoxActionPerformed(evt); } }); statusInfoLabel.setText(""); javax.swing.GroupLayout pairingPanelLayout = new javax.swing.GroupLayout(pairingPanel); pairingPanel.setLayout(pairingPanelLayout); pairingPanelLayout.setHorizontalGroup(pairingPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pairingPanelLayout.createSequentialGroup().addContainerGap() .addGroup(pairingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(pairingModeSelectionComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(pairingQrCodePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(pairingPasswordField, javax.swing.GroupLayout.DEFAULT_SIZE, 354, Short.MAX_VALUE)) .addContainerGap())); pairingPanelLayout.setVerticalGroup(pairingPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pairingPanelLayout.createSequentialGroup().addContainerGap() .addComponent(pairingQrCodePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(pairingPasswordField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(pairingModeSelectionComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(331, Short.MAX_VALUE))); cancelPairingButton.setText(bundle.getString("client.cancel")); cancelPairingButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelPairingButtonActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(pairingPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addComponent(statusInfoLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(cancelPairingButton))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(pairingPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(cancelPairingButton).addComponent(statusInfoLabel)) .addContainerGap())); pack(); }
From source file:org.piraso.ui.api.StackTraceFilterDialog.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor./* w w w . j a v a 2 s .c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jtable = new javax.swing.JTable(); jPanel2 = new javax.swing.JPanel(); btnAdd = new javax.swing.JButton(); btnRemove = new javax.swing.JButton(); btnEdit = new javax.swing.JButton(); btnSave = new javax.swing.JButton(); btnCancel = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jLabel1.setText(org.openide.util.NbBundle.getMessage(StackTraceFilterDialog.class, "StackTraceFilterDialog.jLabel1.text_1")); // NOI18N jtable.setModel(tableModel); jScrollPane1.setViewportView(jtable); btnAdd.setText(org.openide.util.NbBundle.getMessage(StackTraceFilterDialog.class, "StackTraceFilterDialog.btnAdd.text_1")); // NOI18N btnAdd.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnAddActionPerformed(evt); } }); btnRemove.setText(org.openide.util.NbBundle.getMessage(StackTraceFilterDialog.class, "StackTraceFilterDialog.btnRemove.text_1")); // NOI18N btnRemove.setEnabled(false); btnRemove.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnRemoveActionPerformed(evt); } }); btnEdit.setText(org.openide.util.NbBundle.getMessage(StackTraceFilterDialog.class, "StackTraceFilterDialog.btnEdit.text_1")); // NOI18N btnEdit.setEnabled(false); btnEdit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnEditActionPerformed(evt); } }); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(btnAdd, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(btnRemove, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(btnEdit, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup().add(btnAdd).add(1, 1, 1).add(btnRemove) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(btnEdit).addContainerGap())); btnSave.setText(org.openide.util.NbBundle.getMessage(StackTraceFilterDialog.class, "StackTraceFilterDialog.btnSave.text_1")); // NOI18N btnSave.setEnabled(false); btnSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSaveActionPerformed(evt); } }); btnCancel.setText(org.openide.util.NbBundle.getMessage(StackTraceFilterDialog.class, "StackTraceFilterDialog.btnCancel.text_1")); // NOI18N btnCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCancelActionPerformed(evt); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout .createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout .createSequentialGroup().add(14, 14, 14) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup().add(jLabel1).add(0, 0, Short.MAX_VALUE)) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup().addContainerGap(291, Short.MAX_VALUE).add(btnSave) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(btnCancel))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout .createSequentialGroup().addContainerGap().add(jLabel1) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 206, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED).add(layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(btnCancel).add(btnSave)) .add(12, 12, 12))); pack(); }
From source file:org.piraso.ui.api.WorkingSetDialog.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor.//from w ww . j ava 2s . c o m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jtable = new javax.swing.JTable(); jPanel2 = new javax.swing.JPanel(); btnAdd = new javax.swing.JButton(); btnRemove = new javax.swing.JButton(); btnEdit = new javax.swing.JButton(); btnSave = new javax.swing.JButton(); btnCancel = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jLabel1.setText( org.openide.util.NbBundle.getMessage(WorkingSetDialog.class, "WorkingSetDialog.jLabel1.text_1")); // NOI18N jtable.setModel(tableModel); jScrollPane1.setViewportView(jtable); btnAdd.setText( org.openide.util.NbBundle.getMessage(WorkingSetDialog.class, "WorkingSetDialog.btnAdd.text_1")); // NOI18N btnAdd.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnAddActionPerformed(evt); } }); btnRemove.setText( org.openide.util.NbBundle.getMessage(WorkingSetDialog.class, "WorkingSetDialog.btnRemove.text_1")); // NOI18N btnRemove.setEnabled(false); btnRemove.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnRemoveActionPerformed(evt); } }); btnEdit.setText( org.openide.util.NbBundle.getMessage(WorkingSetDialog.class, "WorkingSetDialog.btnEdit.text_1")); // NOI18N btnEdit.setEnabled(false); btnEdit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnEditActionPerformed(evt); } }); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(btnAdd, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(btnRemove, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(btnEdit, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup().add(btnAdd).add(1, 1, 1).add(btnRemove) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(btnEdit).addContainerGap())); btnSave.setText( org.openide.util.NbBundle.getMessage(WorkingSetDialog.class, "WorkingSetDialog.btnSave.text_1")); // NOI18N btnSave.setEnabled(false); btnSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSaveActionPerformed(evt); } }); btnCancel.setText( org.openide.util.NbBundle.getMessage(WorkingSetDialog.class, "WorkingSetDialog.btnCancel.text_1")); // NOI18N btnCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCancelActionPerformed(evt); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout .createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout .createSequentialGroup().add(14, 14, 14) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup().add(jLabel1).add(0, 0, Short.MAX_VALUE)) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup().addContainerGap(291, Short.MAX_VALUE).add(btnSave) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(btnCancel))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout .createSequentialGroup().addContainerGap().add(jLabel1) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 206, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED).add(layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(btnCancel).add(btnSave)) .add(12, 12, 12))); pack(); }
From source file:org.piraso.ui.base.ContextMonitorDialog.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor.//from w w w .j a v a 2s .c om */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { buttonGroup1 = new javax.swing.ButtonGroup(); btnClose = new javax.swing.JButton(); jSplitPane1 = new javax.swing.JSplitPane(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); lstMonitors = new javax.swing.JList(); chkWorkingSet = new javax.swing.JCheckBox(); jPanel3 = new javax.swing.JPanel(); txtName = new javax.swing.JTextField(); jPanel1 = new javax.swing.JPanel(); btnSave = new javax.swing.JButton(); btnRemove = new javax.swing.JButton(); btnClear = new javax.swing.JButton(); jtab = new javax.swing.JTabbedPane(); jLabel4 = new javax.swing.JLabel(); txtAddr = new javax.swing.JTextField(); rdoOthers = new javax.swing.JRadioButton(); jLabel3 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); rdoMyAddress = new javax.swing.JRadioButton(); cboHost = new javax.swing.JComboBox(); deleteAll = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); btnClose.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class, "ContextMonitorDialog.btnClose.text")); // NOI18N btnClose.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCloseActionPerformed(evt); } }); jSplitPane1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); jSplitPane1.setDividerLocation(300); jSplitPane1.setDividerSize(5); jLabel1.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class, "ContextMonitorDialog.jLabel1.text")); // NOI18N lstMonitors.setModel(new javax.swing.AbstractListModel() { String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" }; public int getSize() { return strings.length; } public Object getElementAt(int i) { return strings[i]; } }); jScrollPane1.setViewportView(lstMonitors); chkWorkingSet.setSelected(true); chkWorkingSet.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class, "ContextMonitorDialog.chkWorkingSet.text")); // NOI18N chkWorkingSet.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chkWorkingSetActionPerformed(evt); } }); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup().addContainerGap() .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup().add(6, 6, 6).add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE)) .add(jLabel1).add(chkWorkingSet)) .add(7, 7, 7))); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup().addContainerGap().add(jLabel1) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 520, Short.MAX_VALUE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(chkWorkingSet) .addContainerGap())); jSplitPane1.setLeftComponent(jPanel2); txtName.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class, "ContextMonitorDialog.txtName.text")); // NOI18N btnSave.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class, "ContextMonitorDialog.btnSave.text")); // NOI18N btnSave.setEnabled(false); btnSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSaveActionPerformed(evt); } }); btnRemove.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class, "ContextMonitorDialog.btnRemove.text")); // NOI18N btnRemove.setEnabled(false); btnRemove.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnRemoveActionPerformed(evt); } }); btnClear.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class, "ContextMonitorDialog.btnClear.text")); // NOI18N btnClear.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnClearActionPerformed(evt); } }); org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(btnSave, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(btnRemove, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(btnClear, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel1Layout.createSequentialGroup().add(btnSave).add(1, 1, 1).add(btnRemove) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(btnClear).addContainerGap())); jLabel4.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class, "ContextMonitorDialog.jLabel4.text")); // NOI18N txtAddr.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class, "ContextMonitorDialog.txtAddr.text")); // NOI18N txtAddr.setEnabled(false); buttonGroup1.add(rdoOthers); rdoOthers.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class, "ContextMonitorDialog.rdoOthers.text")); // NOI18N rdoOthers.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { rdoOthersActionPerformed(evt); } }); jLabel3.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class, "ContextMonitorDialog.jLabel3.text")); // NOI18N jLabel2.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class, "ContextMonitorDialog.jLabel2.text")); // NOI18N buttonGroup1.add(rdoMyAddress); rdoMyAddress.setSelected(true); rdoMyAddress.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class, "ContextMonitorDialog.rdoMyAddress.text")); // NOI18N rdoMyAddress.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { rdoMyAddressActionPerformed(evt); } }); cboHost.setEditable(true); cboHost.setModel( new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel3Layout.createSequentialGroup().add(jPanel3Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jPanel3Layout.createSequentialGroup().add(jLabel3) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED).add(rdoMyAddress) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(rdoOthers) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(txtAddr, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 223, Short.MAX_VALUE)) .add(jPanel3Layout.createSequentialGroup() .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jLabel4).add(jLabel2)) .add(18, 18, 18) .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(cboHost, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(txtName)))) .add(10, 10, 10) .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(9, 9, 9)) .add(jtab)); jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel3Layout.createSequentialGroup().add(23, 23, 23).add(jPanel3Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel3Layout.createSequentialGroup() .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel4).add(txtName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel2).add(cboHost, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(rdoMyAddress).add(rdoOthers) .add(txtAddr, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jLabel3))) .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jtab, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 448, Short.MAX_VALUE) .addContainerGap())); jSplitPane1.setRightComponent(jPanel3); deleteAll.setText(org.openide.util.NbBundle.getMessage(ContextMonitorDialog.class, "ContextMonitorDialog.deleteAll.text")); // NOI18N deleteAll.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { deleteAllActionPerformed(evt); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup().addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(jSplitPane1) .add(layout.createSequentialGroup().add(6, 6, 6).add(deleteAll) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(btnClose))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout .createSequentialGroup().addContainerGap().add(jSplitPane1) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(layout .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE).add(btnClose).add(deleteAll)) .add(8, 8, 8))); pack(); }
From source file:org.piraso.ui.base.ExportDialog.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor.//www . j av a 2 s .co m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jtable = new javax.swing.JTable(); jLabel2 = new javax.swing.JLabel(); txtTargetFile = new javax.swing.JTextField(); btnBrowse = new javax.swing.JButton(); btnExport = new javax.swing.JButton(); btnCancel = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jLabel1.setText(org.openide.util.NbBundle.getMessage(ExportDialog.class, "ExportDialog.jLabel1.text")); // NOI18N jtable.setModel(tableModel); jScrollPane1.setViewportView(jtable); jLabel2.setText(org.openide.util.NbBundle.getMessage(ExportDialog.class, "ExportDialog.jLabel2.text")); // NOI18N txtTargetFile.setEditable(false); txtTargetFile.setText( org.openide.util.NbBundle.getMessage(ExportDialog.class, "ExportDialog.txtTargetFile.text")); // NOI18N btnBrowse.setText(org.openide.util.NbBundle.getMessage(ExportDialog.class, "ExportDialog.btnBrowse.text")); // NOI18N btnBrowse.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnBrowseActionPerformed(evt); } }); btnExport.setText(org.openide.util.NbBundle.getMessage(ExportDialog.class, "ExportDialog.btnExport.text")); // NOI18N btnExport.setEnabled(false); btnExport.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnExportActionPerformed(evt); } }); btnCancel.setText(org.openide.util.NbBundle.getMessage(ExportDialog.class, "ExportDialog.btnCancel.text")); // NOI18N btnCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCancelActionPerformed(evt); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout .createSequentialGroup().add(12, 12, 12) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup().add(jLabel1).addContainerGap()) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup().add(layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup().add(jLabel2) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(txtTargetFile) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(btnBrowse)) .add(jScrollPane1)).add(12, 12, 12)))) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup().addContainerGap(392, Short.MAX_VALUE).add(btnExport) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(btnCancel) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup().add(7, 7, 7) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE).add(jLabel2) .add(txtTargetFile, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(btnBrowse)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(jLabel1) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 298, Short.MAX_VALUE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(btnCancel) .add(btnExport)) .addContainerGap())); pack(); }
From source file:org.piraso.ui.base.ImportDialog.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor.// www .j a va 2s. c o m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jtable = new javax.swing.JTable(); jLabel2 = new javax.swing.JLabel(); txtSourceFile = new javax.swing.JTextField(); btnBrowse = new javax.swing.JButton(); btnImport = new javax.swing.JButton(); btnCancel = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jLabel1.setText(org.openide.util.NbBundle.getMessage(ImportDialog.class, "ImportDialog.jLabel1.text")); // NOI18N jtable.setModel(tableModel); jScrollPane1.setViewportView(jtable); jLabel2.setText(org.openide.util.NbBundle.getMessage(ImportDialog.class, "ImportDialog.jLabel2.text")); // NOI18N txtSourceFile.setEditable(false); txtSourceFile.setText( org.openide.util.NbBundle.getMessage(ImportDialog.class, "ImportDialog.txtSourceFile.text")); // NOI18N btnBrowse.setText(org.openide.util.NbBundle.getMessage(ImportDialog.class, "ImportDialog.btnBrowse.text")); // NOI18N btnBrowse.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnBrowseActionPerformed(evt); } }); btnImport.setText(org.openide.util.NbBundle.getMessage(ImportDialog.class, "ImportDialog.btnImport.text")); // NOI18N btnImport.setEnabled(false); btnImport.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnImportActionPerformed(evt); } }); btnCancel.setText(org.openide.util.NbBundle.getMessage(ImportDialog.class, "ImportDialog.btnCancel.text")); // NOI18N btnCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCancelActionPerformed(evt); } }); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout .createSequentialGroup().add(12, 12, 12) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup().add(jLabel1).addContainerGap()) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup().add(layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup().add(jLabel2) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(txtSourceFile) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(btnBrowse)) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)) .add(12, 12, 12)))) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup().addContainerGap(369, Short.MAX_VALUE).add(btnImport) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(btnCancel) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup().add(7, 7, 7) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE).add(jLabel2) .add(txtSourceFile, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(btnBrowse)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(jLabel1) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 277, Short.MAX_VALUE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(btnCancel) .add(btnImport)) .addContainerGap())); pack(); }