List of usage examples for javax.swing GroupLayout PREFERRED_SIZE
int PREFERRED_SIZE
To view the source code for javax.swing GroupLayout PREFERRED_SIZE.
Click Source Link
From source file:org.zaproxy.zap.extension.dynssl.DynamicSSLPanel.java
/** * Create the panel./* w w w.ja va 2s . co m*/ */ public DynamicSSLPanel(ExtensionDynSSL extension) { super(); this.extension = extension; setName(Constant.messages.getString("dynssl.options.name")); setLayout(new BorderLayout(0, 0)); final JPanel panel = new JPanel(); panel.setBorder(new EmptyBorder(2, 2, 2, 2)); add(panel); final JLabel lbl_Cert = new JLabel(Constant.messages.getString("dynssl.label.rootca")); txt_PubCert = new ZapTextArea(); txt_PubCert.setFont(FontUtils.getFont("Monospaced")); txt_PubCert.setEditable(false); txt_PubCert.getDocument().addDocumentListener(new DocumentListener() { @Override public void removeUpdate(DocumentEvent e) { checkAndEnableButtons(); } @Override public void insertUpdate(DocumentEvent e) { checkAndEnableButtons(); } @Override public void changedUpdate(DocumentEvent e) { checkAndEnableButtons(); } private void checkAndEnableButtons() { checkAndEnableViewButton(); checkAndEnableSaveButton(); } }); final JScrollPane pubCertScrollPane = new JScrollPane(txt_PubCert); final JButton bt_generate = new JButton(Constant.messages.getString("dynssl.button.generate")); bt_generate.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doGenerate(); } }); bt_generate.setIcon(new ImageIcon(DynamicSSLPanel.class.getResource("/resource/icon/16/041.png"))); bt_save = new JButton(Constant.messages.getString("menu.file.save")); checkAndEnableSaveButton(); bt_save.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doSave(); } }); bt_save.setIcon(new ImageIcon(DynamicSSLPanel.class.getResource("/resource/icon/16/096.png"))); bt_view = new JButton(Constant.messages.getString("menu.view")); checkAndEnableViewButton(); bt_view.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doView(); } }); bt_view.setIcon(new ImageIcon(DynamicSSLPanel.class.getResource("/resource/icon/16/049.png"))); final JButton bt_import = new JButton(Constant.messages.getString("dynssl.button.import")); bt_import.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doImport(); } }); bt_import.setIcon(new ImageIcon(DynamicSSLPanel.class.getResource("/resource/icon/16/047.png"))); final GroupLayout gl_panel = new GroupLayout(panel); gl_panel.setHorizontalGroup(gl_panel.createParallelGroup(Alignment.LEADING).addGroup(gl_panel .createSequentialGroup().addContainerGap() .addGroup(gl_panel.createParallelGroup(Alignment.LEADING, false).addGroup(gl_panel .createSequentialGroup() .addGroup(gl_panel.createParallelGroup(Alignment.LEADING, false) .addComponent(lbl_Cert, GroupLayout.PREFERRED_SIZE, 115, GroupLayout.PREFERRED_SIZE) .addGroup(gl_panel.createSequentialGroup() .addPreferredGap(ComponentPlacement.RELATED).addComponent(bt_generate))) .addGap(6)) .addGroup(gl_panel.createSequentialGroup().addComponent(bt_import) .addPreferredGap(ComponentPlacement.RELATED))) .addGroup(gl_panel.createParallelGroup(Alignment.LEADING) .addGroup(gl_panel.createSequentialGroup().addComponent(bt_view) .addPreferredGap(ComponentPlacement.RELATED).addComponent(bt_save)) .addComponent(pubCertScrollPane, GroupLayout.DEFAULT_SIZE, 369, Short.MAX_VALUE)) .addContainerGap())); gl_panel.setVerticalGroup(gl_panel.createParallelGroup(Alignment.LEADING).addGroup(gl_panel .createSequentialGroup().addGap(10) .addGroup(gl_panel.createParallelGroup(Alignment.BASELINE) .addGroup(gl_panel.createSequentialGroup().addComponent(lbl_Cert).addGap(10) .addComponent(bt_generate, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE) .addPreferredGap(ComponentPlacement.RELATED).addComponent(bt_import, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE)) .addComponent(pubCertScrollPane, GroupLayout.PREFERRED_SIZE, 400, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(gl_panel.createParallelGroup(Alignment.BASELINE) .addComponent(bt_save, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE) .addComponent(bt_view, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE)) .addGap(0, 29, Short.MAX_VALUE))); panel.setLayout(gl_panel); }
From source file:project5.Panels.SearchPanel.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. ja va2 s . co m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { HomePanel = new javax.swing.JPanel(); SearchPanel = new javax.swing.JPanel(); jTextField1 = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); ResultsPanel = new javax.swing.JPanel(); jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); ResultsText = new javax.swing.JLabel(); jButton2 = new javax.swing.JButton(); jScrollPane2 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); returnPanel = new project5.Panels.ReturnPanel(); setMinimumSize(new java.awt.Dimension(703, 371)); setLayout(new javax.swing.OverlayLayout(this)); HomePanel.setLayout(new java.awt.BorderLayout()); SearchPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jTextField1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField1ActionPerformed(evt); } }); jButton1.setText("Search"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); javax.swing.GroupLayout SearchPanelLayout = new javax.swing.GroupLayout(SearchPanel); SearchPanel.setLayout(SearchPanelLayout); SearchPanelLayout.setHorizontalGroup(SearchPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(SearchPanelLayout.createSequentialGroup().addContainerGap() .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 604, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButton1).addContainerGap())); SearchPanelLayout.setVerticalGroup(SearchPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(SearchPanelLayout.createSequentialGroup().addContainerGap() .addGroup(SearchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton1)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); HomePanel.add(SearchPanel, java.awt.BorderLayout.PAGE_START); jLabel1.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N jLabel1.setText("Results for: "); jButton2.setText("Borrow Selected Item"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(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().addContainerGap().addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(ResultsText, javax.swing.GroupLayout.DEFAULT_SIZE, 425, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jButton2) .addContainerGap())); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(ResultsText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jButton2).addComponent(jLabel1)) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap())); jTable1.setModel(this.table); jScrollPane2.setViewportView(jTable1); javax.swing.GroupLayout ResultsPanelLayout = new javax.swing.GroupLayout(ResultsPanel); ResultsPanel.setLayout(ResultsPanelLayout); ResultsPanelLayout.setHorizontalGroup(ResultsPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING)); ResultsPanelLayout.setVerticalGroup(ResultsPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, ResultsPanelLayout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 317, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 1, Short.MAX_VALUE))); HomePanel.add(ResultsPanel, java.awt.BorderLayout.CENTER); add(HomePanel); add(returnPanel); }
From source file:pt.ua.dicoogle.rGUI.client.windows.MainWindow.java
/** This method is called from within the constructor to * initialize the form.//w w w.j a v a 2 s.com * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jSplitPane1 = new javax.swing.JSplitPane(); jPanel8 = new javax.swing.JPanel(); jButtonServices = new javax.swing.JButton(); jButtonPreferences = new javax.swing.JButton(); jSeparator3 = new javax.swing.JSeparator(); jButtonLogs = new javax.swing.JButton(); jButtonPeers = new javax.swing.JButton(); jButtonClientPreferences = new javax.swing.JButton(); jScrollPane2 = new javax.swing.JScrollPane(); jPanel5 = new javax.swing.JPanel(); SelectAdvancedSearch = new javax.swing.JRadioButton(); SelectDefaultSearch = new javax.swing.JRadioButton(); jLabel5 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); jLabel11 = new javax.swing.JLabel(); OperatorName = new javax.swing.JTextField(); Physician = new javax.swing.JTextField(); PatientGender = new javax.swing.JComboBox(); PatientName = new javax.swing.JTextField(); InstitutionName = new javax.swing.JTextField(); jPanel3 = new javax.swing.JPanel(); ModalCR = new javax.swing.JCheckBox(); ModalMG = new javax.swing.JCheckBox(); ModalPT = new javax.swing.JCheckBox(); ModalCT = new javax.swing.JCheckBox(); ModalMR = new javax.swing.JCheckBox(); ModalRF = new javax.swing.JCheckBox(); ModalDX = new javax.swing.JCheckBox(); ModalNM = new javax.swing.JCheckBox(); ModalSC = new javax.swing.JCheckBox(); ModalES = new javax.swing.JCheckBox(); ModalOT = new javax.swing.JCheckBox(); ModalUS = new javax.swing.JCheckBox(); ModalXA = new javax.swing.JCheckBox(); jLabel14 = new javax.swing.JLabel(); ModalSelectAll = new javax.swing.JRadioButton(); ModalSelectNone = new javax.swing.JRadioButton(); jLabel19 = new javax.swing.JLabel(); jLabel20 = new javax.swing.JLabel(); PatientID = new javax.swing.JTextField(); AdvancedSearchButton = new javax.swing.JButton(); ResetFields = new javax.swing.JButton(); jPanel4 = new javax.swing.JPanel(); StudyDateRangeInitialBoundaryActivation = new javax.swing.JCheckBox(); StudyDateRangeInitialBoundary = new javax.swing.JTextField(); jLabel16 = new javax.swing.JLabel(); StudyDateRangeTerminalBoundaryActivation = new javax.swing.JCheckBox(); StudyDateRangeTerminalBoundary = new javax.swing.JTextField(); StudyDate = new javax.swing.JTextField(); jLabel13 = new javax.swing.JLabel(); jLabel15 = new javax.swing.JLabel(); jLabel12 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); ExactDate = new javax.swing.JRadioButton(); DateRange = new javax.swing.JRadioButton(); jLabel17 = new javax.swing.JLabel(); jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jTextFieldQuery = new javax.swing.JTextField(); jButtonSearch = new javax.swing.JButton(); SearchTips = new javax.swing.JButton(); jCheckBoxKeywords = new javax.swing.JCheckBox(); jButtonQueryHistory = new javax.swing.JButton(); jPanel9 = new javax.swing.JPanel(); jButtonSend = new javax.swing.JButton(); jLabelResults = new javax.swing.JLabel(); jButtonDump = new javax.swing.JButton(); jButtonDownload = new javax.swing.JButton(); jLabelTime = new javax.swing.JLabel(); jLabel22 = new javax.swing.JLabel(); jButtonView = new javax.swing.JButton(); jPanelThumbnail = new javax.swing.JPanel(); jButtonExport = new javax.swing.JButton(); jScrollPane1 = new javax.swing.JScrollPane(); jTreeResults = new javax.swing.JTree(); jPanel6 = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); jSeparator1 = new javax.swing.JSeparator(); jSeparator2 = new javax.swing.JSeparator(); jMenuBar3 = new javax.swing.JMenuBar(); jMenu9 = new javax.swing.JMenu(); jMenuItemChangePassword = new javax.swing.JMenuItem(); jMenuDirScan2 = new javax.swing.JMenuItem(); jMenuDirScanResume = new javax.swing.JMenuItem(); jMenuItemShutdown = new javax.swing.JMenuItem(); jMenuItem11 = new javax.swing.JMenuItem(); jMenuItem7 = new javax.swing.JMenuItem(); jMenu10 = new javax.swing.JMenu(); jMenuItemPreferences = new javax.swing.JMenuItem(); jMenuItemServices = new javax.swing.JMenuItem(); jMenuItem10 = new javax.swing.JMenuItem(); jMenuItemUsers = new javax.swing.JMenuItem(); jMenuItemActiveUsers = new javax.swing.JMenuItem(); jMenuTools2 = new javax.swing.JMenu(); jMenuItemDcm2jpeg2 = new javax.swing.JMenuItem(); jMenu11 = new javax.swing.JMenu(); jMenuItem1 = new javax.swing.JMenuItem(); jMenuItem2 = new javax.swing.JMenuItem(); jMenuItem3 = new javax.swing.JMenuItem(); jMenuItem4 = new javax.swing.JMenuItem(); jMenuItem5 = new javax.swing.JMenuItem(); jMenuItem6 = new javax.swing.JMenuItem(); jMenuItem8 = new javax.swing.JMenuItem(); jMenu12 = new javax.swing.JMenu(); jMenuItem9 = new javax.swing.JMenuItem(); setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); setTitle("Dicoogle PACS Archive"); setMinimumSize(new java.awt.Dimension(700, 526)); setName("MainWindow"); // NOI18N addWindowListener(new java.awt.event.WindowAdapter() { public void windowOpened(java.awt.event.WindowEvent evt) { formWindowOpened(evt); } public void windowClosing(java.awt.event.WindowEvent evt) { formWindowClosing(evt); } public void windowIconified(java.awt.event.WindowEvent evt) { formWindowIconified(evt); } public void windowDeiconified(java.awt.event.WindowEvent evt) { formWindowDeiconified(evt); } }); jSplitPane1.setDividerSize(2); jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); jSplitPane1.setMaximumSize(new java.awt.Dimension(2147483647, 100)); jSplitPane1.setPreferredSize(new java.awt.Dimension(606, 100)); jPanel8.setPreferredSize(new java.awt.Dimension(604, 80)); jButtonServices .setIcon(new javax.swing.ImageIcon(getClass().getResource("/pt/ua/dicoogle/gfx/services.gif"))); // NOI18N jButtonServices.setText("Services"); jButtonServices.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButtonServices.setMaximumSize(new java.awt.Dimension(80, 80)); jButtonServices.setMinimumSize(new java.awt.Dimension(80, 80)); jButtonServices.setPreferredSize(new java.awt.Dimension(80, 80)); jButtonServices.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButtonServices.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonServicesActionPerformed(evt); } }); jButtonPreferences .setIcon(new javax.swing.ImageIcon(getClass().getResource("/pt/ua/dicoogle/gfx/config.gif"))); // NOI18N jButtonPreferences.setText("Preferences"); jButtonPreferences.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButtonPreferences.setMaximumSize(new java.awt.Dimension(80, 80)); jButtonPreferences.setMinimumSize(new java.awt.Dimension(80, 80)); jButtonPreferences.setPreferredSize(new java.awt.Dimension(80, 80)); jButtonPreferences.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButtonPreferences.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonPreferencesActionPerformed(evt); } }); jButtonLogs.setIcon(new javax.swing.ImageIcon(getClass().getResource("/pt/ua/dicoogle/gfx/log.gif"))); // NOI18N jButtonLogs.setText("Logs"); jButtonLogs.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButtonLogs.setMaximumSize(new java.awt.Dimension(80, 80)); jButtonLogs.setMinimumSize(new java.awt.Dimension(80, 80)); jButtonLogs.setPreferredSize(new java.awt.Dimension(80, 80)); jButtonLogs.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButtonLogs.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonLogsActionPerformed(evt); } }); jButtonPeers.setIcon(new javax.swing.ImageIcon(getClass().getResource("/pt/ua/dicoogle/gfx/peers.png"))); // NOI18N jButtonPeers.setText("P2P Peers"); jButtonPeers.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButtonPeers.setMaximumSize(new java.awt.Dimension(80, 80)); jButtonPeers.setMinimumSize(new java.awt.Dimension(80, 80)); jButtonPeers.setPreferredSize(new java.awt.Dimension(80, 80)); jButtonPeers.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButtonPeers.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonPeersActionPerformed(evt); } }); jButtonClientPreferences .setIcon(new javax.swing.ImageIcon(getClass().getResource("/pt/ua/dicoogle/gfx/settings.png"))); // NOI18N jButtonClientPreferences.setText("Client Prefs"); jButtonClientPreferences.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButtonClientPreferences.setMaximumSize(new java.awt.Dimension(80, 80)); jButtonClientPreferences.setMinimumSize(new java.awt.Dimension(80, 80)); jButtonClientPreferences.setPreferredSize(new java.awt.Dimension(80, 80)); jButtonClientPreferences.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButtonClientPreferences.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonClientPreferencesActionPerformed(evt); } }); javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8); jPanel8.setLayout(jPanel8Layout); jPanel8Layout.setHorizontalGroup(jPanel8Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel8Layout.createSequentialGroup().addContainerGap() .addComponent(jButtonServices, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonPreferences, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonLogs, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonPeers, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonClientPreferences, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(102, 102, 102) .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(756, Short.MAX_VALUE))); jPanel8Layout.setVerticalGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel8Layout.createSequentialGroup().addGap(32, 32, 32).addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel8Layout.createSequentialGroup().addContainerGap().addGroup(jPanel8Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jButtonClientPreferences, 0, 0, Short.MAX_VALUE) .addComponent(jButtonPeers, 0, 0, Short.MAX_VALUE) .addComponent(jButtonLogs, 0, 0, Short.MAX_VALUE) .addComponent(jButtonPreferences, 0, 0, Short.MAX_VALUE).addComponent(jButtonServices, javax.swing.GroupLayout.PREFERRED_SIZE, 64, Short.MAX_VALUE)))); jSplitPane1.setTopComponent(jPanel8); jScrollPane2.setPreferredSize(new java.awt.Dimension(602, 602)); jPanel5.setMaximumSize(new java.awt.Dimension(1197, 100)); jPanel5.setPreferredSize(new java.awt.Dimension(1197, 100)); SelectAdvancedSearch.setText("Advanced search"); SelectAdvancedSearch.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { SelectAdvancedSearchActionPerformed(evt); } }); SelectDefaultSearch.setText("Default search"); SelectDefaultSearch.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { SelectDefaultSearchActionPerformed(evt); } }); jLabel5.setText("Search type:"); jLabel7.setText("Patient Name:"); jLabel8.setText("Patient Gender:"); jLabel9.setText("Institution Name:"); jLabel10.setText("Physician:"); jLabel11.setText("Operator Name:"); OperatorName.setText("(All operators)"); Physician.setText("(All physicians)"); PatientGender.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "All", "Male", "Female" })); PatientName.setText("(All patients)"); InstitutionName.setText("(All institutions)"); ModalCR.setText("CR"); ModalCR.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ModalCRActionPerformed(evt); } }); ModalMG.setText("MG"); ModalMG.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ModalMGActionPerformed(evt); } }); ModalPT.setText("PT"); ModalPT.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ModalPTActionPerformed(evt); } }); ModalCT.setText("CT"); ModalCT.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ModalCTActionPerformed(evt); } }); ModalMR.setText("MR"); ModalMR.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ModalMRActionPerformed(evt); } }); ModalRF.setText("RF"); ModalRF.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ModalRFActionPerformed(evt); } }); ModalDX.setText("DX"); ModalDX.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ModalDXActionPerformed(evt); } }); ModalNM.setText("NM"); ModalNM.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ModalNMActionPerformed(evt); } }); ModalSC.setText("SC"); ModalSC.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ModalSCActionPerformed(evt); } }); ModalES.setText("ES"); ModalES.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ModalESActionPerformed(evt); } }); ModalOT.setText("OT"); ModalOT.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ModalOTActionPerformed(evt); } }); ModalUS.setText("US"); ModalUS.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ModalUSActionPerformed(evt); } }); ModalXA.setText("XA"); ModalXA.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ModalXAActionPerformed(evt); } }); jLabel14.setText("Modality:"); ModalSelectAll.setText("Select all"); ModalSelectAll.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ModalSelectAllActionPerformed(evt); } }); ModalSelectNone.setText("Select none"); ModalSelectNone.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ModalSelectNoneActionPerformed(evt); } }); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup().addComponent(jLabel14) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(ModalSelectAll) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(ModalSelectNone)) .addGroup(jPanel3Layout.createSequentialGroup().addGap(6, 6, 6) .addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel3Layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(ModalDX).addComponent(ModalCT)) .addComponent(ModalCR)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(ModalMG).addComponent(ModalNM).addComponent(ModalMR)) .addGap(6, 6, 6) .addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(ModalPT).addComponent(ModalSC).addComponent(ModalRF)) .addGap(12, 12, 12) .addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(ModalUS).addComponent(ModalXA).addComponent(ModalOT)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(ModalES))) .addGap(202, 202, 202))); jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel14).addComponent(ModalSelectAll).addComponent(ModalSelectNone)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(ModalPT) .addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ModalMG).addComponent(ModalCR, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(ModalXA).addComponent(ModalES)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(ModalUS, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ModalRF).addComponent(ModalMR).addComponent(ModalCT)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(ModalOT).addComponent(ModalSC).addComponent(ModalNM) .addComponent(ModalDX)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jLabel19.setText("Note: Only what you change will modify the default query."); jLabel20.setText("Patient ID:"); PatientID.setText("(All IDs)"); AdvancedSearchButton.setText("Search"); AdvancedSearchButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { AdvancedSearchButtonActionPerformed(evt); } }); ResetFields.setText("Reset fields"); ResetFields.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ResetFieldsActionPerformed(evt); } }); StudyDateRangeInitialBoundaryActivation.setText("From:"); StudyDateRangeInitialBoundaryActivation.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { StudyDateRangeInitialBoundaryActivationActionPerformed(evt); } }); StudyDateRangeInitialBoundary.setText("(Beginning)"); jLabel16.setText("--"); StudyDateRangeTerminalBoundaryActivation.setText("To:"); StudyDateRangeTerminalBoundaryActivation.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { StudyDateRangeTerminalBoundaryActivationActionPerformed(evt); } }); StudyDateRangeTerminalBoundary.setText("(Today)"); StudyDate.setText("(All dates)"); jLabel13.setText("(yyyymmdd form)"); jLabel15.setText("Date Range:"); jLabel12.setText("Date:"); jLabel4.setText("Study Date search type:"); ExactDate.setText("Exact Date"); ExactDate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ExactDateActionPerformed(evt); } }); DateRange.setText("Date Range"); DateRange.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { DateRangeActionPerformed(evt); } }); jLabel17.setText("(yyyymmdd form)"); javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout.setHorizontalGroup(jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup().addGap(8, 8, 8) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup().addComponent(jLabel4) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(ExactDate) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(DateRange)) .addGroup( jPanel4Layout.createSequentialGroup().addComponent(jLabel12).addGap(2, 2, 2) .addComponent(StudyDate, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel13))) .addGap(71, 71, 71)) .addGroup(jPanel4Layout.createSequentialGroup().addGap(6, 6, 6).addComponent(jLabel15) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addComponent(StudyDateRangeInitialBoundary, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel16)) .addComponent(StudyDateRangeInitialBoundaryActivation)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addComponent(StudyDateRangeTerminalBoundary, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel17)) .addComponent(StudyDateRangeTerminalBoundaryActivation)) .addContainerGap())); jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ExactDate).addComponent(DateRange).addComponent(jLabel4)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(StudyDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel13).addComponent(jLabel12)) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup().addGap(10, 10, 10) .addGroup(jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(StudyDateRangeInitialBoundaryActivation) .addComponent(StudyDateRangeTerminalBoundaryActivation) .addComponent(jLabel15))) .addGroup(jPanel4Layout.createSequentialGroup().addGap(35, 35, 35) .addGroup(jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(StudyDateRangeInitialBoundary, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel16) .addComponent(StudyDateRangeTerminalBoundary, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel17)))) .addContainerGap())); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap().addGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel8).addComponent(jLabel9).addComponent(jLabel10) .addComponent(jLabel11)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(PatientID) .addComponent(PatientGender, 0, 118, Short.MAX_VALUE) .addComponent(Physician).addComponent(InstitutionName) .addComponent(PatientName).addComponent(OperatorName))) .addGroup(jPanel2Layout.createSequentialGroup().addComponent(AdvancedSearchButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(ResetFields)) .addComponent(jLabel19).addComponent(jLabel7).addComponent(jLabel20)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(352, Short.MAX_VALUE))); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup().addGap(14, 14, 14) .addGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(AdvancedSearchButton).addComponent(ResetFields)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel19).addGap(18, 18, 18) .addGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel7).addComponent(PatientName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel20).addComponent(PatientID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel8) .addComponent(PatientGender, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel9).addComponent(InstitutionName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel10).addComponent(Physician, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel11) .addComponent(OperatorName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap() .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap())); jLabel1.setText("Search Pattern :"); jLabel3.setText("Regular expressions are supported (eg: A*)."); jTextFieldQuery.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { jTextFieldQueryKeyPressed(evt); } }); jButtonSearch.setText("Search"); jButtonSearch.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonSearchActionPerformed(evt); } }); SearchTips.setText("Search Tips"); SearchTips.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { SearchTipsActionPerformed(evt); } }); jCheckBoxKeywords.setSelected(true); jCheckBoxKeywords.setText("keywords"); jButtonQueryHistory.setText("Query History"); jButtonQueryHistory.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonQueryHistoryActionPerformed(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().addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jTextFieldQuery, javax.swing.GroupLayout.PREFERRED_SIZE, 328, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(jCheckBoxKeywords)) .addGroup(jPanel1Layout.createSequentialGroup().addComponent(jButtonSearch) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(SearchTips) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonQueryHistory)) .addComponent(jLabel3)) .addContainerGap(663, Short.MAX_VALUE))); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jButtonSearch, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(SearchTips, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonQueryHistory, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(jTextFieldQuery, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jCheckBoxKeywords)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel3) .addContainerGap(37, Short.MAX_VALUE))); jButtonSend.setText("Send"); jButtonSend.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonSendActionPerformed(evt); } }); jLabelResults.setText("jLabel2"); jButtonDump.setText("Dump"); jButtonDump.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonDumpActionPerformed(evt); } }); jButtonDownload.setText("Download"); jButtonDownload.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonDownloadActionPerformed(evt); } }); jLabelTime.setText("<<results time>>"); jLabel22.setText("Time Results(ms):"); jButtonView.setText("View"); jButtonView.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonViewActionPerformed(evt); } }); javax.swing.GroupLayout jPanelThumbnailLayout = new javax.swing.GroupLayout(jPanelThumbnail); jPanelThumbnail.setLayout(jPanelThumbnailLayout); jPanelThumbnailLayout.setHorizontalGroup(jPanelThumbnailLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 67, Short.MAX_VALUE)); jPanelThumbnailLayout.setVerticalGroup(jPanelThumbnailLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 62, Short.MAX_VALUE)); jButtonExport.setText("Export"); jButtonExport.setMaximumSize(new java.awt.Dimension(82, 29)); jButtonExport.setMinimumSize(new java.awt.Dimension(82, 29)); jButtonExport.setPreferredSize(new java.awt.Dimension(82, 29)); jButtonExport.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonExportActionPerformed(evt); } }); javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9); jPanel9.setLayout(jPanel9Layout); jPanel9Layout.setHorizontalGroup(jPanel9Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup().addGap(120, 120, 120) .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jButtonExport, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 259, Short.MAX_VALUE) .addComponent(jButtonDownload, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 259, Short.MAX_VALUE) .addComponent(jButtonSend, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 259, Short.MAX_VALUE) .addComponent(jButtonView, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 259, Short.MAX_VALUE) .addComponent(jButtonDump, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 259, Short.MAX_VALUE)) .addContainerGap()) .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel9Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabelResults) .addGroup(jPanel9Layout.createSequentialGroup().addGroup(jPanel9Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel22) .addGroup(jPanel9Layout.createSequentialGroup().addGap(10, 10, 10) .addComponent(jPanelThumbnail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 129, Short.MAX_VALUE) .addComponent(jLabelTime))) .addContainerGap()))); jPanel9Layout.setVerticalGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup().addContainerGap(51, Short.MAX_VALUE) .addComponent(jButtonExport, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonDownload) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonSend) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonView).addGap(5, 5, 5).addComponent(jButtonDump).addContainerGap()) .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup( jPanel9Layout.createSequentialGroup().addContainerGap().addComponent(jLabelResults) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel9Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel22).addComponent(jLabelTime)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 21, Short.MAX_VALUE) .addComponent(jPanelThumbnail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(53, 53, 53)))); jTreeResults.setModel(null); jTreeResults.setRowHeight(15); jTreeResults.setToggleClickCount(3); jTreeResults.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jTreeResultsMouseClicked(evt); } }); jTreeResults.addTreeExpansionListener(new javax.swing.event.TreeExpansionListener() { public void treeExpanded(javax.swing.event.TreeExpansionEvent evt) { jTreeResultsTreeExpanded(evt); } public void treeCollapsed(javax.swing.event.TreeExpansionEvent evt) { } }); jTreeResults.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() { public void valueChanged(javax.swing.event.TreeSelectionEvent evt) { jTreeResultsValueChanged(evt); } }); jTreeResults.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { jTreeResultsKeyReleased(evt); } }); jScrollPane1.setViewportView(jTreeResults); jLabel2.setText("Search Range:"); javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6); jPanel6.setLayout(jPanel6Layout); jPanel6Layout.setHorizontalGroup( jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(jPanel6Layout .createSequentialGroup().addComponent(jLabel2).addContainerGap(474, Short.MAX_VALUE))); jPanel6Layout.setVerticalGroup( jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jLabel2)); jSeparator2.setMaximumSize(new java.awt.Dimension(50, 10)); javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5); jPanel5.setLayout(jPanel5Layout); jPanel5Layout.setHorizontalGroup(jPanel5Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jSeparator2, javax.swing.GroupLayout.DEFAULT_SIZE, 1279, Short.MAX_VALUE) .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 1279, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup().addComponent(jLabel5) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(SelectDefaultSearch) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(SelectAdvancedSearch).addGap(28, 28, 28).addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup() .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 833, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); jPanel5Layout.setVerticalGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup().addGroup(jPanel5Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5).addComponent(SelectDefaultSearch) .addComponent(SelectAdvancedSearch)) .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(10, 10, 10) .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(15, 15, 15) .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 196, Short.MAX_VALUE)))); jScrollPane2.setViewportView(jPanel5); jSplitPane1.setBottomComponent(jScrollPane2); jMenu9.setText("File"); jMenuItemChangePassword.setText("Change Password"); jMenuItemChangePassword.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemChangePasswordActionPerformed(evt); } }); jMenu9.add(jMenuItemChangePassword); jMenuDirScan2.setText("Scan Disk"); jMenuDirScan2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuDirScanActionPerformed(evt); } }); jMenu9.add(jMenuDirScan2); jMenuDirScanResume.setText("Scan Disk (resume)"); jMenuDirScanResume.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuDirScanResumeActionPerformed(evt); } }); jMenu9.add(jMenuDirScanResume); jMenuItemShutdown.setText("Shutdown Client&Server"); jMenuItemShutdown.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemShutdownActionPerformed(evt); } }); jMenu9.add(jMenuItemShutdown); jMenuItem11.setText("Exit Client"); jMenuItem11.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem11ActionPerformed(evt); } }); jMenu9.add(jMenuItem11); jMenuItem7.setText("Exit Client&Server"); jMenuItem7.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem7ActionPerformed(evt); } }); jMenu9.add(jMenuItem7); jMenuBar3.add(jMenu9); jMenu10.setText("Edit"); jMenuItemPreferences.setText("Preferences"); jMenuItemPreferences.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem2ActionPerformed(evt); } }); jMenu10.add(jMenuItemPreferences); jMenuItemServices.setText("Services"); jMenuItemServices.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemServicesActionPerformed(evt); } }); jMenu10.add(jMenuItemServices); jMenuItem10.setText("Logs"); jMenuItem10.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem10ActionPerformed(evt); } }); jMenu10.add(jMenuItem10); jMenuItemUsers.setText("User Accounts"); jMenuItemUsers.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemUsersActionPerformed(evt); } }); jMenu10.add(jMenuItemUsers); jMenuItemActiveUsers.setText("ActiveUsers"); jMenuItemActiveUsers.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemActiveUsersActionPerformed(evt); } }); jMenu10.add(jMenuItemActiveUsers); jMenuBar3.add(jMenu10); jMenuTools2.setText("Tools"); jMenuItemDcm2jpeg2.setText("dcm2jpeg"); jMenuItemDcm2jpeg2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemDcm2jpeg2ActionPerformed(evt); } }); jMenuTools2.add(jMenuItemDcm2jpeg2); jMenuBar3.add(jMenuTools2); jMenu11.setText("Skin"); jMenuItem1.setText("Business"); jMenuItem1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem1ActionPerformed1(evt); } }); jMenu11.add(jMenuItem1); jMenuItem2.setText("Business Blue Steel"); jMenuItem2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem2ActionPerformed1(evt); } }); jMenu11.add(jMenuItem2); jMenuItem3.setText("Business Black Steel"); jMenuItem3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem3ActionPerformed1(evt); } }); jMenu11.add(jMenuItem3); jMenuItem4.setText("Creme"); jMenuItem4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem4ActionPerformed(evt); } }); jMenu11.add(jMenuItem4); jMenuItem5.setText("Magma"); jMenuItem5.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem5ActionPerformed(evt); } }); jMenu11.add(jMenuItem5); jMenuItem6.setText("Raven"); jMenuItem6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem6ActionPerformed(evt); } }); jMenu11.add(jMenuItem6); jMenuItem8.setText("Raven Graphite Glass"); jMenuItem8.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem8ActionPerformed(evt); } }); jMenu11.add(jMenuItem8); jMenuBar3.add(jMenu11); jMenu12.setText("Help"); jMenuItem9.setText("About"); jMenuItem9.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem3ActionPerformed(evt); } }); jMenu12.add(jMenuItem9); jMenuBar3.add(jMenu12); setJMenuBar(jMenuBar3); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1287, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 825, Short.MAX_VALUE)); getAccessibleContext().setAccessibleDescription("Dicoogle PACS Archive"); pack(); }
From source file:richtercloud.document.scanner.gui.DocumentScanner.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 ww w . ja v a 2 s . c om */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { scannerLabel = new javax.swing.JLabel(); selectScannerButton = new javax.swing.JButton(); databaseDialog = new javax.swing.JDialog(); databaseConnectionURLTextField = new javax.swing.JTextField(); databaseConnectionURLLabel = new javax.swing.JLabel(); databaseUsernameTextField = new javax.swing.JTextField(); databaseUsernameLabel = new javax.swing.JLabel(); databasePasswordTextField = new javax.swing.JPasswordField(); databasePasswordLabel = new javax.swing.JLabel(); databaseCancelButton = new javax.swing.JButton(); databaseConnectButton = new javax.swing.JButton(); databaseConnectionFailureLabel = new javax.swing.JLabel(); oCRDialog = new javax.swing.JDialog(); oCRDialogEngineComboBox = new javax.swing.JComboBox<>(); oCRDialogEngineLabel = new javax.swing.JLabel(); oCRDialogSeparator = new javax.swing.JSeparator(); oCRDialogPanel = new javax.swing.JPanel(); oCRDialogCancelButton = new javax.swing.JButton(); oCRDialogSaveButton = new javax.swing.JButton(); storageCreateDialog = new javax.swing.JDialog(); storageCreateDialogNameTextField = new javax.swing.JTextField(); storageCreateDialogNameLabel = new javax.swing.JLabel(); storageCreateDialogTypeComboBox = new javax.swing.JComboBox<>(); storageCreateDialogTypeLabel = new javax.swing.JLabel(); storageCreateDialogCancelDialog = new javax.swing.JButton(); storageCreateDialogSaveButton = new javax.swing.JButton(); storageCreateDialogSeparator = new javax.swing.JSeparator(); storageCreateDialogPanel = new javax.swing.JPanel(); storageDialog = new javax.swing.JDialog(); storageLabel = new javax.swing.JLabel(); storageListScrollPane = new javax.swing.JScrollPane(); storageList = new javax.swing.JList<>(); storageDialogCancelButton = new javax.swing.JButton(); storageDialogSelectButton = new javax.swing.JButton(); storageDialogEditButton = new javax.swing.JButton(); storageDialogDeleteButton = new javax.swing.JButton(); storageDialogNewButton = new javax.swing.JButton(); statusBar = new javax.swing.JPanel(); mainPanelPanel = new javax.swing.JPanel(); mainMenuBar = new javax.swing.JMenuBar(); fileMenu = new javax.swing.JMenu(); scannerSelectionMenu = new javax.swing.JMenu(); selectScannerMenuItem = new javax.swing.JMenuItem(); knownScannersMenuItemSeparator = new javax.swing.JPopupMenu.Separator(); scanMenuItem = new javax.swing.JMenuItem(); openMenuItem = new javax.swing.JMenuItem(); editEntryMenuItem = new javax.swing.JMenuItem(); oCRMenuSeparator = new javax.swing.JPopupMenu.Separator(); oCRMenuItem = new javax.swing.JMenuItem(); databaseMenuSeparator = new javax.swing.JPopupMenu.Separator(); storageSelectionMenu = new javax.swing.JMenu(); storageSelectionMenuItem = new javax.swing.JMenuItem(); knownStoragesMenuItemSeparartor = new javax.swing.JPopupMenu.Separator(); saveMenuItem = new javax.swing.JMenuItem(); exitMenuItemSeparator = new javax.swing.JPopupMenu.Separator(); exitMenuItem = new javax.swing.JMenuItem(); helpMenu = new javax.swing.JMenu(); aboutMenuItem = new javax.swing.JMenuItem(); toolsMenu = new javax.swing.JMenu(); optionsMenuItem = new javax.swing.JMenuItem(); scannerLabel.setText("No scanner selected"); selectScannerButton.setText("Select Scanner"); selectScannerButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { selectScannerButtonActionPerformed(evt); } }); databaseDialog.setTitle( DocumentScanner.generateApplicationWindowTitle("Connect to database", APP_NAME, APP_VERSION)); databaseDialog.setModal(true); databaseDialog.addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosed(java.awt.event.WindowEvent evt) { databaseDialogWindowClosed(evt); } }); databaseConnectionURLTextField.setText(CONNECTION_URL_EXAMPLE); databaseConnectionURLTextField.setToolTipText(CONNECTION_URL_TOOLTIP_TEXT); databaseConnectionURLTextField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { databaseConnectionURLTextFieldActionPerformed(evt); } }); databaseConnectionURLLabel.setText("Connection URL"); databaseConnectionURLLabel.setToolTipText(CONNECTION_URL_TOOLTIP_TEXT); databaseUsernameTextField.setText("root"); databaseUsernameLabel.setText("Username"); databasePasswordLabel.setText("Password"); databaseCancelButton.setText("Cancel"); databaseCancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { databaseCancelButtonActionPerformed(evt); } }); databaseConnectButton.setText("Connect"); databaseConnectButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { databaseConnectButtonActionPerformed(evt); } }); databaseConnectionFailureLabel.setText(" "); javax.swing.GroupLayout databaseDialogLayout = new javax.swing.GroupLayout(databaseDialog.getContentPane()); databaseDialog.getContentPane().setLayout(databaseDialogLayout); databaseDialogLayout.setHorizontalGroup( databaseDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup( javax.swing.GroupLayout.Alignment.TRAILING, databaseDialogLayout.createSequentialGroup().addContainerGap().addGroup(databaseDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(databaseConnectionFailureLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, databaseDialogLayout.createSequentialGroup().addGroup(databaseDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(databasePasswordLabel) .addComponent(databaseConnectionURLLabel) .addComponent(databaseUsernameLabel)).addGap(18, 18, 18) .addGroup(databaseDialogLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(databasePasswordTextField, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(databaseUsernameTextField) .addComponent(databaseConnectionURLTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 435, Short.MAX_VALUE))) .addGroup(databaseDialogLayout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE) .addComponent(databaseConnectButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(databaseCancelButton))) .addContainerGap())); databaseDialogLayout.setVerticalGroup(databaseDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(databaseDialogLayout.createSequentialGroup().addContainerGap() .addGroup( databaseDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(databaseConnectionURLTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(databaseConnectionURLLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(databaseDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(databaseUsernameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(databaseUsernameLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(databaseDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(databasePasswordTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(databasePasswordLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(databaseConnectionFailureLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 151, Short.MAX_VALUE) .addGap(18, 18, 18) .addGroup( databaseDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(databaseCancelButton).addComponent(databaseConnectButton)) .addContainerGap())); oCRDialog.setTitle(DocumentScanner.generateApplicationWindowTitle("OCR setup", APP_NAME, APP_VERSION)); oCRDialog.setModal(true); oCRDialogEngineComboBox.setModel(oCREngineComboBoxModel); oCRDialogEngineComboBox.setRenderer(oCRDialogEngineComboBoxRenderer); oCRDialogEngineLabel.setText("OCR engine"); javax.swing.GroupLayout oCRDialogPanelLayout = new javax.swing.GroupLayout(oCRDialogPanel); oCRDialogPanel.setLayout(oCRDialogPanelLayout); oCRDialogPanelLayout.setHorizontalGroup(oCRDialogPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); oCRDialogPanelLayout.setVerticalGroup(oCRDialogPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 178, Short.MAX_VALUE)); oCRDialogCancelButton.setText("Cancel"); oCRDialogCancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { oCRDialogCancelButtonActionPerformed(evt); } }); oCRDialogSaveButton.setText("Save"); oCRDialogSaveButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { oCRDialogSaveButtonActionPerformed(evt); } }); javax.swing.GroupLayout oCRDialogLayout = new javax.swing.GroupLayout(oCRDialog.getContentPane()); oCRDialog.getContentPane().setLayout(oCRDialogLayout); oCRDialogLayout.setHorizontalGroup(oCRDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(oCRDialogLayout.createSequentialGroup().addContainerGap().addGroup(oCRDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(oCRDialogPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(oCRDialogSeparator) .addGroup(oCRDialogLayout.createSequentialGroup().addComponent(oCRDialogEngineLabel) .addGap(18, 18, 18).addComponent(oCRDialogEngineComboBox, 0, 277, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, oCRDialogLayout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE) .addComponent(oCRDialogSaveButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(oCRDialogCancelButton))) .addContainerGap())); oCRDialogLayout.setVerticalGroup(oCRDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(oCRDialogLayout.createSequentialGroup().addContainerGap() .addGroup(oCRDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(oCRDialogEngineComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(oCRDialogEngineLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(oCRDialogSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(oCRDialogPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(18, 18, 18) .addGroup(oCRDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(oCRDialogCancelButton).addComponent(oCRDialogSaveButton)) .addContainerGap())); storageCreateDialog .setTitle(DocumentScanner.generateApplicationWindowTitle("Create storage", APP_NAME, APP_VERSION)); storageCreateDialogNameLabel.setText("Name"); storageCreateDialogTypeComboBox.setModel(storageCreateDialogTypeComboBoxModel); storageCreateDialogTypeComboBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { storageCreateDialogTypeComboBoxActionPerformed(evt); } }); storageCreateDialogTypeLabel.setText("Type"); storageCreateDialogCancelDialog.setText("Cancel"); storageCreateDialogCancelDialog.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { storageCreateDialogCancelDialogActionPerformed(evt); } }); storageCreateDialogSaveButton.setText("Save"); storageCreateDialogSaveButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { storageCreateDialogSaveButtonActionPerformed(evt); } }); javax.swing.GroupLayout storageCreateDialogPanelLayout = new javax.swing.GroupLayout( storageCreateDialogPanel); storageCreateDialogPanel.setLayout(storageCreateDialogPanelLayout); storageCreateDialogPanelLayout.setHorizontalGroup(storageCreateDialogPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); storageCreateDialogPanelLayout.setVerticalGroup(storageCreateDialogPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 148, Short.MAX_VALUE)); javax.swing.GroupLayout storageCreateDialogLayout = new javax.swing.GroupLayout( storageCreateDialog.getContentPane()); storageCreateDialog.getContentPane().setLayout(storageCreateDialogLayout); storageCreateDialogLayout.setHorizontalGroup(storageCreateDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, storageCreateDialogLayout .createSequentialGroup().addContainerGap() .addGroup(storageCreateDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(storageCreateDialogPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(storageCreateDialogSeparator) .addGroup(storageCreateDialogLayout.createSequentialGroup() .addGroup(storageCreateDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(storageCreateDialogNameLabel) .addComponent(storageCreateDialogTypeLabel)) .addGap(18, 18, 18) .addGroup(storageCreateDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(storageCreateDialogNameTextField).addComponent( storageCreateDialogTypeComboBox, 0, 413, Short.MAX_VALUE))) .addGroup(storageCreateDialogLayout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE).addComponent(storageCreateDialogSaveButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(storageCreateDialogCancelDialog))) .addContainerGap())); storageCreateDialogLayout.setVerticalGroup( storageCreateDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(storageCreateDialogLayout.createSequentialGroup().addContainerGap() .addGroup(storageCreateDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(storageCreateDialogNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(storageCreateDialogNameLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(storageCreateDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(storageCreateDialogTypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(storageCreateDialogTypeLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(storageCreateDialogSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(storageCreateDialogPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(18, 18, 18) .addGroup(storageCreateDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(storageCreateDialogCancelDialog) .addComponent(storageCreateDialogSaveButton)) .addContainerGap())); storageDialog.setTitle( DocumentScanner.generateApplicationWindowTitle("Configure storage", APP_NAME, APP_VERSION)); storageLabel.setText("Storages"); storageList.setModel(storageListModel); storageListScrollPane.setViewportView(storageList); storageDialogCancelButton.setText("Cancel"); storageDialogCancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { storageDialogCancelButtonActionPerformed(evt); } }); storageDialogSelectButton.setText("Select"); storageDialogSelectButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { storageDialogSelectButtonActionPerformed(evt); } }); storageDialogEditButton.setText("Edit"); storageDialogDeleteButton.setText("Delete"); storageDialogNewButton.setText("New..."); storageDialogNewButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { storageDialogNewButtonActionPerformed(evt); } }); javax.swing.GroupLayout storageDialogLayout = new javax.swing.GroupLayout(storageDialog.getContentPane()); storageDialog.getContentPane().setLayout(storageDialogLayout); storageDialogLayout.setHorizontalGroup(storageDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(storageDialogLayout.createSequentialGroup().addContainerGap().addGroup(storageDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(storageDialogLayout.createSequentialGroup().addComponent(storageLabel).addGap(0, 0, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, storageDialogLayout.createSequentialGroup().addGroup(storageDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(storageListScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 381, Short.MAX_VALUE) .addGroup(storageDialogLayout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(storageDialogSelectButton))) .addGroup(storageDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, storageDialogLayout.createSequentialGroup().addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(storageDialogCancelButton)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, storageDialogLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addGroup( storageDialogLayout .createSequentialGroup() .addGap(27, 27, 27).addComponent( storageDialogEditButton)) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, storageDialogLayout.createSequentialGroup() .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(storageDialogLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent( storageDialogNewButton, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent( storageDialogDeleteButton, javax.swing.GroupLayout.Alignment.TRAILING))))))) .addContainerGap())); storageDialogLayout.setVerticalGroup(storageDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(storageDialogLayout.createSequentialGroup().addContainerGap().addComponent(storageLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(storageDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(storageDialogLayout.createSequentialGroup() .addComponent(storageListScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 249, Short.MAX_VALUE) .addGap(18, 18, 18) .addGroup(storageDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(storageDialogCancelButton) .addComponent(storageDialogSelectButton))) .addGroup(storageDialogLayout.createSequentialGroup() .addComponent(storageDialogNewButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(storageDialogEditButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(storageDialogDeleteButton).addGap(0, 0, Short.MAX_VALUE))) .addContainerGap())); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle(String.format("%s %s", APP_NAME, APP_VERSION) //generateApplicationWindowTitle not applicable ); setBounds(new java.awt.Rectangle(0, 0, 800, 600)); setPreferredSize(new java.awt.Dimension(800, 600)); javax.swing.GroupLayout statusBarLayout = new javax.swing.GroupLayout(statusBar); statusBar.setLayout(statusBarLayout); statusBarLayout.setHorizontalGroup(statusBarLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 800, Short.MAX_VALUE)); statusBarLayout.setVerticalGroup(statusBarLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 23, Short.MAX_VALUE)); mainPanelPanel.setLayout(new java.awt.BorderLayout()); fileMenu.setText("File"); scannerSelectionMenu.setText("Scanner selection"); selectScannerMenuItem.setText("Select scanner..."); selectScannerMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { selectScannerMenuItemActionPerformed(evt); } }); scannerSelectionMenu.add(selectScannerMenuItem); scannerSelectionMenu.add(knownScannersMenuItemSeparator); fileMenu.add(scannerSelectionMenu); scanMenuItem.setText("Scan"); scanMenuItem.setEnabled(false); scanMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { scanMenuItemActionPerformed(evt); } }); fileMenu.add(scanMenuItem); openMenuItem.setText("Open scan..."); openMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { openMenuItemActionPerformed(evt); } }); fileMenu.add(openMenuItem); editEntryMenuItem.setText("Edit entry..."); editEntryMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { editEntryMenuItemActionPerformed(evt); } }); fileMenu.add(editEntryMenuItem); fileMenu.add(oCRMenuSeparator); oCRMenuItem.setText("Configure OCR engines"); oCRMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { oCRMenuItemActionPerformed(evt); } }); fileMenu.add(oCRMenuItem); fileMenu.add(databaseMenuSeparator); storageSelectionMenu.setText("Storage selection"); storageSelectionMenuItem.setText("Select storage..."); storageSelectionMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { storageSelectionMenuItemActionPerformed(evt); } }); storageSelectionMenu.add(storageSelectionMenuItem); storageSelectionMenu.add(knownStoragesMenuItemSeparartor); fileMenu.add(storageSelectionMenu); saveMenuItem.setText("Save in database"); saveMenuItem.setEnabled(false); fileMenu.add(saveMenuItem); fileMenu.add(exitMenuItemSeparator); exitMenuItem.setText("Exit"); exitMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { exitMenuItemActionPerformed(evt); } }); fileMenu.add(exitMenuItem); mainMenuBar.add(fileMenu); helpMenu.setText("Help"); aboutMenuItem.setText("About..."); helpMenu.add(aboutMenuItem); mainMenuBar.add(helpMenu); toolsMenu.setText("Tools"); optionsMenuItem.setText("Options..."); optionsMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { optionsMenuItemActionPerformed(evt); } }); toolsMenu.add(optionsMenuItem); mainMenuBar.add(toolsMenu); setJMenuBar(mainMenuBar); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(statusBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(mainPanelPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(mainPanelPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(statusBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))); pack(); }
From source file:savant.view.swing.Savant.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 av a 2 s . c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { view_buttongroup = new javax.swing.ButtonGroup(); toolbar_bottom = new javax.swing.JToolBar(); label_mouseposition_title = new javax.swing.JLabel(); mousePositionLabel = new javax.swing.JLabel(); timeCaption = new javax.swing.JLabel(); label_status = new javax.swing.JLabel(); s_e_sep = new javax.swing.JToolBar.Separator(); label_memory = new javax.swing.JLabel(); panel_browser = new javax.swing.JPanel(); panel_top = new javax.swing.JPanel(); panelExtendedMiddle = new javax.swing.JPanel(); panel_main = new javax.swing.JPanel(); pluginToolbar = new javax.swing.JPanel(); menuBar_top = new javax.swing.JMenuBar(); fileMenu = new javax.swing.JMenu(); loadGenomeItem = new javax.swing.JMenuItem(); loadFromFileItem = new javax.swing.JMenuItem(); loadFromURLItem = new javax.swing.JMenuItem(); loadFromDataSourcePluginItem = new javax.swing.JMenuItem(); recentTrackMenu = new javax.swing.JMenu(); javax.swing.JPopupMenu.Separator jSeparator1 = new javax.swing.JPopupMenu.Separator(); openProjectItem = new javax.swing.JMenuItem(); recentProjectMenu = new javax.swing.JMenu(); saveProjectItem = new javax.swing.JMenuItem(); saveProjectAsItem = new javax.swing.JMenuItem(); javax.swing.JPopupMenu.Separator jSeparator2 = new javax.swing.JPopupMenu.Separator(); formatItem = new javax.swing.JMenuItem(); javax.swing.JPopupMenu.Separator jSeparator3 = new javax.swing.JPopupMenu.Separator(); exportItem = new javax.swing.JMenuItem(); jSeparator4 = 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(); javax.swing.JPopupMenu.Separator jSeparator6 = new javax.swing.JPopupMenu.Separator(); bookmarkItem = new javax.swing.JMenuItem(); deselectAllItem = new javax.swing.JMenuItem(); jSeparator7 = new javax.swing.JPopupMenu.Separator(); preferencesItem = new javax.swing.JMenuItem(); viewMenu = new javax.swing.JMenu(); panLeftItem = new javax.swing.JMenuItem(); panRightItem = new javax.swing.JMenuItem(); zoomInItem = new javax.swing.JMenuItem(); zoomOutItem = new javax.swing.JMenuItem(); toStartItem = new javax.swing.JMenuItem(); toEndItem = new javax.swing.JMenuItem(); javax.swing.JSeparator jSeparator8 = new javax.swing.JSeparator(); crosshairItem = new javax.swing.JCheckBoxMenuItem(); plumblineItem = new javax.swing.JCheckBoxMenuItem(); spotlightItem = new javax.swing.JCheckBoxMenuItem(); windowMenu = new javax.swing.JMenu(); navigationItem = new javax.swing.JCheckBoxMenuItem(); genomeItem = new javax.swing.JCheckBoxMenuItem(); rulerItem = new javax.swing.JCheckBoxMenuItem(); pluginToolbarItem = new javax.swing.JCheckBoxMenuItem(); statusBarItem = new javax.swing.JCheckBoxMenuItem(); speedAndEfficiencyItem = new javax.swing.JCheckBoxMenuItem(); javax.swing.JSeparator jSeparator9 = new javax.swing.JSeparator(); bookmarksItem = new javax.swing.JCheckBoxMenuItem(); pluginsMenu = new javax.swing.JMenu(); menuitem_pluginmanager = new javax.swing.JMenuItem(); jSeparator10 = new javax.swing.JPopupMenu.Separator(); helpMenu = new javax.swing.JMenu(); userManualItem = new javax.swing.JMenuItem(); tutorialsItem = new javax.swing.JMenuItem(); javax.swing.JMenuItem checkForUpdatesItem = new javax.swing.JMenuItem(); javax.swing.JMenuItem bugReportItem = new javax.swing.JMenuItem(); javax.swing.JMenuItem featureRequestItem = new javax.swing.JMenuItem(); javax.swing.JSeparator jSeparator11 = new javax.swing.JSeparator(); websiteItem = new javax.swing.JMenuItem(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setBackground(new java.awt.Color(204, 204, 204)); toolbar_bottom.setFloatable(false); toolbar_bottom.setAlignmentX(1.0F); label_mouseposition_title.setText(" Position: "); toolbar_bottom.add(label_mouseposition_title); toolbar_bottom.add(mousePositionLabel); timeCaption.setText("Time: "); toolbar_bottom.add(timeCaption); label_status.setMaximumSize(new java.awt.Dimension(300, 14)); label_status.setMinimumSize(new java.awt.Dimension(100, 14)); label_status.setPreferredSize(new java.awt.Dimension(100, 14)); toolbar_bottom.add(label_status); toolbar_bottom.add(s_e_sep); label_memory.setText(" Memory: "); toolbar_bottom.add(label_memory); panel_top.setMaximumSize(new java.awt.Dimension(1000, 30)); panel_top.setMinimumSize(new java.awt.Dimension(0, 0)); panel_top.setPreferredSize(new java.awt.Dimension(0, 30)); panel_top.setLayout(new java.awt.BorderLayout()); panelExtendedMiddle.setMinimumSize(new java.awt.Dimension(990, 30)); panelExtendedMiddle.setPreferredSize(new java.awt.Dimension(990, 30)); javax.swing.GroupLayout panelExtendedMiddleLayout = new javax.swing.GroupLayout(panelExtendedMiddle); panelExtendedMiddle.setLayout(panelExtendedMiddleLayout); panelExtendedMiddleLayout.setHorizontalGroup(panelExtendedMiddleLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 1045, Short.MAX_VALUE)); panelExtendedMiddleLayout.setVerticalGroup(panelExtendedMiddleLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 30, Short.MAX_VALUE)); panel_top.add(panelExtendedMiddle, java.awt.BorderLayout.CENTER); panel_main.setBackground(new java.awt.Color(153, 153, 153)); panel_main.setMaximumSize(new java.awt.Dimension(99999, 99999)); panel_main.setMinimumSize(new java.awt.Dimension(1, 1)); panel_main.setPreferredSize(new java.awt.Dimension(99999, 99999)); javax.swing.GroupLayout panel_mainLayout = new javax.swing.GroupLayout(panel_main); panel_main.setLayout(panel_mainLayout); panel_mainLayout.setHorizontalGroup(panel_mainLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); panel_mainLayout.setVerticalGroup(panel_mainLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 532, Short.MAX_VALUE)); pluginToolbar.setVisible(false); pluginToolbar.setPreferredSize(new java.awt.Dimension(856, 24)); pluginToolbar.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEADING)); javax.swing.GroupLayout panel_browserLayout = new javax.swing.GroupLayout(panel_browser); panel_browser.setLayout(panel_browserLayout); panel_browserLayout.setHorizontalGroup( panel_browserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(panel_top, javax.swing.GroupLayout.DEFAULT_SIZE, 1045, Short.MAX_VALUE) .addComponent(pluginToolbar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(panel_main, javax.swing.GroupLayout.DEFAULT_SIZE, 1045, Short.MAX_VALUE)); panel_browserLayout.setVerticalGroup(panel_browserLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panel_browserLayout.createSequentialGroup().addContainerGap() .addComponent(panel_top, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0) .addComponent(pluginToolbar, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0) .addComponent(panel_main, javax.swing.GroupLayout.DEFAULT_SIZE, 532, Short.MAX_VALUE))); fileMenu.setText("File"); loadGenomeItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_G, java.awt.event.InputEvent.CTRL_MASK)); loadGenomeItem.setText("Load Genome..."); loadGenomeItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { loadGenomeItemActionPerformed(evt); } }); fileMenu.add(loadGenomeItem); loadFromFileItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_T, java.awt.event.InputEvent.CTRL_MASK)); loadFromFileItem.setText("Load Track from File..."); loadFromFileItem.setEnabled(false); loadFromFileItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { loadFromFileItemActionPerformed(evt); } }); fileMenu.add(loadFromFileItem); loadFromURLItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U, java.awt.event.InputEvent.CTRL_MASK)); loadFromURLItem.setText("Load Track from URL..."); loadFromURLItem.setEnabled(false); loadFromURLItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { loadFromURLItemActionPerformed(evt); } }); fileMenu.add(loadFromURLItem); loadFromDataSourcePluginItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.CTRL_MASK)); loadFromDataSourcePluginItem.setText("Load Track from Repository..."); loadFromDataSourcePluginItem.setEnabled(false); loadFromDataSourcePluginItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { loadFromDataSourcePluginItemActionPerformed(evt); } }); fileMenu.add(loadFromDataSourcePluginItem); recentTrackMenu.setText("Load Recent Track"); fileMenu.add(recentTrackMenu); fileMenu.add(jSeparator1); openProjectItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK)); openProjectItem.setText("Open Project..."); openProjectItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { openProjectItemActionPerformed(evt); } }); fileMenu.add(openProjectItem); recentProjectMenu.setText("Open Recent Project"); fileMenu.add(recentProjectMenu); saveProjectItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK)); saveProjectItem.setText("Save Project"); saveProjectItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveProjectItemActionPerformed(evt); } }); fileMenu.add(saveProjectItem); saveProjectAsItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); saveProjectAsItem.setText("Save Project As..."); saveProjectAsItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveProjectAsItemActionPerformed(evt); } }); fileMenu.add(saveProjectAsItem); fileMenu.add(jSeparator2); formatItem.setText("Format File..."); formatItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { formatItemActionPerformed(evt); } }); fileMenu.add(formatItem); fileMenu.add(jSeparator3); exportItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_I, java.awt.event.InputEvent.CTRL_MASK)); exportItem.setText("Export Track Images..."); exportItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { menuitem_exportActionPerformed(evt); } }); fileMenu.add(exportItem); fileMenu.add(jSeparator4); exitItem.setText("Exit"); exitItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { exitItemActionPerformed(evt); } }); fileMenu.add(exitItem); menuBar_top.add(fileMenu); editMenu.setText("Edit"); undoItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Z, java.awt.event.InputEvent.CTRL_MASK)); undoItem.setText("Undo Range Change"); 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.setText("Redo Range Change"); redoItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { redoItemActionPerformed(evt); } }); editMenu.add(redoItem); editMenu.add(jSeparator6); bookmarkItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, java.awt.event.InputEvent.CTRL_MASK)); bookmarkItem.setText("Bookmark"); bookmarkItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bookmarkItemActionPerformed(evt); } }); editMenu.add(bookmarkItem); deselectAllItem.setText("Deselect All"); deselectAllItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { menuitem_deselectActionPerformed(evt); } }); editMenu.add(deselectAllItem); editMenu.add(jSeparator7); preferencesItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.CTRL_MASK)); preferencesItem.setText("Preferences"); preferencesItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { preferencesItemActionPerformed(evt); } }); editMenu.add(preferencesItem); menuBar_top.add(editMenu); viewMenu.setText("View"); panLeftItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_LEFT, java.awt.event.InputEvent.SHIFT_MASK)); panLeftItem.setText("Pan Left"); panLeftItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { panLeftItemActionPerformed(evt); } }); viewMenu.add(panLeftItem); panRightItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_RIGHT, java.awt.event.InputEvent.SHIFT_MASK)); panRightItem.setText("Pan Right"); panRightItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { panRightItemActionPerformed(evt); } }); viewMenu.add(panRightItem); zoomInItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_UP, java.awt.event.InputEvent.SHIFT_MASK)); zoomInItem.setText("Zoom In"); zoomInItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { zoomInItemActionPerformed(evt); } }); viewMenu.add(zoomInItem); zoomOutItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_DOWN, java.awt.event.InputEvent.SHIFT_MASK)); zoomOutItem.setText("Zoom Out"); zoomOutItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { zoomOutItemActionPerformed(evt); } }); viewMenu.add(zoomOutItem); toStartItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_HOME, 0)); toStartItem.setText("Shift to Start"); toStartItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { toStartItemActionPerformed(evt); } }); viewMenu.add(toStartItem); toEndItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_END, 0)); toEndItem.setText("Shift to End"); toEndItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { toEndItemActionPerformed(evt); } }); viewMenu.add(toEndItem); viewMenu.add(jSeparator8); crosshairItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_J, java.awt.event.InputEvent.CTRL_MASK)); crosshairItem.setText("Crosshair"); crosshairItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { crosshairItemActionPerformed(evt); } }); viewMenu.add(crosshairItem); plumblineItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_K, java.awt.event.InputEvent.CTRL_MASK)); plumblineItem.setText("Plumbline"); plumblineItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { plumblineItemActionPerformed(evt); } }); viewMenu.add(plumblineItem); spotlightItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.CTRL_MASK)); spotlightItem.setText("Spotlight"); spotlightItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { spotlightItemActionPerformed(evt); } }); viewMenu.add(spotlightItem); menuBar_top.add(viewMenu); windowMenu.setText("Window"); windowMenu.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { windowMenuStateChanged(evt); } }); navigationItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); navigationItem.setText("Navigation"); navigationItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { navigationItemMousePressed(evt); } }); windowMenu.add(navigationItem); genomeItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); genomeItem.setText("Genome"); genomeItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { genomeItemActionPerformed(evt); } }); windowMenu.add(genomeItem); rulerItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); rulerItem.setText("Ruler"); rulerItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { rulerItemActionPerformed(evt); } }); windowMenu.add(rulerItem); pluginToolbarItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_T, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); pluginToolbarItem.setSelected(true); pluginToolbarItem.setText("Plugin Toolbar"); pluginToolbarItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { pluginToolbarItemActionPerformed(evt); } }); windowMenu.add(pluginToolbarItem); statusBarItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); statusBarItem.setSelected(true); statusBarItem.setText("Status Bar"); statusBarItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { statusBarItemActionPerformed(evt); } }); windowMenu.add(statusBarItem); speedAndEfficiencyItem.setText("Resources"); speedAndEfficiencyItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { speedAndEfficiencyItemActionPerformed(evt); } }); windowMenu.add(speedAndEfficiencyItem); windowMenu.add(jSeparator9); bookmarksItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_B, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); bookmarksItem.setText("Bookmarks"); bookmarksItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bookmarksItemActionPerformed(evt); } }); windowMenu.add(bookmarksItem); menuBar_top.add(windowMenu); pluginsMenu.setText("Plugins"); menuitem_pluginmanager.setText("Plugin Manager"); menuitem_pluginmanager.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { menuitem_pluginmanagerActionPerformed(evt); } }); pluginsMenu.add(menuitem_pluginmanager); pluginsMenu.add(jSeparator10); menuBar_top.add(pluginsMenu); helpMenu.setText("Help"); userManualItem.setText("Manuals"); userManualItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { userManualItemActionPerformed(evt); } }); helpMenu.add(userManualItem); tutorialsItem.setText("Video Tutorials"); tutorialsItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { tutorialsItemActionPerformed(evt); } }); helpMenu.add(tutorialsItem); checkForUpdatesItem.setText("Check for updates"); checkForUpdatesItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { checkForUpdatesItemActionPerformed(evt); } }); helpMenu.add(checkForUpdatesItem); bugReportItem.setText("Report an issue"); bugReportItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bugReportItemActionPerformed(evt); } }); helpMenu.add(bugReportItem); featureRequestItem.setText("Request a feature"); featureRequestItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { featureRequestItemActionPerformed(evt); } }); helpMenu.add(featureRequestItem); helpMenu.add(jSeparator11); websiteItem.setText("Website"); websiteItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { websiteItemActionPerformed(evt); } }); helpMenu.add(websiteItem); menuBar_top.add(helpMenu); setJMenuBar(menuBar_top); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(panel_browser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(toolbar_bottom, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(panel_browser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(toolbar_bottom, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))); pack(); }
From source file:se.llbit.chunky.renderer.ui.Adjuster.java
/** * @param layout// www . j av a 2 s . c om * @return vertical layout group */ public Group verticalGroup(GroupLayout layout) { return layout.createParallelGroup().addComponent(lbl).addComponent(slider).addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE); }
From source file:se.llbit.chunky.renderer.ui.RenderControls.java
private void buildUI() { setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE); setModalityType(ModalityType.MODELESS); if (!ShutdownAlert.canShutdown()) { // disable the computer shutdown checkbox if we can't shutdown shutdownWhenDoneCB.setEnabled(false); }//w ww .ja va2s . co m addWindowListener(new WindowListener() { @Override public void windowOpened(WindowEvent e) { } @Override public void windowIconified(WindowEvent e) { } @Override public void windowDeiconified(WindowEvent e) { } @Override public void windowDeactivated(WindowEvent e) { } @Override public void windowClosing(WindowEvent e) { sceneMan.interrupt(); RenderControls.this.dispose(); } @Override public void windowClosed(WindowEvent e) { // halt rendering renderMan.interrupt(); // dispose of the 3D view view.setVisible(false); view.dispose(); } @Override public void windowActivated(WindowEvent e) { } }); updateTitle(); addTab("General", Icon.wrench, buildGeneralPane()); addTab("Lighting", Icon.light, buildLightingPane()); addTab("Sky", Icon.sky, buildSkyPane()); addTab("Water", Icon.water, buildWaterPane()); addTab("Camera", Icon.camera, buildCameraPane()); addTab("Post-processing", Icon.gear, buildPostProcessingPane()); addTab("Advanced", Icon.advanced, buildAdvancedPane()); addTab("Help", Icon.question, buildHelpPane()); JLabel sppTargetLbl = new JLabel("SPP Target: "); sppTargetLbl.setToolTipText("The render will be paused at this SPP count"); JButton setDefaultBtn = new JButton("Make Default"); setDefaultBtn.setToolTipText("Make the current SPP target the default"); setDefaultBtn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { PersistentSettings.setSppTargetDefault(renderMan.scene().getTargetSPP()); } }); targetSPP.update(); JLabel renderLbl = new JLabel("Render: "); setViewVisible(false); showPreviewBtn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { if (view.isViewVisible()) { view.hideView(); } else { showPreviewWindow(); } } }); startRenderBtn.setText("START"); startRenderBtn.setIcon(Icon.play.imageIcon()); startRenderBtn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { switch (renderMan.scene().getRenderState()) { case PAUSED: renderMan.scene().resumeRender(); break; case PREVIEW: renderMan.scene().startRender(); break; case RENDERING: renderMan.scene().pauseRender(); break; } stopRenderBtn.setEnabled(true); } }); stopRenderBtn.setText("RESET"); stopRenderBtn.setIcon(Icon.stop.imageIcon()); stopRenderBtn.setToolTipText("<html>Warning: this will discard the " + "current rendered image!<br>Make sure to save your image " + "before stopping the renderer!"); stopRenderBtn.setEnabled(false); stopRenderBtn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { renderMan.scene().haltRender(); } }); saveFrameBtn.setText("Save Current Frame"); saveFrameBtn.addActionListener(saveFrameListener); sppLbl.setToolTipText("SPP = Samples Per Pixel, SPS = Samples Per Second"); setRenderTime(0); setSamplesPerSecond(0); setSPP(0); setProgress("Progress:", 0, 0, 1); progressLbl.setText("Progress:"); etaLbl.setText("ETA:"); sceneNameLbl.setText("Scene name: "); sceneNameField.setColumns(15); AbstractDocument document = (AbstractDocument) sceneNameField.getDocument(); document.setDocumentFilter(new SceneNameFilter()); document.addDocumentListener(sceneNameListener); sceneNameField.addActionListener(sceneNameActionListener); updateSceneNameField(); saveSceneBtn.setText("Save"); saveSceneBtn.setIcon(Icon.disk.imageIcon()); saveSceneBtn.addActionListener(saveSceneListener); JPanel panel = new JPanel(); GroupLayout layout = new GroupLayout(panel); panel.setLayout(layout); layout.setHorizontalGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout .createParallelGroup() .addGroup(layout.createSequentialGroup().addComponent(sceneNameLbl).addComponent(sceneNameField) .addPreferredGap(ComponentPlacement.RELATED).addComponent(saveSceneBtn)) .addComponent(tabbedPane) .addGroup(layout.createSequentialGroup().addGroup(targetSPP.horizontalGroup(layout)) .addPreferredGap(ComponentPlacement.RELATED).addComponent(setDefaultBtn)) .addGroup(layout.createSequentialGroup().addComponent(renderLbl) .addPreferredGap(ComponentPlacement.UNRELATED).addComponent(startRenderBtn) .addPreferredGap(ComponentPlacement.UNRELATED).addComponent(stopRenderBtn)) .addGroup( layout.createSequentialGroup().addComponent(saveFrameBtn) .addPreferredGap(ComponentPlacement.UNRELATED, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE) .addComponent(showPreviewBtn)) .addGroup( layout.createSequentialGroup().addComponent(renderTimeLbl) .addPreferredGap(ComponentPlacement.UNRELATED, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE) .addComponent(sppLbl)) .addGroup( layout.createSequentialGroup().addComponent(progressLbl) .addPreferredGap(ComponentPlacement.UNRELATED, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE) .addComponent(etaLbl)) .addComponent(progressBar)).addContainerGap()); layout.setVerticalGroup( layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(Alignment.BASELINE).addComponent(sceneNameLbl) .addComponent(sceneNameField).addComponent(saveSceneBtn)) .addPreferredGap(ComponentPlacement.UNRELATED).addComponent(tabbedPane) .addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(Alignment.BASELINE) .addGroup(targetSPP.verticalGroup(layout)).addComponent(setDefaultBtn)) .addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(Alignment.BASELINE).addComponent(renderLbl) .addComponent(startRenderBtn).addComponent(stopRenderBtn)) .addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup().addComponent(saveFrameBtn) .addComponent(showPreviewBtn)) .addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup().addComponent(renderTimeLbl).addComponent(sppLbl)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup().addComponent(progressLbl).addComponent(etaLbl)) .addComponent(progressBar).addContainerGap()); final JScrollPane scrollPane = new JScrollPane(panel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); setContentPane(scrollPane); scrollPane.getViewport().addChangeListener(new ChangeListener() { private boolean resized = false; @Override public void stateChanged(ChangeEvent e) { if (!resized && scrollPane.getVerticalScrollBar().isVisible()) { Dimension vsbPrefSize = new JScrollPane().getVerticalScrollBar().getPreferredSize(); Dimension size = getSize(); setSize(size.width + vsbPrefSize.width, size.height); resized = true; } } }); pack(); setLocationRelativeTo(chunky.getFrame()); setVisible(true); }
From source file:se.llbit.chunky.renderer.ui.RenderControls.java
private JPanel buildAdvancedPane() { rayDepth.update();//from w w w . j a v a2 s . c o m JSeparator sep1 = new JSeparator(); JSeparator sep2 = new JSeparator(); numThreads.update(); cpuLoad.update(); mergeDumpBtn.setToolTipText("Merge an existing render dump with the current render"); mergeDumpBtn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { CenteredFileDialog fileDialog = new CenteredFileDialog(null, "Select Render Dump", FileDialog.LOAD); fileDialog.setFilenameFilter(new FilenameFilter() { @Override public boolean accept(File dir, String name) { return name.toLowerCase().endsWith(".dump"); } }); fileDialog.setDirectory(PersistentSettings.getSceneDirectory().getAbsolutePath()); fileDialog.setVisible(true); File selectedFile = fileDialog.getSelectedFile(); if (selectedFile != null) { sceneMan.mergeRenderDump(selectedFile); } } }); JPanel panel = new JPanel(); GroupLayout layout = new GroupLayout(panel); panel.setLayout(layout); layout.setHorizontalGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup().addGroup(numThreads.horizontalGroup(layout)) .addGroup(cpuLoad.horizontalGroup(layout)).addComponent(sep1) .addGroup(rayDepth.horizontalGroup(layout)).addComponent(sep2).addComponent(mergeDumpBtn) .addComponent(shutdownWhenDoneCB)) .addContainerGap()); layout.setVerticalGroup(layout.createSequentialGroup().addContainerGap() .addGroup(numThreads.verticalGroup(layout)).addPreferredGap(ComponentPlacement.RELATED) .addGroup(cpuLoad.verticalGroup(layout)).addPreferredGap(ComponentPlacement.UNRELATED) .addComponent(sep1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap(ComponentPlacement.UNRELATED).addGroup(rayDepth.verticalGroup(layout)) .addPreferredGap(ComponentPlacement.UNRELATED) .addComponent(sep2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap(ComponentPlacement.UNRELATED).addComponent(mergeDumpBtn) .addPreferredGap(ComponentPlacement.UNRELATED).addComponent(shutdownWhenDoneCB).addContainerGap()); return panel; }
From source file:se.llbit.chunky.renderer.ui.RenderControls.java
private JPanel buildWaterPane() { JButton storeDefaultsBtn = new JButton("Store as defaults"); storeDefaultsBtn.setToolTipText("Store the current water settings as new defaults"); storeDefaultsBtn.addActionListener(new ActionListener() { @Override//from w w w. ja v a 2s.c om public void actionPerformed(ActionEvent e) { PersistentSettings.setStillWater(renderMan.scene().stillWaterEnabled()); PersistentSettings.setWaterOpacity(renderMan.scene().getWaterOpacity()); PersistentSettings.setWaterVisibility(renderMan.scene().getWaterVisibility()); PersistentSettings.setWaterHeight(renderMan.scene().getWaterHeight()); boolean useCustomWaterColor = renderMan.scene().getUseCustomWaterColor(); PersistentSettings.setUseCustomWaterColor(useCustomWaterColor); if (useCustomWaterColor) { Vector3d color = renderMan.scene().getWaterColor(); PersistentSettings.setWaterColorRed(color.x); PersistentSettings.setWaterColorGreen(color.y); PersistentSettings.setWaterColorBlue(color.z); } } }); stillWaterCB.setText("still water"); stillWaterCB.addActionListener(stillWaterListener); updateStillWater(); waterVisibility.update(); waterOpacity.update(); JLabel waterWorldLbl = new JLabel( "Note: All chunks will be reloaded after changing the water world options!"); JLabel waterHeightLbl = new JLabel("Water height: "); waterHeightField.setColumns(5); waterHeightField.setText("" + World.SEA_LEVEL); waterHeightField.setEnabled(renderMan.scene().getWaterHeight() != 0); waterHeightField.addActionListener(waterHeightListener); applyWaterHeightBtn.setToolTipText("Use this water height"); applyWaterHeightBtn.addActionListener(waterHeightListener); waterWorldCB.setText("Water World Mode"); waterWorldCB.addActionListener(waterWorldListener); updateWaterHeight(); waterColorCB.addActionListener(customWaterColorListener); updateWaterColor(); waterColorBtn.setIcon(Icon.colors.imageIcon()); waterColorBtn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { ColorPicker picker = new ColorPicker(waterColorBtn, renderMan.scene().getWaterColor()); picker.addColorListener(new ColorListener() { @Override public void onColorPicked(Vector3d color) { renderMan.scene().setWaterColor(color); } }); } }); JPanel panel = new JPanel(); GroupLayout layout = new GroupLayout(panel); panel.setLayout(layout); layout.setHorizontalGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout .createParallelGroup().addComponent(stillWaterCB).addGroup(waterVisibility.horizontalGroup(layout)) .addGroup(waterOpacity.horizontalGroup(layout)).addComponent(waterWorldLbl) .addComponent(waterWorldCB) .addGroup(layout.createSequentialGroup().addComponent(waterHeightLbl) .addPreferredGap(ComponentPlacement.UNRELATED, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE) .addComponent(waterHeightField, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap(ComponentPlacement.RELATED).addComponent(applyWaterHeightBtn)) .addGroup(layout.createSequentialGroup().addComponent(waterColorCB) .addPreferredGap(ComponentPlacement.UNRELATED, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE) .addComponent(waterColorBtn)) .addGroup(layout.createSequentialGroup() .addPreferredGap(ComponentPlacement.UNRELATED, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE) .addComponent(storeDefaultsBtn))) .addContainerGap()); layout.setVerticalGroup(layout.createSequentialGroup().addContainerGap().addComponent(stillWaterCB) .addPreferredGap(ComponentPlacement.RELATED).addGroup(waterVisibility.verticalGroup(layout)) .addPreferredGap(ComponentPlacement.RELATED).addGroup(waterOpacity.verticalGroup(layout)) .addPreferredGap(ComponentPlacement.UNRELATED).addComponent(waterWorldLbl) .addPreferredGap(ComponentPlacement.RELATED).addComponent(waterWorldCB) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup().addComponent(waterHeightLbl) .addComponent(waterHeightField, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(applyWaterHeightBtn)) .addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup().addComponent(waterColorCB).addComponent(waterColorBtn)) .addPreferredGap(ComponentPlacement.UNRELATED) .addPreferredGap(ComponentPlacement.UNRELATED, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE) .addComponent(storeDefaultsBtn).addContainerGap()); return panel; }
From source file:se.llbit.chunky.renderer.ui.RenderControls.java
private JPanel buildGeneralPane() { JLabel canvasSizeLbl = new JLabel("Canvas size:"); JLabel canvasSizeAdvisory = new JLabel("Note: Actual image size may not be the same as the window size!"); canvasSizeCB.setEditable(true);//from w w w. j av a 2 s. co m canvasSizeCB.addItem("400x400"); canvasSizeCB.addItem("1024x768"); canvasSizeCB.addItem("960x540"); canvasSizeCB.addItem("1920x1080"); canvasSizeCB.addActionListener(canvasSizeListener); final JTextField canvasSizeEditor = (JTextField) canvasSizeCB.getEditor().getEditorComponent(); canvasSizeEditor.addFocusListener(new FocusListener() { @Override public void focusLost(FocusEvent e) { } @Override public void focusGained(FocusEvent e) { canvasSizeEditor.selectAll(); } }); updateCanvasSizeField(); loadSceneBtn.setText("Load Scene"); loadSceneBtn.setIcon(Icon.load.imageIcon()); loadSceneBtn.addActionListener(loadSceneListener); JButton loadSelectedChunksBtn = new JButton("Load Selected Chunks"); loadSelectedChunksBtn.setToolTipText("Load the chunks that are currently selected in the map view"); loadSelectedChunksBtn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { sceneMan.loadChunks(chunky.getWorld(), chunky.getSelectedChunks()); } }); JButton reloadChunksBtn = new JButton("Reload Chunks"); reloadChunksBtn.setIcon(Icon.reload.imageIcon()); reloadChunksBtn.setToolTipText("Reload all chunks in the scene"); reloadChunksBtn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { sceneMan.reloadChunks(); } }); openSceneDirBtn.setText("Open Scene Directory"); openSceneDirBtn.setToolTipText("Open the directory where Chunky stores scene descriptions and renders"); openSceneDirBtn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { try { if (Desktop.isDesktopSupported()) { Desktop.getDesktop().open(context.getSceneDirectory()); } } catch (IOException e) { Log.warn("Failed to open scene directory", e); } } }); openSceneDirBtn.setVisible(Desktop.isDesktopSupported()); loadSceneBtn.setToolTipText("This replaces the current scene!"); JButton setCanvasSizeBtn = new JButton("Apply"); setCanvasSizeBtn.setToolTipText("Set the canvas size to the value in the field"); setCanvasSizeBtn.addActionListener(canvasSizeListener); JButton halveCanvasSizeBtn = new JButton("Halve"); halveCanvasSizeBtn.setToolTipText("Halve the canvas width and height"); halveCanvasSizeBtn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { int width = renderMan.scene().canvasWidth() / 2; int height = renderMan.scene().canvasHeight() / 2; setCanvasSize(width, height); } }); JButton doubleCanvasSizeBtn = new JButton("Double"); doubleCanvasSizeBtn.setToolTipText("Double the canvas width and height"); doubleCanvasSizeBtn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { int width = renderMan.scene().canvasWidth() * 2; int height = renderMan.scene().canvasHeight() * 2; setCanvasSize(width, height); } }); JButton makeDefaultBtn = new JButton("Make Default"); makeDefaultBtn.setToolTipText("Make the current canvas size the default"); makeDefaultBtn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { PersistentSettings.set3DCanvasSize(renderMan.scene().canvasWidth(), renderMan.scene().canvasHeight()); } }); JSeparator sep1 = new JSeparator(); JSeparator sep2 = new JSeparator(); biomeColorsCB.setText("enable biome colors"); updateBiomeColorsCB(); saveDumpsCB.setText("save dump once every "); saveDumpsCB.addActionListener(saveDumpsListener); updateSaveDumpsCheckBox(); String[] frequencyStrings = new String[dumpFrequencies.length]; for (int i = 0; i < dumpFrequencies.length; ++i) { frequencyStrings[i] = Integer.toString(dumpFrequencies[i]); } dumpFrequencyCB.setModel(new DefaultComboBoxModel(frequencyStrings)); dumpFrequencyCB.setEditable(true); dumpFrequencyCB.addActionListener(dumpFrequencyListener); updateDumpFrequencyField(); saveSnapshotsCB.addActionListener(saveSnapshotListener); updateSaveSnapshotCheckBox(); yCutoff.update(); JPanel panel = new JPanel(); GroupLayout layout = new GroupLayout(panel); panel.setLayout(layout); layout.setHorizontalGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup() .addGroup(layout.createSequentialGroup().addComponent(loadSceneBtn) .addPreferredGap(ComponentPlacement.RELATED).addComponent(openSceneDirBtn)) .addGroup(layout.createSequentialGroup().addComponent(loadSelectedChunksBtn) .addPreferredGap(ComponentPlacement.RELATED).addComponent(reloadChunksBtn)) .addComponent(sep1) .addGroup(layout.createSequentialGroup().addComponent(canvasSizeLbl) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(canvasSizeCB, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap(ComponentPlacement.RELATED).addComponent(setCanvasSizeBtn) .addPreferredGap(ComponentPlacement.RELATED).addComponent(makeDefaultBtn)) .addGroup(layout.createSequentialGroup().addComponent(halveCanvasSizeBtn) .addPreferredGap(ComponentPlacement.RELATED).addComponent(doubleCanvasSizeBtn)) .addComponent(canvasSizeAdvisory).addComponent(sep2).addComponent(biomeColorsCB) .addGroup(layout.createSequentialGroup().addComponent(saveDumpsCB) .addComponent(dumpFrequencyCB, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(dumpFrequencyLbl).addGap(0, 0, Short.MAX_VALUE)) .addComponent(saveSnapshotsCB).addGroup(yCutoff.horizontalGroup(layout))) .addContainerGap()); layout.setVerticalGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup().addComponent(loadSceneBtn).addComponent(openSceneDirBtn)) .addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(layout .createParallelGroup().addComponent(loadSelectedChunksBtn).addComponent(reloadChunksBtn)) .addPreferredGap(ComponentPlacement.UNRELATED) .addComponent( sep1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(Alignment.BASELINE).addComponent(canvasSizeLbl) .addComponent(canvasSizeCB, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(setCanvasSizeBtn).addComponent(makeDefaultBtn)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup().addComponent(halveCanvasSizeBtn) .addComponent(doubleCanvasSizeBtn)) .addPreferredGap(ComponentPlacement.RELATED).addComponent(canvasSizeAdvisory) .addPreferredGap(ComponentPlacement.UNRELATED) .addComponent(sep2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap(ComponentPlacement.UNRELATED).addComponent(biomeColorsCB) .addGroup(layout.createParallelGroup(Alignment.BASELINE).addComponent(saveDumpsCB) .addComponent(dumpFrequencyCB).addComponent(dumpFrequencyLbl)) .addComponent(saveSnapshotsCB).addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(yCutoff.verticalGroup(layout)).addContainerGap()); return panel; }