List of usage examples for java.awt.event KeyEvent VK_E
int VK_E
To view the source code for java.awt.event KeyEvent VK_E.
Click Source Link
From source file:GUI.MainWindow.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 www. j a v a2s . c om */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { ImportScanScreen = new javax.swing.JDialog(); jLabel1 = new javax.swing.JLabel(); jScrollPane2 = new javax.swing.JScrollPane(); ImportFile = new javax.swing.JList(); jLabel2 = new javax.swing.JLabel(); FileType = new javax.swing.JTextField(); jLabel3 = new javax.swing.JLabel(); FileSize = new javax.swing.JTextField(); ProgressBar = new javax.swing.JProgressBar(); VulnTreeContextMenu = new javax.swing.JPopupMenu(); MergeButton = new javax.swing.JMenuItem(); LookupCVE = new javax.swing.JMenuItem(); AddToPersonalVulns = new javax.swing.JMenuItem(); ClearHash = new javax.swing.JMenuItem(); jSeparator1 = new javax.swing.JPopupMenu.Separator(); DeleteButton = new javax.swing.JMenuItem(); VulnAffectedHostsContextMenu = new javax.swing.JPopupMenu(); AddHostsButton = new javax.swing.JMenuItem(); EditHostname = new javax.swing.JMenuItem(); jSeparator2 = new javax.swing.JPopupMenu.Separator(); DeleteHost = new javax.swing.JMenuItem(); VulnReferencesContextMenu = new javax.swing.JPopupMenu(); InsertReference = new javax.swing.JMenuItem(); EditReferenceOption = new javax.swing.JMenuItem(); LaunchInBrowser = new javax.swing.JMenuItem(); jSeparator3 = new javax.swing.JPopupMenu.Separator(); DeleteReferenceOption = new javax.swing.JMenuItem(); ManageAffectedHosts = new javax.swing.JDialog(); jScrollPane5 = new javax.swing.JScrollPane(); ListOfHosts = new javax.swing.JList(); jScrollPane9 = new javax.swing.JScrollPane(); ListOfOpenPorts = new javax.swing.JList(); jLabel5 = new javax.swing.JLabel(); jLabel13 = new javax.swing.JLabel(); MainScreenBottomPanel = new javax.swing.JPanel(); jLabel20 = new javax.swing.JLabel(); VulnTreeFilter = new javax.swing.JTextField(); ExtraInfoLabel = new javax.swing.JLabel(); jSplitPane2 = new javax.swing.JSplitPane(); ViewModeTabPane = new javax.swing.JTabbedPane(); jScrollPane1 = new javax.swing.JScrollPane(); VulnTree = new javax.swing.JTree(); jScrollPane3 = new javax.swing.JScrollPane(); HostTree = new javax.swing.JTree(); RightPanelCardLayout = new javax.swing.JPanel(); RightPanelVulnView = new javax.swing.JPanel(); VulnerabilityTopPanel = new javax.swing.JPanel(); jPanel8 = new javax.swing.JPanel(); jLabel9 = new javax.swing.JLabel(); VulnTitleTextField = new javax.swing.JTextField(); jPanel9 = new javax.swing.JPanel(); jLabel10 = new javax.swing.JLabel(); VulnCVSSVectorTextField = new javax.swing.JTextField(); jLabel11 = new javax.swing.JLabel(); VulnRiskCategory = new javax.swing.JTextField(); jLabel12 = new javax.swing.JLabel(); VulnScore = new javax.swing.JTextField(); EditRiskButton = new javax.swing.JButton(); jSplitPane1 = new javax.swing.JSplitPane(); jSplitPane3 = new javax.swing.JSplitPane(); VulnRecommendationsPanel = new javax.swing.JPanel(); jLabel8 = new javax.swing.JLabel(); jScrollPane7 = new javax.swing.JScrollPane(); VulnRecommendationTextPane = new javax.swing.JTextPane(); jSplitPane4 = new javax.swing.JSplitPane(); VulnReferencesPanel = new javax.swing.JPanel(); jLabel4 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jScrollPane6 = new javax.swing.JScrollPane(); VulnReferencesList = new javax.swing.JList(); jScrollPane4 = new javax.swing.JScrollPane(); VulnAffectedHostsTable = new javax.swing.JTable(); VulnDescriptionPanel = new javax.swing.JPanel(); jLabel6 = new javax.swing.JLabel(); jScrollPane8 = new javax.swing.JScrollPane(); VulnDescriptionTextPane = new javax.swing.JTextPane(); RightPanelHostsView = new javax.swing.JPanel(); jMenuBar1 = new javax.swing.JMenuBar(); jMenu1 = new javax.swing.JMenu(); jMenuItem3 = new javax.swing.JMenuItem(); jMenuItem4 = new javax.swing.JMenuItem(); jMenuItem5 = new javax.swing.JMenuItem(); jMenuItem11 = new javax.swing.JMenuItem(); exitButton = new javax.swing.JMenuItem(); jMenu2 = new javax.swing.JMenu(); jMenuItem1 = new javax.swing.JMenuItem(); jMenuItem2 = new javax.swing.JMenuItem(); jMenuItem7 = new javax.swing.JMenuItem(); jMenuItem10 = new javax.swing.JMenuItem(); jMenu4 = new javax.swing.JMenu(); jMenuItem9 = new javax.swing.JMenuItem(); jMenu3 = new javax.swing.JMenu(); jMenuItem8 = new javax.swing.JMenuItem(); jMenu5 = new javax.swing.JMenu(); increaseFont = new javax.swing.JMenuItem(); decreaseFont = new javax.swing.JMenuItem(); ImportScanScreen.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); ImportScanScreen.setTitle("Report Compiler - Import Scan Screen"); ImportScanScreen.setMinimumSize(new java.awt.Dimension(382, 220)); ImportScanScreen.setModal(true); ImportScanScreen.addWindowListener(new java.awt.event.WindowAdapter() { public void windowActivated(java.awt.event.WindowEvent evt) { ImportScanScreenWindowActivated(evt); } }); jLabel1.setText("File Name:"); ImportFile.setModel(new javax.swing.AbstractListModel() { String[] strings = { "One" }; public int getSize() { return strings.length; } public Object getElementAt(int i) { return strings[i]; } }); ImportFile.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); ImportFile.setEnabled(false); jScrollPane2.setViewportView(ImportFile); jLabel2.setText("File Type:"); FileType.setEnabled(false); jLabel3.setText("File Size:"); FileSize.setEnabled(false); ProgressBar.setIndeterminate(true); javax.swing.GroupLayout ImportScanScreenLayout = new javax.swing.GroupLayout( ImportScanScreen.getContentPane()); ImportScanScreen.getContentPane().setLayout(ImportScanScreenLayout); ImportScanScreenLayout .setHorizontalGroup( ImportScanScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(ImportScanScreenLayout.createSequentialGroup().addGap(10, 10, 10) .addGroup(ImportScanScreenLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2) .addComponent(FileType, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3) .addComponent(FileSize, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ProgressBar, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)))); ImportScanScreenLayout.setVerticalGroup(ImportScanScreenLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(ImportScanScreenLayout.createSequentialGroup().addGap(10, 10, 10).addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel2) .addGap(6, 6, 6) .addComponent(FileType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0).addComponent(jLabel3).addGap(6, 6, 6) .addComponent(FileSize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(10, 10, 10).addComponent(ProgressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))); MergeButton.setText("Merge"); MergeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { MergeButtonActionPerformed(evt); } }); VulnTreeContextMenu.add(MergeButton); LookupCVE.setText("Lookup CVE(s)"); LookupCVE.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { LookupCVEActionPerformed(evt); } }); VulnTreeContextMenu.add(LookupCVE); AddToPersonalVulns.setText("Add to Personal Vulns"); AddToPersonalVulns.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { AddToPersonalVulnsActionPerformed(evt); } }); VulnTreeContextMenu.add(AddToPersonalVulns); ClearHash.setText("Clear Hash(s)"); ClearHash.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ClearHashActionPerformed(evt); } }); VulnTreeContextMenu.add(ClearHash); VulnTreeContextMenu.add(jSeparator1); DeleteButton.setText("Delete"); DeleteButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { DeleteButtonActionPerformed(evt); } }); VulnTreeContextMenu.add(DeleteButton); VulnAffectedHostsContextMenu.setMinimumSize(new java.awt.Dimension(20, 20)); AddHostsButton.setText("Add Host"); AddHostsButton.setActionCommand("AddHost"); AddHostsButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { AddHostsButtonActionPerformed(evt); } }); VulnAffectedHostsContextMenu.add(AddHostsButton); EditHostname.setText("Edit Hostname"); EditHostname.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { EditHostnameActionPerformed(evt); } }); VulnAffectedHostsContextMenu.add(EditHostname); VulnAffectedHostsContextMenu.add(jSeparator2); DeleteHost.setText("Delete Host ('del' is hotkey)"); DeleteHost.setActionCommand("DeleteHost"); DeleteHost.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { DeleteHostActionPerformed(evt); } }); VulnAffectedHostsContextMenu.add(DeleteHost); InsertReference.setText("Insert Reference"); InsertReference.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { InsertReferenceActionPerformed(evt); } }); VulnReferencesContextMenu.add(InsertReference); EditReferenceOption.setText("Edit Reference"); EditReferenceOption.setToolTipText(""); EditReferenceOption.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { EditReferenceOptionActionPerformed(evt); } }); VulnReferencesContextMenu.add(EditReferenceOption); LaunchInBrowser.setText("Launch in Browser"); LaunchInBrowser.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { LaunchInBrowserActionPerformed(evt); } }); VulnReferencesContextMenu.add(LaunchInBrowser); VulnReferencesContextMenu.add(jSeparator3); DeleteReferenceOption.setText("Delete Reference"); DeleteReferenceOption.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { DeleteReferenceOptionActionPerformed(evt); } }); VulnReferencesContextMenu.add(DeleteReferenceOption); ManageAffectedHosts.setTitle("Report Compiler - Manage Affected Hosts"); ManageAffectedHosts.addWindowListener(new java.awt.event.WindowAdapter() { public void windowOpened(java.awt.event.WindowEvent evt) { ManageAffectedHostsWindowOpened(evt); } }); jScrollPane5.setViewportView(ListOfHosts); jScrollPane9.setViewportView(ListOfOpenPorts); jLabel5.setText("Hosts"); jLabel13.setText("Ports"); javax.swing.GroupLayout ManageAffectedHostsLayout = new javax.swing.GroupLayout( ManageAffectedHosts.getContentPane()); ManageAffectedHosts.getContentPane().setLayout(ManageAffectedHostsLayout); ManageAffectedHostsLayout.setHorizontalGroup( ManageAffectedHostsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(ManageAffectedHostsLayout.createSequentialGroup().addGap(25, 25, 25) .addGroup(ManageAffectedHostsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel5)) .addGap(18, 18, 18) .addGroup(ManageAffectedHostsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel13).addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); ManageAffectedHostsLayout.setVerticalGroup( ManageAffectedHostsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(ManageAffectedHostsLayout.createSequentialGroup().addContainerGap() .addGroup(ManageAffectedHostsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5).addComponent(jLabel13)) .addGap(13, 13, 13) .addGroup(ManageAffectedHostsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE) .addComponent(jScrollPane9)) .addContainerGap(36, Short.MAX_VALUE))); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Report Compiler - Main Window"); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { formWindowClosing(evt); } }); jLabel20.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel20.setText("Tree Filter:"); VulnTreeFilter.addCaretListener(new javax.swing.event.CaretListener() { public void caretUpdate(javax.swing.event.CaretEvent evt) { VulnTreeFilterCaretUpdate(evt); } }); ExtraInfoLabel.setFont( ExtraInfoLabel.getFont().deriveFont(ExtraInfoLabel.getFont().getStyle() | java.awt.Font.BOLD)); ExtraInfoLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); javax.swing.GroupLayout MainScreenBottomPanelLayout = new javax.swing.GroupLayout(MainScreenBottomPanel); MainScreenBottomPanel.setLayout(MainScreenBottomPanelLayout); MainScreenBottomPanelLayout.setHorizontalGroup(MainScreenBottomPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(MainScreenBottomPanelLayout.createSequentialGroup().addContainerGap() .addComponent(jLabel20) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(VulnTreeFilter, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 354, Short.MAX_VALUE) .addComponent(ExtraInfoLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 556, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())); MainScreenBottomPanelLayout.setVerticalGroup(MainScreenBottomPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(MainScreenBottomPanelLayout.createSequentialGroup().addContainerGap() .addGroup(MainScreenBottomPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(MainScreenBottomPanelLayout.createSequentialGroup() .addComponent(ExtraInfoLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(20, 20, 20)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, MainScreenBottomPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel20).addComponent(VulnTreeFilter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); getContentPane().add(MainScreenBottomPanel, java.awt.BorderLayout.SOUTH); jSplitPane2.setDividerLocation(200); jSplitPane2.setDividerSize(20); jSplitPane2.setOneTouchExpandable(true); ViewModeTabPane.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { ViewModeTabPaneStateChanged(evt); } }); javax.swing.tree.DefaultMutableTreeNode treeNode1 = new javax.swing.tree.DefaultMutableTreeNode( "NOT IMPLEMENTED"); VulnTree.setModel(new javax.swing.tree.DefaultTreeModel(treeNode1)); VulnTree.setCellRenderer(new VulnerabilityViewTreeCellRenderer(true)); VulnTree.setRootVisible(false); VulnTree.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { VulnTreeMouseClicked(evt); } }); VulnTree.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() { public void valueChanged(javax.swing.event.TreeSelectionEvent evt) { VulnTreeValueChanged(evt); } }); VulnTree.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { VulnTreeKeyPressed(evt); } }); jScrollPane1.setViewportView(VulnTree); ViewModeTabPane.addTab("Vuln View", jScrollPane1); jScrollPane3.setEnabled(false); treeNode1 = new javax.swing.tree.DefaultMutableTreeNode("root"); HostTree.setModel(new javax.swing.tree.DefaultTreeModel(treeNode1)); HostTree.setRootVisible(false); jScrollPane3.setViewportView(HostTree); ViewModeTabPane.addTab("Host View", jScrollPane3); jSplitPane2.setLeftComponent(ViewModeTabPane); RightPanelCardLayout.setLayout(new java.awt.CardLayout()); RightPanelVulnView.setLayout(new java.awt.BorderLayout()); VulnerabilityTopPanel.setLayout(new java.awt.BorderLayout()); jPanel8.setLayout(new javax.swing.BoxLayout(jPanel8, javax.swing.BoxLayout.LINE_AXIS)); jLabel9.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jLabel9.setLabelFor(VulnTitleTextField); jLabel9.setText("Title: "); jPanel8.add(jLabel9); VulnTitleTextField.setColumns(80); jPanel8.add(VulnTitleTextField); VulnerabilityTopPanel.add(jPanel8, java.awt.BorderLayout.NORTH); jPanel9.setLayout(new javax.swing.BoxLayout(jPanel9, javax.swing.BoxLayout.LINE_AXIS)); jLabel10.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel10.setText("CVSS:"); jPanel9.add(jLabel10); VulnCVSSVectorTextField.setEditable(false); VulnCVSSVectorTextField.setColumns(81); jPanel9.add(VulnCVSSVectorTextField); jLabel11.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel11.setText("Category:"); jPanel9.add(jLabel11); VulnRiskCategory.setEditable(false); VulnRiskCategory.setColumns(8); jPanel9.add(VulnRiskCategory); jLabel12.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel12.setText("Score:"); jPanel9.add(jLabel12); VulnScore.setEditable(false); VulnScore.setColumns(4); jPanel9.add(VulnScore); EditRiskButton.setText("Edit Risk"); EditRiskButton.setToolTipText("Click here to see the Risk Calculator where scores can be modified"); EditRiskButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { EditRiskButtonActionPerformed(evt); } }); jPanel9.add(EditRiskButton); VulnerabilityTopPanel.add(jPanel9, java.awt.BorderLayout.CENTER); RightPanelVulnView.add(VulnerabilityTopPanel, java.awt.BorderLayout.NORTH); jSplitPane1.setDividerLocation(200); jSplitPane1.setDividerSize(20); jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); jSplitPane1.setOneTouchExpandable(true); jSplitPane3.setDividerLocation(200); jSplitPane3.setDividerSize(20); jSplitPane3.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); jSplitPane3.setOneTouchExpandable(true); VulnRecommendationsPanel.setLayout(new java.awt.BorderLayout()); jLabel8.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel8.setText("Recommendation"); VulnRecommendationsPanel.add(jLabel8, java.awt.BorderLayout.PAGE_START); jScrollPane7.setViewportView(VulnRecommendationTextPane); VulnRecommendationsPanel.add(jScrollPane7, java.awt.BorderLayout.CENTER); jSplitPane3.setLeftComponent(VulnRecommendationsPanel); jSplitPane4.setDividerSize(20); jSplitPane4.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); jSplitPane4.setOneTouchExpandable(true); VulnReferencesPanel.setLayout(new java.awt.BorderLayout()); jLabel4.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel4.setText("Affected Hosts"); VulnReferencesPanel.add(jLabel4, java.awt.BorderLayout.PAGE_END); jLabel7.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel7.setText("References"); VulnReferencesPanel.add(jLabel7, java.awt.BorderLayout.PAGE_START); VulnReferencesList.setModel(new DefaultListModel()); VulnReferencesList.setToolTipText("Right click on this area to see options for references."); VulnReferencesList.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { VulnReferencesListMouseClicked(evt); } }); VulnReferencesList.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { VulnReferencesListKeyPressed(evt); } }); jScrollPane6.setViewportView(VulnReferencesList); VulnReferencesPanel.add(jScrollPane6, java.awt.BorderLayout.CENTER); jSplitPane4.setTopComponent(VulnReferencesPanel); jScrollPane4.setToolTipText( "Right click on this area to insert new affected hosts. Select one or more and press 'del' to delete or use the right click 'delete' option."); jScrollPane4.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jScrollPane4MouseClicked(evt); } }); jScrollPane4.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { jScrollPane4KeyPressed(evt); } }); VulnAffectedHostsTable.setAutoCreateRowSorter(true); VulnAffectedHostsTable.setModel(new AffectedHostsTableModel()); /*new javax.swing.table.DefaultTableModel( new Object[][]{}, new String[]{ "IP Address", "Hostname", "Portnumber", "Protocol" } ) { Class[] types = new Class[]{ Host.class, java.lang.String.class, java.lang.Integer.class, java.lang.String.class }; public Class getColumnClass(int columnIndex) { return types[columnIndex]; } }*///); VulnAffectedHostsTable.setToolTipText(""); VulnAffectedHostsTable.setCellSelectionEnabled(true); VulnAffectedHostsTable.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { VulnAffectedHostsTableMouseClicked(evt); } }); VulnAffectedHostsTable.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { VulnAffectedHostsTableKeyPressed(evt); } }); jScrollPane4.setViewportView(VulnAffectedHostsTable); VulnAffectedHostsTable.getColumnModel().getSelectionModel() .setSelectionMode(javax.swing.ListSelectionModel.SINGLE_INTERVAL_SELECTION); jSplitPane4.setRightComponent(jScrollPane4); jSplitPane3.setRightComponent(jSplitPane4); jSplitPane1.setBottomComponent(jSplitPane3); VulnDescriptionPanel.setMinimumSize(new java.awt.Dimension(0, 50)); VulnDescriptionPanel.setLayout(new java.awt.BorderLayout()); jLabel6.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel6.setText("Description"); VulnDescriptionPanel.add(jLabel6, java.awt.BorderLayout.PAGE_START); jScrollPane8.setViewportView(VulnDescriptionTextPane); VulnDescriptionPanel.add(jScrollPane8, java.awt.BorderLayout.CENTER); jSplitPane1.setTopComponent(VulnDescriptionPanel); RightPanelVulnView.add(jSplitPane1, java.awt.BorderLayout.CENTER); RightPanelCardLayout.add(RightPanelVulnView, "vulnView"); javax.swing.GroupLayout RightPanelHostsViewLayout = new javax.swing.GroupLayout(RightPanelHostsView); RightPanelHostsView.setLayout(RightPanelHostsViewLayout); RightPanelHostsViewLayout.setHorizontalGroup(RightPanelHostsViewLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 1103, Short.MAX_VALUE)); RightPanelHostsViewLayout.setVerticalGroup(RightPanelHostsViewLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 739, Short.MAX_VALUE)); RightPanelCardLayout.add(RightPanelHostsView, "hostView"); jSplitPane2.setRightComponent(RightPanelCardLayout); getContentPane().add(jSplitPane2, java.awt.BorderLayout.CENTER); jMenu1.setMnemonic('F'); jMenu1.setText("File"); jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK)); jMenuItem3.setText("New (Clear Tree)"); jMenuItem3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem3ActionPerformed(evt); } }); jMenu1.add(jMenuItem3); jMenuItem4.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK)); jMenuItem4.setText("Open"); jMenuItem4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem4ActionPerformed(evt); } }); jMenu1.add(jMenuItem4); jMenuItem5.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK)); jMenuItem5.setText("Save"); jMenuItem5.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem5ActionPerformed(evt); } }); jMenu1.add(jMenuItem5); jMenuItem11.setText("Save As"); jMenuItem11.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem11ActionPerformed(evt); } }); jMenu1.add(jMenuItem11); exitButton.setText("Exit"); exitButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { exitButtonActionPerformed(evt); } }); jMenu1.add(exitButton); jMenuBar1.add(jMenu1); jMenu2.setMnemonic('V'); jMenu2.setText("Vulnerabilities"); jMenu2.setToolTipText( "All vulnerability related operations. Import from a tool, create an entirely new one etc"); jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_I, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); jMenuItem1.setText("Import from Tool"); jMenuItem1.setToolTipText("Select one or more files to import simultaneously. "); jMenuItem1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem1ActionPerformed(evt); } }); jMenu2.add(jMenuItem1); jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_INSERT, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); jMenuItem2.setText("Create New Vulnerability"); jMenuItem2.setToolTipText( "Add a new vulnerability to your test. When finished you can save it to your Personal Vulnerability database by right clicking on the issue in the tree"); jMenuItem2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem2ActionPerformed(evt); } }); jMenu2.add(jMenuItem2); jMenuItem7.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_M, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); jMenuItem7.setText("Manage Personal Vulns"); jMenuItem7.setToolTipText( "Allows you to delete or edit the text for vulnerabilities in your Personal Database"); jMenuItem7.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem7ActionPerformed(evt); } }); jMenu2.add(jMenuItem7); jMenuItem10.setText("Auto Merge"); jMenuItem10.setToolTipText( "Use this to automatically replace the title, description, recommendation, references, and risk score with vulnerabilities in your personal database."); jMenuItem10.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem10ActionPerformed(evt); } }); jMenu2.add(jMenuItem10); jMenuBar1.add(jMenu2); jMenu4.setText("Hosts"); jMenuItem9.setText("Import Hosts by Nmap"); jMenuItem9.setEnabled(false); jMenu4.add(jMenuItem9); jMenuBar1.add(jMenu4); jMenu3.setMnemonic('E'); jMenu3.setText("Export"); jMenuItem8.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); jMenuItem8.setText("Excel Vulnerability List"); jMenuItem8.setToolTipText( "This can be used to send a high level debrief to clients in a spreadsheet format. Report Compiler also imports vulnerabilities back from these excel files if necessary."); jMenuItem8.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem8ActionPerformed(evt); } }); jMenu3.add(jMenuItem8); jMenuBar1.add(jMenu3); jMenu5.setText("Options"); increaseFont.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_EQUALS, java.awt.event.InputEvent.CTRL_MASK)); increaseFont.setText("Increase Font"); increaseFont.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { increaseFontActionPerformed(evt); } }); jMenu5.add(increaseFont); decreaseFont.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_MINUS, java.awt.event.InputEvent.CTRL_MASK)); decreaseFont.setText("Decrease Font"); decreaseFont.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { decreaseFontActionPerformed(evt); } }); jMenu5.add(decreaseFont); jMenuBar1.add(jMenu5); setJMenuBar(jMenuBar1); pack(); setLocationRelativeTo(null); }
From source file:com.nikonhacker.gui.EmulatorUI.java
@SuppressWarnings("MagicConstant") protected JMenuBar createMenuBar() { JMenuBar menuBar = new JMenuBar(); JMenuItem tmpMenuItem;/* w ww.j a v a 2 s . c om*/ //Set up the file menu. JMenu fileMenu = new JMenu("File"); fileMenu.setMnemonic(KeyEvent.VK_F); menuBar.add(fileMenu); //load image for (int chip = 0; chip < 2; chip++) { loadMenuItem[chip] = new JMenuItem("Load " + Constants.CHIP_LABEL[chip] + " firmware image"); if (chip == Constants.CHIP_FR) loadMenuItem[chip].setMnemonic(KEY_EVENT_LOAD); loadMenuItem[chip].setAccelerator(KeyStroke.getKeyStroke(KEY_EVENT_LOAD, KEY_CHIP_MODIFIER[chip])); loadMenuItem[chip].setActionCommand(COMMAND_IMAGE_LOAD[chip]); loadMenuItem[chip].addActionListener(this); fileMenu.add(loadMenuItem[chip]); } fileMenu.add(new JSeparator()); //decoder tmpMenuItem = new JMenuItem("Decode firmware"); tmpMenuItem.setMnemonic(KeyEvent.VK_D); tmpMenuItem.setActionCommand(COMMAND_DECODE); tmpMenuItem.addActionListener(this); fileMenu.add(tmpMenuItem); //encoder tmpMenuItem = new JMenuItem("Encode firmware (alpha)"); tmpMenuItem.setMnemonic(KeyEvent.VK_E); tmpMenuItem.setActionCommand(COMMAND_ENCODE); tmpMenuItem.addActionListener(this); // fileMenu.add(tmpMenuItem); fileMenu.add(new JSeparator()); //decoder tmpMenuItem = new JMenuItem("Decode lens correction data"); //tmpMenuItem.setMnemonic(KeyEvent.VK_D); tmpMenuItem.setActionCommand(COMMAND_DECODE_NKLD); tmpMenuItem.addActionListener(this); fileMenu.add(tmpMenuItem); fileMenu.add(new JSeparator()); //Save state tmpMenuItem = new JMenuItem("Save state"); tmpMenuItem.setActionCommand(COMMAND_SAVE_STATE); tmpMenuItem.addActionListener(this); fileMenu.add(tmpMenuItem); //Load state tmpMenuItem = new JMenuItem("Load state"); tmpMenuItem.setActionCommand(COMMAND_LOAD_STATE); tmpMenuItem.addActionListener(this); fileMenu.add(tmpMenuItem); fileMenu.add(new JSeparator()); //quit tmpMenuItem = new JMenuItem("Quit"); tmpMenuItem.setMnemonic(KEY_EVENT_QUIT); tmpMenuItem.setAccelerator(KeyStroke.getKeyStroke(KEY_EVENT_QUIT, ActionEvent.ALT_MASK)); tmpMenuItem.setActionCommand(COMMAND_QUIT); tmpMenuItem.addActionListener(this); fileMenu.add(tmpMenuItem); //Set up the run menu. JMenu runMenu = new JMenu("Run"); runMenu.setMnemonic(KeyEvent.VK_R); menuBar.add(runMenu); for (int chip = 0; chip < 2; chip++) { //emulator play playMenuItem[chip] = new JMenuItem("Start (or resume) " + Constants.CHIP_LABEL[chip] + " emulator"); playMenuItem[chip].setAccelerator(KeyStroke.getKeyStroke(KEY_EVENT_RUN[chip], ActionEvent.ALT_MASK)); playMenuItem[chip].setActionCommand(COMMAND_EMULATOR_PLAY[chip]); playMenuItem[chip].addActionListener(this); runMenu.add(playMenuItem[chip]); //emulator debug debugMenuItem[chip] = new JMenuItem("Debug " + Constants.CHIP_LABEL[chip] + " emulator"); debugMenuItem[chip].setAccelerator(KeyStroke.getKeyStroke(KEY_EVENT_DEBUG[chip], ActionEvent.ALT_MASK)); debugMenuItem[chip].setActionCommand(COMMAND_EMULATOR_DEBUG[chip]); debugMenuItem[chip].addActionListener(this); runMenu.add(debugMenuItem[chip]); //emulator pause pauseMenuItem[chip] = new JMenuItem("Pause " + Constants.CHIP_LABEL[chip] + " emulator"); pauseMenuItem[chip].setAccelerator(KeyStroke.getKeyStroke(KEY_EVENT_PAUSE[chip], ActionEvent.ALT_MASK)); pauseMenuItem[chip].setActionCommand(COMMAND_EMULATOR_PAUSE[chip]); pauseMenuItem[chip].addActionListener(this); runMenu.add(pauseMenuItem[chip]); //emulator step stepMenuItem[chip] = new JMenuItem("Step " + Constants.CHIP_LABEL[chip] + " emulator"); stepMenuItem[chip].setAccelerator(KeyStroke.getKeyStroke(KEY_EVENT_STEP[chip], ActionEvent.ALT_MASK)); stepMenuItem[chip].setActionCommand(COMMAND_EMULATOR_STEP[chip]); stepMenuItem[chip].addActionListener(this); runMenu.add(stepMenuItem[chip]); //emulator stop stopMenuItem[chip] = new JMenuItem("Stop and reset " + Constants.CHIP_LABEL[chip] + " emulator"); stopMenuItem[chip].setActionCommand(COMMAND_EMULATOR_STOP[chip]); stopMenuItem[chip].addActionListener(this); runMenu.add(stopMenuItem[chip]); runMenu.add(new JSeparator()); //setup breakpoints breakpointMenuItem[chip] = new JMenuItem("Setup " + Constants.CHIP_LABEL[chip] + " breakpoints"); breakpointMenuItem[chip].setActionCommand(COMMAND_SETUP_BREAKPOINTS[chip]); breakpointMenuItem[chip].addActionListener(this); runMenu.add(breakpointMenuItem[chip]); if (chip == Constants.CHIP_FR) { runMenu.add(new JSeparator()); } } //Set up the components menu. JMenu componentsMenu = new JMenu("Components"); componentsMenu.setMnemonic(KeyEvent.VK_O); menuBar.add(componentsMenu); for (int chip = 0; chip < 2; chip++) { //CPU state cpuStateMenuItem[chip] = new JCheckBoxMenuItem(Constants.CHIP_LABEL[chip] + " CPU State window"); if (chip == Constants.CHIP_FR) cpuStateMenuItem[chip].setMnemonic(KEY_EVENT_CPUSTATE); cpuStateMenuItem[chip] .setAccelerator(KeyStroke.getKeyStroke(KEY_EVENT_CPUSTATE, KEY_CHIP_MODIFIER[chip])); cpuStateMenuItem[chip].setActionCommand(COMMAND_TOGGLE_CPUSTATE_WINDOW[chip]); cpuStateMenuItem[chip].addActionListener(this); componentsMenu.add(cpuStateMenuItem[chip]); //memory hex editor memoryHexEditorMenuItem[chip] = new JCheckBoxMenuItem( Constants.CHIP_LABEL[chip] + " Memory hex editor"); if (chip == Constants.CHIP_FR) memoryHexEditorMenuItem[chip].setMnemonic(KEY_EVENT_MEMORY); memoryHexEditorMenuItem[chip] .setAccelerator(KeyStroke.getKeyStroke(KEY_EVENT_MEMORY, KEY_CHIP_MODIFIER[chip])); memoryHexEditorMenuItem[chip].setActionCommand(COMMAND_TOGGLE_MEMORY_HEX_EDITOR[chip]); memoryHexEditorMenuItem[chip].addActionListener(this); componentsMenu.add(memoryHexEditorMenuItem[chip]); //Interrupt controller interruptControllerMenuItem[chip] = new JCheckBoxMenuItem( Constants.CHIP_LABEL[chip] + " interrupt controller"); interruptControllerMenuItem[chip].setActionCommand(COMMAND_TOGGLE_INTERRUPT_CONTROLLER_WINDOW[chip]); interruptControllerMenuItem[chip].addActionListener(this); componentsMenu.add(interruptControllerMenuItem[chip]); //Programmble timers programmableTimersMenuItem[chip] = new JCheckBoxMenuItem( Constants.CHIP_LABEL[chip] + " programmable timers"); programmableTimersMenuItem[chip].setActionCommand(COMMAND_TOGGLE_PROGRAMMABLE_TIMERS_WINDOW[chip]); programmableTimersMenuItem[chip].addActionListener(this); componentsMenu.add(programmableTimersMenuItem[chip]); //Serial interface serialInterfacesMenuItem[chip] = new JCheckBoxMenuItem( Constants.CHIP_LABEL[chip] + " serial interfaces"); serialInterfacesMenuItem[chip].setActionCommand(COMMAND_TOGGLE_SERIAL_INTERFACES[chip]); serialInterfacesMenuItem[chip].addActionListener(this); componentsMenu.add(serialInterfacesMenuItem[chip]); // I/O ioPortsMenuItem[chip] = new JCheckBoxMenuItem(Constants.CHIP_LABEL[chip] + " I/O ports"); ioPortsMenuItem[chip].setActionCommand(COMMAND_TOGGLE_IO_PORTS_WINDOW[chip]); ioPortsMenuItem[chip].addActionListener(this); componentsMenu.add(ioPortsMenuItem[chip]); //Serial devices serialDevicesMenuItem[chip] = new JCheckBoxMenuItem(Constants.CHIP_LABEL[chip] + " serial devices"); serialDevicesMenuItem[chip].setActionCommand(COMMAND_TOGGLE_SERIAL_DEVICES[chip]); serialDevicesMenuItem[chip].addActionListener(this); componentsMenu.add(serialDevicesMenuItem[chip]); componentsMenu.add(new JSeparator()); } //screen emulator: FR80 only screenEmulatorMenuItem = new JCheckBoxMenuItem("Screen emulator (FR only)"); screenEmulatorMenuItem.setMnemonic(KEY_EVENT_SCREEN); screenEmulatorMenuItem.setAccelerator(KeyStroke.getKeyStroke(KEY_EVENT_SCREEN, ActionEvent.ALT_MASK)); screenEmulatorMenuItem.setActionCommand(COMMAND_TOGGLE_SCREEN_EMULATOR); screenEmulatorMenuItem.addActionListener(this); componentsMenu.add(screenEmulatorMenuItem); //Component 4006: FR80 only component4006MenuItem = new JCheckBoxMenuItem("Component 4006 window (FR only)"); component4006MenuItem.setMnemonic(KeyEvent.VK_4); component4006MenuItem.setActionCommand(COMMAND_TOGGLE_COMPONENT_4006_WINDOW); component4006MenuItem.addActionListener(this); componentsMenu.add(component4006MenuItem); componentsMenu.add(new JSeparator()); //A/D converter: TX19 only for now adConverterMenuItem[Constants.CHIP_TX] = new JCheckBoxMenuItem( Constants.CHIP_LABEL[Constants.CHIP_TX] + " A/D converter (TX only)"); adConverterMenuItem[Constants.CHIP_TX].setActionCommand(COMMAND_TOGGLE_AD_CONVERTER[Constants.CHIP_TX]); adConverterMenuItem[Constants.CHIP_TX].addActionListener(this); componentsMenu.add(adConverterMenuItem[Constants.CHIP_TX]); //Front panel: TX19 only frontPanelMenuItem = new JCheckBoxMenuItem("Front panel (TX only)"); frontPanelMenuItem.setActionCommand(COMMAND_TOGGLE_FRONT_PANEL); frontPanelMenuItem.addActionListener(this); componentsMenu.add(frontPanelMenuItem); //Set up the trace menu. JMenu traceMenu = new JMenu("Trace"); traceMenu.setMnemonic(KeyEvent.VK_C); menuBar.add(traceMenu); for (int chip = 0; chip < 2; chip++) { //memory activity viewer memoryActivityViewerMenuItem[chip] = new JCheckBoxMenuItem( Constants.CHIP_LABEL[chip] + " Memory activity viewer"); memoryActivityViewerMenuItem[chip].setActionCommand(COMMAND_TOGGLE_MEMORY_ACTIVITY_VIEWER[chip]); memoryActivityViewerMenuItem[chip].addActionListener(this); traceMenu.add(memoryActivityViewerMenuItem[chip]); //disassembly disassemblyMenuItem[chip] = new JCheckBoxMenuItem( "Real-time " + Constants.CHIP_LABEL[chip] + " disassembly log"); if (chip == Constants.CHIP_FR) disassemblyMenuItem[chip].setMnemonic(KEY_EVENT_REALTIME_DISASSEMBLY); disassemblyMenuItem[chip].setAccelerator( KeyStroke.getKeyStroke(KEY_EVENT_REALTIME_DISASSEMBLY, KEY_CHIP_MODIFIER[chip])); disassemblyMenuItem[chip].setActionCommand(COMMAND_TOGGLE_DISASSEMBLY_WINDOW[chip]); disassemblyMenuItem[chip].addActionListener(this); traceMenu.add(disassemblyMenuItem[chip]); //Custom logger customMemoryRangeLoggerMenuItem[chip] = new JCheckBoxMenuItem( "Custom " + Constants.CHIP_LABEL[chip] + " logger window"); customMemoryRangeLoggerMenuItem[chip].setActionCommand(COMMAND_TOGGLE_CUSTOM_LOGGER_WINDOW[chip]); customMemoryRangeLoggerMenuItem[chip].addActionListener(this); traceMenu.add(customMemoryRangeLoggerMenuItem[chip]); //Call Stack logger callStackMenuItem[chip] = new JCheckBoxMenuItem(Constants.CHIP_LABEL[chip] + " Call stack logger"); callStackMenuItem[chip].setActionCommand(COMMAND_TOGGLE_CALL_STACK_WINDOW[chip]); callStackMenuItem[chip].addActionListener(this); traceMenu.add(callStackMenuItem[chip]); //ITRON Object iTronObjectMenuItem[chip] = new JCheckBoxMenuItem("ITRON " + Constants.CHIP_LABEL[chip] + " Objects"); iTronObjectMenuItem[chip].setActionCommand(COMMAND_TOGGLE_ITRON_OBJECT_WINDOW[chip]); iTronObjectMenuItem[chip].addActionListener(this); traceMenu.add(iTronObjectMenuItem[chip]); //ITRON Return Stack iTronReturnStackMenuItem[chip] = new JCheckBoxMenuItem( "ITRON " + Constants.CHIP_LABEL[chip] + " Return stack"); iTronReturnStackMenuItem[chip].setActionCommand(COMMAND_TOGGLE_ITRON_RETURN_STACK_WINDOW[chip]); iTronReturnStackMenuItem[chip].addActionListener(this); traceMenu.add(iTronReturnStackMenuItem[chip]); traceMenu.add(new JSeparator()); } //Set up the source menu. JMenu sourceMenu = new JMenu("Source"); sourceMenu.setMnemonic(KEY_EVENT_SCREEN); menuBar.add(sourceMenu); // FR syscall symbols generateSysSymbolsMenuItem = new JMenuItem( "Generate " + Constants.CHIP_LABEL[Constants.CHIP_FR] + " system call symbols"); generateSysSymbolsMenuItem.setActionCommand(COMMAND_GENERATE_SYS_SYMBOLS); generateSysSymbolsMenuItem.addActionListener(this); sourceMenu.add(generateSysSymbolsMenuItem); for (int chip = 0; chip < 2; chip++) { sourceMenu.add(new JSeparator()); //analyse / disassemble analyseMenuItem[chip] = new JMenuItem("Analyse / Disassemble " + Constants.CHIP_LABEL[chip] + " code"); analyseMenuItem[chip].setActionCommand(COMMAND_ANALYSE_DISASSEMBLE[chip]); analyseMenuItem[chip].addActionListener(this); sourceMenu.add(analyseMenuItem[chip]); sourceMenu.add(new JSeparator()); //code structure codeStructureMenuItem[chip] = new JCheckBoxMenuItem(Constants.CHIP_LABEL[chip] + " code structure"); codeStructureMenuItem[chip].setActionCommand(COMMAND_TOGGLE_CODE_STRUCTURE_WINDOW[chip]); codeStructureMenuItem[chip].addActionListener(this); sourceMenu.add(codeStructureMenuItem[chip]); //source code sourceCodeMenuItem[chip] = new JCheckBoxMenuItem(Constants.CHIP_LABEL[chip] + " source code"); if (chip == Constants.CHIP_FR) sourceCodeMenuItem[chip].setMnemonic(KEY_EVENT_SOURCE); sourceCodeMenuItem[chip] .setAccelerator(KeyStroke.getKeyStroke(KEY_EVENT_SOURCE, KEY_CHIP_MODIFIER[chip])); sourceCodeMenuItem[chip].setActionCommand(COMMAND_TOGGLE_SOURCE_CODE_WINDOW[chip]); sourceCodeMenuItem[chip].addActionListener(this); sourceMenu.add(sourceCodeMenuItem[chip]); if (chip == Constants.CHIP_FR) { sourceMenu.add(new JSeparator()); } } //Set up the tools menu. JMenu toolsMenu = new JMenu("Tools"); toolsMenu.setMnemonic(KeyEvent.VK_T); menuBar.add(toolsMenu); for (int chip = 0; chip < 2; chip++) { // save/load memory area saveLoadMemoryMenuItem[chip] = new JMenuItem( "Save/Load " + Constants.CHIP_LABEL[chip] + " memory area"); saveLoadMemoryMenuItem[chip].setActionCommand(COMMAND_SAVE_LOAD_MEMORY[chip]); saveLoadMemoryMenuItem[chip].addActionListener(this); toolsMenu.add(saveLoadMemoryMenuItem[chip]); //chip options chipOptionsMenuItem[chip] = new JMenuItem(Constants.CHIP_LABEL[chip] + " options"); chipOptionsMenuItem[chip].setActionCommand(COMMAND_CHIP_OPTIONS[chip]); chipOptionsMenuItem[chip].addActionListener(this); toolsMenu.add(chipOptionsMenuItem[chip]); toolsMenu.add(new JSeparator()); } //disassembly options uiOptionsMenuItem = new JMenuItem("Preferences"); uiOptionsMenuItem.setActionCommand(COMMAND_UI_OPTIONS); uiOptionsMenuItem.addActionListener(this); toolsMenu.add(uiOptionsMenuItem); //Set up the help menu. JMenu helpMenu = new JMenu("?"); menuBar.add(helpMenu); //about JMenuItem aboutMenuItem = new JMenuItem("About"); aboutMenuItem.setActionCommand(COMMAND_ABOUT); aboutMenuItem.addActionListener(this); helpMenu.add(aboutMenuItem); // JMenuItem testMenuItem = new JMenuItem("Test"); // testMenuItem.setActionCommand(COMMAND_TEST); // testMenuItem.addActionListener(this); // helpMenu.add(testMenuItem); // Global "Keep in sync" setting menuBar.add(Box.createHorizontalGlue()); final JCheckBox syncEmulators = new JCheckBox("Keep emulators in sync"); syncEmulators.setSelected(prefs.isSyncPlay()); framework.getMasterClock().setSyncPlay(prefs.isSyncPlay()); syncEmulators.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { prefs.setSyncPlay(syncEmulators.isSelected()); framework.getMasterClock().setSyncPlay(syncEmulators.isSelected()); } }); menuBar.add(syncEmulators); return menuBar; }
From source file:org.jab.docsearch.DocSearch.java
private JToolBar createToolBar() { // tool bar/*from w ww. j a v a 2 s .c om*/ JToolBar toolBar = new JToolBar(); // file open JButton buttonOpen = new JButton(new ImageIcon(getClass().getResource("/icons/fileopen.png"))); buttonOpen.setToolTipText(I18n.getString("tooltip.open")); buttonOpen.setActionCommand("ac_open"); buttonOpen.addActionListener(this); buttonOpen.setMnemonic(KeyEvent.VK_O); buttonOpen.setEnabled(!env.isWebStart()); // disable in WebStart toolBar.add(buttonOpen); // file save JButton buttonSave = new JButton(new ImageIcon(getClass().getResource("/icons/filesave.png"))); buttonSave.setToolTipText(I18n.getString("tooltip.save")); buttonSave.setActionCommand("ac_save"); buttonSave.addActionListener(this); buttonSave.setMnemonic(KeyEvent.VK_S); buttonSave.setEnabled(!env.isWebStart()); // disable in WebStart toolBar.add(buttonSave); toolBar.addSeparator(); // open browser JButton buttonBrowser = new JButton(new ImageIcon(getClass().getResource("/icons/html.png"))); buttonBrowser.setToolTipText(I18n.getString("tooltip.open_in_browser")); buttonBrowser.setActionCommand("ac_openinbrowser"); buttonBrowser.addActionListener(this); buttonBrowser.setMnemonic(KeyEvent.VK_E); buttonBrowser.setEnabled(!env.isWebStart()); // disable in WebStart toolBar.add(buttonBrowser); toolBar.addSeparator(); // home JButton buttonHome = new JButton(new ImageIcon(getClass().getResource("/icons/home.png"))); buttonHome.setToolTipText(I18n.getString("tooltip.home")); buttonHome.setActionCommand("ac_home"); buttonHome.addActionListener(this); buttonHome.setMnemonic(KeyEvent.VK_H); toolBar.add(buttonHome); // refresh JButton buttonRefresh = new JButton(new ImageIcon(getClass().getResource("/icons/refresh.png"))); buttonRefresh.setToolTipText(I18n.getString("tooltip.refresh")); buttonRefresh.setActionCommand("ac_refresh"); buttonRefresh.addActionListener(this); buttonRefresh.setMnemonic(KeyEvent.VK_L); toolBar.add(buttonRefresh); toolBar.addSeparator(); // result JButton buttonResult = new JButton(new ImageIcon(getClass().getResource("/icons/search_results.png"))); buttonResult.setToolTipText(I18n.getString("tooltip.results")); buttonResult.setActionCommand("ac_result"); buttonResult.addActionListener(this); buttonResult.setMnemonic(KeyEvent.VK_R); toolBar.add(buttonResult); toolBar.addSeparator(); // bookmark JButton buttonBookMark = new JButton(new ImageIcon(getClass().getResource("/icons/bookmark.png"))); buttonBookMark.setToolTipText(I18n.getString("tooltip.add_bookmark")); buttonBookMark.setActionCommand("ac_addbookmark"); buttonBookMark.addActionListener(this); buttonBookMark.setMnemonic(KeyEvent.VK_M); toolBar.add(buttonBookMark); toolBar.addSeparator(); // print JButton buttonPrint = new JButton(new ImageIcon(getClass().getResource("/icons/fileprint.png"))); buttonPrint.setToolTipText(I18n.getString("tooltip.print")); buttonPrint.setActionCommand("ac_print"); buttonPrint.addActionListener(this); buttonPrint.setMnemonic(KeyEvent.VK_P); toolBar.add(buttonPrint); toolBar.addSeparator(); // setting JButton buttonSetting = new JButton(new ImageIcon(getClass().getResource("/icons/configure.png"))); buttonSetting.setToolTipText(I18n.getString("tooltip.settings")); buttonSetting.setActionCommand("ac_settings"); buttonSetting.addActionListener(this); buttonSetting.setMnemonic(KeyEvent.VK_HOME); toolBar.add(buttonSetting); toolBar.addSeparator(); // stop buttonStop = new JButton(new ImageIcon(getClass().getResource("/icons/stop.png"))); buttonStop.setToolTipText(I18n.getString("tooltip.stop")); buttonStop.setActionCommand("ac_stop"); buttonStop.addActionListener(this); buttonStop.setMnemonic(KeyEvent.VK_X); toolBar.add(buttonStop); toolBar.addSeparator(); // toolBar.setFloatable(false); // finished return toolBar; }
From source file:org.sikuli.ide.SikuliIDE.java
private void initEditMenu() throws NoSuchMethodException { int scMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); _editMenu.setMnemonic(java.awt.event.KeyEvent.VK_E); JMenuItem undoItem = _editMenu.add(_undoAction); undoItem.setAccelerator(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Z, scMask)); JMenuItem redoItem = _editMenu.add(_redoAction); redoItem.setAccelerator(//w w w . ja v a 2 s.com KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Z, scMask | InputEvent.SHIFT_MASK)); _editMenu.addSeparator(); _editMenu.add(createMenuItem(_I("menuEditCut"), KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, scMask), new EditAction(EditAction.CUT))); _editMenu.add(createMenuItem(_I("menuEditCopy"), KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, scMask), new EditAction(EditAction.COPY))); _editMenu.add(createMenuItem(_I("menuEditPaste"), KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_V, scMask), new EditAction(EditAction.PASTE))); _editMenu.add(createMenuItem(_I("menuEditSelectAll"), KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, scMask), new EditAction(EditAction.SELECT_ALL))); if (!Settings.isMac10()) { _editMenu.addSeparator(); JMenu findMenu = new JMenu(_I("menuFind")); _findHelper = new FindAction(); findMenu.setMnemonic(KeyEvent.VK_F); findMenu.add(createMenuItem(_I("menuFindFind"), KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, scMask), new FindAction(FindAction.FIND))); findMenu.add(createMenuItem(_I("menuFindFindNext"), KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_G, scMask), new FindAction(FindAction.FIND_NEXT))); findMenu.add(createMenuItem(_I("menuFindFindPrev"), KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_G, scMask | InputEvent.SHIFT_MASK), new FindAction(FindAction.FIND_PREV))); _editMenu.add(findMenu); } _editMenu.addSeparator(); _editMenu.add(createMenuItem(_I("menuEditIndent"), KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_TAB, 0), new EditAction(EditAction.INDENT))); _editMenu.add(createMenuItem(_I("menuEditUnIndent"), KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_TAB, InputEvent.SHIFT_MASK), new EditAction(EditAction.UNINDENT))); }
From source file:corelyzer.ui.CorelyzerApp.java
private void setupMenuStuff() { menuBar = new JMenuBar(); // Create File Menu JMenu fileMenu = new JMenu("File"); fileMenu.setMnemonic(KeyEvent.VK_F); JMenuItem createSessionMenuItem = new JMenuItem("Create a Session", KeyEvent.VK_N); createSessionMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, MENU_MASK)); createSessionMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { controller.createSession();/*from w ww. j av a2 s . co m*/ } }); createSessionMenuItem.setEnabled(true); fileMenu.add(createSessionMenuItem); createTrackMenuItem = new JMenuItem("Create a Track", KeyEvent.VK_T); createTrackMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_T, MENU_MASK)); createTrackMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { controller.createTrack(); } }); createTrackMenuItem.setEnabled(false); fileMenu.add(createTrackMenuItem); fileMenu.addSeparator(); // Images JMenu loadImageMenu = new JMenu("Load Images"); loadImageMenuItem = new JMenuItem("Open Local Image Files...", KeyEvent.VK_M); loadImageMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, MENU_MASK)); loadImageMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { controller.loadImageAction(); } }); loadImageMenu.add(loadImageMenuItem); // "Auto-load" 4/25/2012 brg JMenuItem autoLoadImageMenuItem = new JMenuItem("Open Image Listing..."); autoLoadImageMenuItem.setEnabled(true); autoLoadImageMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { controller.loadImageListingAction(); } }); loadImageMenu.add(autoLoadImageMenuItem); // online image services JMenuItem chronosMenuItem = new JMenuItem("Online Image Services..."); loadImageMenu.add(chronosMenuItem); chronosMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { IODPListsDialog d = new IODPListsDialog(getMainFrame()); d.pack(); d.setSize(800, 600); d.setLocationRelativeTo(getMainFrame()); d.setVisibleTab(1); d.setVisible(true); } }); fileMenu.add(loadImageMenu); // Numbercal data (plots) JMenu loadDataMenu = new JMenu("Load Data"); loadDataMenuItem = new JMenuItem("Open Local Dataset Files", KeyEvent.VK_D); loadDataMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_D, MENU_MASK)); loadDataMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { Runnable r = new Runnable() { public void run() { controller.loadData(); } }; new Thread(r).start(); } }); loadDataMenu.add(loadDataMenuItem); fileMenu.add(loadDataMenu); JMenuItem quickDataImportMenuItem = new JMenuItem("Quick Data Import..."); quickDataImportMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { controller.quickDataImport(); } }); loadDataMenu.add(quickDataImportMenuItem); JMenuItem importDataMenuItem = new JMenuItem("Custom Data Import..."); importDataMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { controller.importData(); } }); loadDataMenu.add(importDataMenuItem); // LoggingDB JMenuItem loggingDBMenuItem = new JMenuItem("LDEO logging DB..."); loggingDBMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { IODPListsDialog d = new IODPListsDialog(getMainFrame()); d.pack(); d.setSize(800, 600); d.setLocationRelativeTo(getMainFrame()); d.setVisibleTab(2); d.setVisible(true); } }); loadDataMenu.add(loggingDBMenuItem); fileMenu.addSeparator(); loadStateFileMenuItem = new JMenuItem("Open a Session File", KeyEvent.VK_O); loadStateFileMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, MENU_MASK)); loadStateFileMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { controller.loadStateFile(); } }); loadStateFileMenuItem.setEnabled(false); fileMenu.add(loadStateFileMenuItem); JMenuItem saveMenuItem = new JMenuItem("Save Session", KeyEvent.VK_S); saveMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, MENU_MASK)); saveMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { controller.saveCurrentSession(); } }); fileMenu.add(saveMenuItem); JMenuItem saveStateToFileMenuItem = new JMenuItem("Save Session As...", KeyEvent.VK_S); saveStateToFileMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A, MENU_MASK)); saveStateToFileMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { controller.saveStateToFile(); } }); fileMenu.add(saveStateToFileMenuItem); // Session History recentSessionsMenu = new JMenu("Recent Sessions"); controller.refreshSessionHistoryMenu(); fileMenu.add(recentSessionsMenu); fileMenu.addSeparator(); JMenu packageMenu = new JMenu("Core Archive"); JMenuItem importMenuItem = new JMenuItem("Import..."); importMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { controller.importPackage(); } }); packageMenu.add(importMenuItem); JMenuItem exportMenuItem = new JMenuItem("Export..."); exportMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { controller.exportTheWholeScene(); } }); packageMenu.add(exportMenuItem); fileMenu.add(packageMenu); JMenu limsMenu = new JMenu("IODP"); JMenuItem allIODPLists = new JMenuItem("All IODP lists..."); allIODPLists.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { IODPListsDialog d = new IODPListsDialog(getMainFrame()); d.pack(); d.setSize(800, 600); d.setLocationRelativeTo(getMainFrame()); d.setVisible(true); } }); limsMenu.add(allIODPLists); JMenuItem loadLIMSTables = new JMenuItem("Load a section list..."); loadLIMSTables.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { IODPListsDialog d = new IODPListsDialog(getMainFrame()); d.loadLIMSTables(getMainFrame()); d.pack(); d.setSize(800, 600); d.setLocationRelativeTo(getMainFrame()); d.setVisibleTab(0); d.setVisible(true); } }); limsMenu.add(loadLIMSTables); JMenuItem loadAffineTable = new JMenuItem("Load an affine table..."); loadAffineTable.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { IODPListsDialog d = new IODPListsDialog(getMainFrame()); d.loadAAffineTable(getMainFrame()); d.pack(); d.setSize(800, 600); d.setLocationRelativeTo(getMainFrame()); d.setVisibleTab(3); d.setVisible(true); } }); limsMenu.add(loadAffineTable); JMenuItem loadSpliceTable = new JMenuItem("Load a splice table..."); loadSpliceTable.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { IODPListsDialog d = new IODPListsDialog(getMainFrame()); d.loadASpliceTable(getMainFrame()); d.pack(); d.setSize(800, 600); d.setLocationRelativeTo(getMainFrame()); d.setVisibleTab(4); d.setVisible(true); } }); limsMenu.add(loadSpliceTable); fileMenu.add(limsMenu); JMenu disMenu = new JMenu("DIS"); JMenuItem disListMenuItem = new JMenuItem("Accessing DIS..."); disListMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { DISListsDialog d = new DISListsDialog(getMainFrame()); d.pack(); d.setSize(800, 600); d.setLocationRelativeTo(getMainFrame()); d.setVisible(true); } }); JMenuItem disImport = new JMenuItem("Import..."); disImport.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { controller.disImport(); } }); JMenuItem disExport = new JMenuItem("Export..."); disExport.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { controller.disExport(); } }); JMenuItem disBatchDataLoad = new JMenuItem("Load Tab Delimited Data File..."); disBatchDataLoad.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { controller.disBatchDataLoad(); } }); disMenu.add(disListMenuItem); disMenu.add(disImport); disMenu.add(disExport); disMenu.add(disBatchDataLoad); fileMenu.add(disMenu); JMenuItem saveOutputToFileMenuItem = new JMenuItem("Export Sheets...", KeyEvent.VK_A); saveOutputToFileMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { controller.saveOutputToFile(); } }); fileMenu.add(saveOutputToFileMenuItem); fileMenu.addSeparator(); JMenuItem quitMenuItem = new JMenuItem("Quit"); fileMenu.add(quitMenuItem); quitMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, MENU_MASK)); quitMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { controller.quit(); } }); menuBar.add(fileMenu); // Create Edit Menu JMenu editMenu = new JMenu("Edit"); editMenu.setMnemonic(KeyEvent.VK_E); JMenuItem clearImageCacheMenuItem = new JMenuItem("Clear Image Cache...", KeyEvent.VK_I); clearImageCacheMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { controller.clearImageCache(); } }); editMenu.add(clearImageCacheMenuItem); editMenu.addSeparator(); JMenuItem depthDirection = new JMenuItem("Switch Depth Direction", KeyEvent.VK_K); depthDirection.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_K, MENU_MASK)); depthDirection.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { boolean b = SceneGraph.getDepthOrientation(); SceneGraph.setDepthOrientation(!b); CorelyzerApp.getApp().updateGLWindows(); } }); editMenu.add(depthDirection); JMenuItem tour = new JMenuItem("Tour..."); tour.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { CRNavigationSetupDialog dlg = new CRNavigationSetupDialog(); dlg.pack(); dlg.setLocationRelativeTo(getApp().getMainFrame()); dlg.setAlwaysOnTop(true); dlg.setVisible(true); } }); editMenu.add(tour); editMenu.addSeparator(); JMenuItem preferencesMenuItem = new JMenuItem("Preferences..."); editMenu.add(preferencesMenuItem); preferencesMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { controller.doPreferences(); } }); menuBar.add(editMenu); // Create Share Menu JMenu shareMenu = new JMenu("Share"); JMenuItem publishMenuItem = new JMenuItem("Publish..."); publishMenuItem.setEnabled(true); publishMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { controller.publishASession(); } }); shareMenu.add(publishMenuItem); JMenuItem listMenuItem = new JMenuItem("List..."); listMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { controller.listSessions(); } }); shareMenu.add(listMenuItem); shareMenu.addSeparator(); friendsMenu = new JMenu("Friends"); shareMenu.add(friendsMenu); menuBar.add(shareMenu); // Create Debug Menu JMenu debugMenu = new JMenu("Debug"); debugMenu.setMnemonic(KeyEvent.VK_D); JMenuItem matchTestMenuItem = new JMenuItem("Match-Test", KeyEvent.VK_B); matchTestMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { controller.testAndMatch(); } }); debugMenu.add(matchTestMenuItem); if ((System.getenv("DEBUG") != null) && System.getenv("DEBUG").equals("YES")) { menuBar.add(shareMenu); } // Create the Plugin Menu pluginMenu = new JMenu("Plugins"); menuBar.add(pluginMenu); pluginMenuItemVec = new Vector<JMenuItem>(); // Lists JMenu listsMenu = new JMenu("Lists"); JMenuItem iodpLists = new JMenuItem("IODP lists..."); iodpLists.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { IODPListsDialog d = new IODPListsDialog(getMainFrame()); d.pack(); d.setSize(800, 600); d.setLocationRelativeTo(getMainFrame()); d.setVisible(true); } }); listsMenu.add(iodpLists); JMenuItem disLists = new JMenuItem("DIS lists..."); disLists.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { DISListsDialog d = new DISListsDialog(getMainFrame()); d.pack(); d.setSize(800, 600); d.setLocationRelativeTo(getMainFrame()); d.setVisible(true); } }); listsMenu.add(disLists); JMenu annotLists = new JMenu("Annotation"); JMenuItem freeformsItem = new JMenuItem("Default"); freeformsItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { FreeformAnnotationListDialog dlg = new FreeformAnnotationListDialog(getApp().getMainFrame()); dlg.pack(); dlg.setLocationRelativeTo(getApp().getMainFrame()); dlg.onRefresh(); dlg.setAlwaysOnTop(true); dlg.setVisible(true); } }); annotLists.add(freeformsItem); JMenuItem clastListItem = new JMenuItem("Clast"); clastListItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { ClastStatisticsDialog dlg = new ClastStatisticsDialog(getApp().getMainFrame()); dlg.pack(); dlg.setLocationRelativeTo(getApp().getMainFrame()); dlg.onRefresh(); dlg.setAlwaysOnTop(true); dlg.setVisible(true); } }); annotLists.add(clastListItem); JMenuItem sampleReqsItem = new JMenuItem("Sample"); sampleReqsItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { SampleRequestListDialog dlg = new SampleRequestListDialog(getApp().getMainFrame()); dlg.pack(); dlg.setLocationRelativeTo(getApp().getMainFrame()); dlg.onRefresh(); dlg.setAlwaysOnTop(true); dlg.setVisible(true); } }); annotLists.add(sampleReqsItem); listsMenu.add(annotLists); menuBar.add(listsMenu); // Create Tools Menu JMenu toolsMenu = new JMenu("Tools"); JMenuItem wholeCoreViewerMenuItem = new JMenuItem("Get 3D Whole Core Imagery Viewer..."); wholeCoreViewerMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { try { String app; String url = "http://www.evl.uic.edu/cavern/corewall/SciVizCore/"; if (System.getProperty("os.name").toLowerCase().contains("windows")) { app = "cmd.exe /c explorer " + url; Runtime.getRuntime().exec(app); } else { app = "open"; String[] cmd = { app, url }; Runtime.getRuntime().exec(cmd); } } catch (IOException ex) { System.err.println("IOException in opening SciVizCore link"); } } }); toolsMenu.add(wholeCoreViewerMenuItem); // DEBUG String debug = System.getProperty("DEBUG"); if ((debug != null) && System.getProperty("DEBUG").equals("true")) { JMenuItem gcItem = new JMenuItem("GC"); gcItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { long mem0 = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory(); System.out.println("- B4 mem:\t" + mem0 / 1000000.0f); int trials = 10000; for (int i = 0; i < trials; i++) { updateGLWindows(); } long mem1 = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory(); System.out.println("- " + trials + " mem:\t" + mem1 / 1000000.0f); System.gc(); System.gc(); System.gc(); long mem2 = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory(); System.out.println("- AferGC mem:\t" + mem2 / 1000000.0f); } }); toolsMenu.add(gcItem); } menuBar.add(toolsMenu); // Create Help Menu // Create JavaHelp hooks File helpSet = new File("help/jhelpset.hs"); HelpSet hs = null; try { URL hsURL = helpSet.toURI().toURL(); hs = new HelpSet(null, hsURL); } catch (HelpSetException e) { JOptionPane.showMessageDialog(getMainFrame(), "Cannot find help: format error."); e.printStackTrace(); } catch (MalformedURLException e) { JOptionPane.showMessageDialog(getMainFrame(), "Cannot find help: malformed URL."); e.printStackTrace(); } // Help UI JMenu helpMenu = new JMenu("Help"); JMenuItem helpMenuItem = new JMenuItem("Help", KeyEvent.VK_H); if (hs != null) { HelpBroker hb = hs.createHelpBroker(); helpActionListener = new CSH.DisplayHelpFromSource(hb); helpMenuItem.addActionListener(helpActionListener); } else { helpMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { controller.helpAction(); } }); } helpMenu.add(helpMenuItem); helpMenu.addSeparator(); JMenuItem aboutMenuItem = new JMenuItem("About Corelyzer"); helpMenu.add(aboutMenuItem); aboutMenuItem.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent event) { controller.about(); } }); menuBar.add(helpMenu); mainFrame.setJMenuBar(menuBar); }
From source file:br.org.acessobrasil.ases.ferramentas_de_reparo.vista.label.PainelLabel.java
/** * Cria o menu editar do Frame Principal * /*from w ww . j a v a 2 s . c o m*/ * @param menu */ private JMenu criaMenuEditar() { JMenu menu = new JMenu(GERAL.EDITAR); menu.setBackground(parentFrame.corDefault); menu.setMnemonic('E'); menu.setMnemonic(KeyEvent.VK_E); JMenuItem btnContraste = new JMenuItem(GERAL.ALTERAR_CONTRASTE); btnContraste.addActionListener(this); btnContraste.setActionCommand("Contraste"); // btnAumenta.setMnemonic('F'); // btnAumenta.setMnemonic(KeyEvent.VK_F); // btnAumenta.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ADD, // ActionEvent.CTRL_MASK)); btnContraste.setToolTipText(GERAL.DICA_CONTRASTE); btnContraste.getAccessibleContext().setAccessibleDescription(GERAL.DICA_CONTRASTE); menu.add(btnContraste); JMenuItem btnAumenta = new JMenuItem(GERAL.AUMENTA_FONTE); btnAumenta.addActionListener(this); btnAumenta.setActionCommand("AumentaFonte"); // btnAumenta.setMnemonic('F'); // btnAumenta.setMnemonic(KeyEvent.VK_F); btnAumenta.setAccelerator( javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ADD, ActionEvent.CTRL_MASK)); btnAumenta.setToolTipText(GERAL.DICA_AUMENTA_FONTE); btnAumenta.getAccessibleContext().setAccessibleDescription(GERAL.DICA_AUMENTA_FONTE); menu.add(btnAumenta); JMenuItem btnDiminui = new JMenuItem(GERAL.DIMINUI_FONTE); btnDiminui.addActionListener(this); btnDiminui.setActionCommand("DiminuiFonte"); // btnDiminui.setMnemonic('F'); // btnDiminui.setMnemonic(KeyEvent.VK_F); btnDiminui.setAccelerator( javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_SUBTRACT, ActionEvent.CTRL_MASK)); btnDiminui.setToolTipText(GERAL.DICA_DIMINUI_FONTE); btnDiminui.getAccessibleContext().setAccessibleDescription(GERAL.DICA_DIMINUI_FONTE); menu.add(btnDiminui); menu.add(new JSeparator()); JMenuItem btnProcurar = new JMenuItem(GERAL.PROCURAR); btnProcurar.addActionListener(this); btnProcurar.setActionCommand("Procurar"); btnProcurar.setMnemonic('P'); btnProcurar.setMnemonic(KeyEvent.VK_P); btnProcurar.setAccelerator( javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, ActionEvent.CTRL_MASK)); btnProcurar.setToolTipText(GERAL.DICA_PROCURAR); btnProcurar.getAccessibleContext().setAccessibleDescription(GERAL.DICA_PROCURAR); menu.add(btnProcurar); JMenuItem btnSelecionarTudo = new JMenuItem(GERAL.SELECIONAR_TUDO); btnSelecionarTudo.addActionListener(this); btnSelecionarTudo.setActionCommand("SelecionarTudo"); btnSelecionarTudo.setMnemonic('T'); btnSelecionarTudo.setMnemonic(KeyEvent.VK_T); btnSelecionarTudo.setAccelerator( javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_T, ActionEvent.CTRL_MASK)); btnSelecionarTudo.setToolTipText(GERAL.DICA_SELECIONAR_TODO_CSS); btnSelecionarTudo.getAccessibleContext().setAccessibleDescription(GERAL.DICA_SELECIONAR_TODO_CSS); menu.add(btnSelecionarTudo); JMenuItem btnDesfazer = new JMenuItem(GERAL.DESFAZER); btnDesfazer.addActionListener(this); btnDesfazer.setActionCommand("Desfazer"); btnDesfazer.setMnemonic('z'); btnDesfazer.setMnemonic(KeyEvent.VK_Z); btnDesfazer.getAccessibleContext().setAccessibleDescription(GERAL.DICA_DESFAZER); btnDesfazer.setAccelerator( javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Z, ActionEvent.CTRL_MASK)); menu.add(btnDesfazer); menu.setEnabled(true); return menu; }
From source file:savant.view.swing.Savant.java
private void initMenu() { loadGenomeItem.setAccelerator(/*from w w w . ja va 2 s .c o m*/ javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_G, MiscUtils.MENU_MASK)); loadFromFileItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_T, MiscUtils.MENU_MASK)); loadFromURLItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U, MiscUtils.MENU_MASK)); loadFromDataSourcePluginItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, MiscUtils.MENU_MASK)); openProjectItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, MiscUtils.MENU_MASK)); saveProjectItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, MiscUtils.MENU_MASK)); saveProjectAsItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, MiscUtils.MENU_MASK | java.awt.event.InputEvent.SHIFT_MASK)); formatItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, MiscUtils.MENU_MASK)); exitItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Q, MiscUtils.MENU_MASK)); undoItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Z, MiscUtils.MENU_MASK)); redoItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Y, MiscUtils.MENU_MASK)); bookmarkItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_B, MiscUtils.MENU_MASK)); navigationItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R, java.awt.event.InputEvent.SHIFT_MASK | MiscUtils.MENU_MASK)); panLeftItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_LEFT, java.awt.event.InputEvent.SHIFT_MASK)); panRightItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_RIGHT, java.awt.event.InputEvent.SHIFT_MASK)); zoomInItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_UP, java.awt.event.InputEvent.SHIFT_MASK)); zoomOutItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_DOWN, java.awt.event.InputEvent.SHIFT_MASK)); toStartItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_HOME, java.awt.event.InputEvent.SHIFT_MASK)); toEndItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_END, java.awt.event.InputEvent.SHIFT_MASK)); preferencesItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, MiscUtils.MENU_MASK)); crosshairItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_J, MiscUtils.MENU_MASK)); plumblineItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_K, MiscUtils.MENU_MASK)); spotlightItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, MiscUtils.MENU_MASK)); bookmarksItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_B, MiscUtils.MENU_MASK | java.awt.event.InputEvent.SHIFT_MASK)); genomeItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, MiscUtils.MENU_MASK | java.awt.event.InputEvent.SHIFT_MASK)); rulerItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, MiscUtils.MENU_MASK | java.awt.event.InputEvent.SHIFT_MASK)); statusBarItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, MiscUtils.MENU_MASK | java.awt.event.InputEvent.SHIFT_MASK)); pluginToolbarItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_T, MiscUtils.MENU_MASK | java.awt.event.InputEvent.SHIFT_MASK)); exportItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_I, MiscUtils.MENU_MASK)); if (!Desktop.isDesktopSupported() || !Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) { tutorialsItem.setEnabled(false); userManualItem.setEnabled(false); websiteItem.setEnabled(false); } initBrowseMenu(); try { RecentTracksController.getInstance().populateMenu(recentTrackMenu); RecentProjectsController.getInstance().populateMenu(recentProjectMenu); } catch (IOException ex) { LOG.error("Unable to populate Recent Items menu.", ex); } }
From source file:edu.ku.brc.ui.UIRegistry.java
public JMenu createEditMenu() { JMenu menu = new JMenu(getResourceString("EDIT")); menu.setMnemonic(KeyEvent.VK_E); // Undo and redo are actions of our own creation. undoAction = (UndoAction) makeAction(UndoAction.class, this, "Undo", null, null, new Integer(KeyEvent.VK_Z), KeyStroke.getKeyStroke(KeyEvent.VK_Z, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); register(UNDO, menu.add(undoAction)); actionMap.put(UNDO, undoAction);// www .j a va 2s. c o m redoAction = (RedoAction) makeAction(RedoAction.class, this, "Redo", null, null, new Integer(KeyEvent.VK_Y), KeyStroke.getKeyStroke(KeyEvent.VK_Y, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); register(REDO, menu.add(redoAction)); actionMap.put(REDO, redoAction); menu.addSeparator(); // These actions come from the default editor kit. Get the ones we want // and stick them in the menu. Action cutAction = makeAction(DefaultEditorKit.CutAction.class, null, "Cut", null, "Cut selection to clipboard", // I18N ???? new Integer(KeyEvent.VK_X), KeyStroke.getKeyStroke(KeyEvent.VK_X, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); register(CUT, menu.add(cutAction)); cutAction.setEnabled(false); actionMap.put(CUT, cutAction); Action copyAction = makeAction(DefaultEditorKit.CopyAction.class, null, "Copy", null, "Copy selection to clipboard", new Integer(KeyEvent.VK_C), KeyStroke.getKeyStroke(KeyEvent.VK_C, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); register(COPY, menu.add(copyAction)); copyAction.setEnabled(false); actionMap.put(COPY, copyAction); Action pasteAction = makeAction(DefaultEditorKit.PasteAction.class, null, "Paste", null, "Paste contents of clipboard", new Integer(KeyEvent.VK_V), KeyStroke.getKeyStroke(KeyEvent.VK_V, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); pasteAction.setEnabled(false); register(PASTE, menu.add(pasteAction)); actionMap.put(PASTE, pasteAction); /* menu.addSeparator(); Action selectAllAction = makeAction(SelectAllAction.class, this, "Select All", null, "Select all text", new Integer(KeyEvent.VK_A), KeyStroke.getKeyStroke(KeyEvent.VK_A, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); menu.add(selectAllAction); */ launchFindReplaceAction = (LaunchFindReplaceAction) makeAction(LaunchFindReplaceAction.class, this, "Find", null, null, new Integer(KeyEvent.VK_F), KeyStroke.getKeyStroke(KeyEvent.VK_F, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); //menu.add(launchFindReplaceAction); // launchFindReplaceAction.setEnabled(false); // register(FIND, menu.add(launchFindReplaceAction)); // actionMap.put(FIND, launchFindReplaceAction); launchFindReplaceAction.setEnabled(false); register(FIND, menu.add(launchFindReplaceAction)); actionMap.put(FIND, launchFindReplaceAction); return menu; }
From source file:com.monead.semantic.workbench.SemanticWorkbench.java
/** * Create the edit menu// w ww .j a v a 2 s . c o m * * @return The edit menu */ private JMenu setupEditMenu() { final JMenu menu = new JMenu("Edit"); menu.setMnemonic(KeyEvent.VK_E); menu.setToolTipText("Menu items related to editing the ontology"); editFind = new JMenuItem("Find (in assertions)"); editFind.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, KeyEvent.CTRL_MASK)); editFind.setMnemonic(KeyEvent.VK_F); editFind.setToolTipText("Find text in the assertions editor"); editFind.addActionListener(new FindAssertionsTextListener()); menu.add(editFind); editFindNextMatch = new JMenuItem("Next (matching assertion text)"); editFindNextMatch.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, KeyEvent.CTRL_MASK)); editFindNextMatch.setMnemonic(KeyEvent.VK_N); editFindNextMatch.setToolTipText("Find next text match in the assertions editor"); editFindNextMatch.addActionListener(new FindNextAssertionsTextListener()); menu.add(editFindNextMatch); menu.addSeparator(); editCommentToggle = new JMenuItem("Toggle Comment"); editCommentToggle.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_T, KeyEvent.CTRL_MASK)); editCommentToggle.setMnemonic(KeyEvent.VK_T); editCommentToggle .setToolTipText("Switch the chosen assertion or query lines between commented and not commented"); editCommentToggle.addActionListener(new CommentToggleListener()); editCommentToggle.setEnabled(false); menu.add(editCommentToggle); editInsertPrefixes = new JMenuItem("Insert Prefixes"); editInsertPrefixes.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_I, ActionEvent.CTRL_MASK)); editInsertPrefixes.setMnemonic(KeyEvent.VK_I); editInsertPrefixes.setToolTipText("Insert standard prefixes (namespaces)"); editInsertPrefixes.addActionListener(new InsertPrefixesListener()); menu.add(editInsertPrefixes); menu.addSeparator(); editExpandAllTreeNodes = new JMenuItem("Expand Entire Tree"); editExpandAllTreeNodes.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_ADD, ActionEvent.ALT_MASK)); editExpandAllTreeNodes.setMnemonic(KeyEvent.VK_E); editExpandAllTreeNodes.setToolTipText("Expand all tree nodes"); editExpandAllTreeNodes.addActionListener(new ExpandTreeListener()); menu.add(editExpandAllTreeNodes); editCollapseAllTreeNodes = new JMenuItem("Collapse Entire Tree"); editCollapseAllTreeNodes.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT, ActionEvent.ALT_MASK)); editCollapseAllTreeNodes.setMnemonic(KeyEvent.VK_C); editCollapseAllTreeNodes.setToolTipText("Expand all tree nodes"); editCollapseAllTreeNodes.addActionListener(new CollapseTreeListener()); menu.add(editCollapseAllTreeNodes); menu.addSeparator(); editEditListOfSparqlServiceUrls = new JMenuItem("Edit SPARQL Service URLs List"); editEditListOfSparqlServiceUrls.setMnemonic(KeyEvent.VK_S); editEditListOfSparqlServiceUrls.setToolTipText("Remove unwanted URLs from the dropdown list"); editEditListOfSparqlServiceUrls.addActionListener(new EditListOfSparqlServiceUrls()); menu.add(editEditListOfSparqlServiceUrls); return menu; }
From source file:org.planetcrypto.bitcoin.PlanetCryptoBitcoinUI.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor.//from w w w. ja v a 2s . c o m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { bindingGroup = new org.jdesktop.beansbinding.BindingGroup(); MainTabbedPane = new javax.swing.JTabbedPane(); MinerInformationPanel = new javax.swing.JPanel(); MinerInformationTabbedPane = new javax.swing.JTabbedPane(); InformationPanel = new javax.swing.JPanel(); MinerSelectionBox = new javax.swing.JComboBox(); MinerSelectionBoxLabel = new javax.swing.JLabel(); InformationMinerIPLabel = new javax.swing.JLabel(); InformationMinerIPTextField = new javax.swing.JTextField(); InformationMinerPortLabel = new javax.swing.JLabel(); InformationMinerPortTextField = new javax.swing.JTextField(); PrivilegedLabel = new javax.swing.JLabel(); ASICsLabel = new javax.swing.JLabel(); PrivilegedTextField = new javax.swing.JTextField(); ASICsTextField = new javax.swing.JTextField(); PGAsLabel = new javax.swing.JLabel(); PGAsTextField = new javax.swing.JTextField(); PoolCountLabel = new javax.swing.JLabel(); PoolCountTextField = new javax.swing.JTextField(); MinerVersionLabel = new javax.swing.JLabel(); MinerVersionTextField = new javax.swing.JTextField(); MinerStrategyLabel = new javax.swing.JLabel(); MinerStrategyTextField = new javax.swing.JTextField(); ACSChain1Label = new javax.swing.JLabel(); ACSChain1TextField = new javax.swing.JTextField(); ACSChain2Label = new javax.swing.JLabel(); ACSChain3Label = new javax.swing.JLabel(); ACSChain4Label = new javax.swing.JLabel(); ACSChain2TextField = new javax.swing.JTextField(); ACSChain3TextField = new javax.swing.JTextField(); ACSChain4TextField = new javax.swing.JTextField(); BytesSentLabel = new javax.swing.JLabel(); BytesRecvLabel = new javax.swing.JLabel(); BytesSentTextField = new javax.swing.JTextField(); BytesRecvTextField = new javax.swing.JTextField(); HWErrorPercentLabel = new javax.swing.JLabel(); HWErrorPercentageTextField = new javax.swing.JTextField(); HWErrorsLabel = new javax.swing.JLabel(); HWErrorsTextField = new javax.swing.JTextField(); ACSChainInformationLabel = new javax.swing.JLabel(); MinerGenericInformationRefreshButton = new javax.swing.JButton(); MinerHashRatesPanel = new javax.swing.JPanel(); HashRatesCurrentMiner = new javax.swing.JLabel(); MinerCurrentHashLabel = new javax.swing.JLabel(); MinerCurrentHashTextField = new javax.swing.JTextField(); MinerAverageHashLabel = new javax.swing.JLabel(); MinerAverageHashTextField = new javax.swing.JTextField(); MinerFoundBlocksLabel = new javax.swing.JLabel(); MinerAcceptedLabel = new javax.swing.JLabel(); MinerRejectedLabel = new javax.swing.JLabel(); MinerBestShareLabel = new javax.swing.JLabel(); MinerNetworkBlocksLabel = new javax.swing.JLabel(); MinerFoundBlocksTextField = new javax.swing.JTextField(); MinerAcceptedTextField = new javax.swing.JTextField(); MinerRejectedTextField = new javax.swing.JTextField(); MinerBestShareTextField = new javax.swing.JTextField(); MinerNetworkBlocksTextField = new javax.swing.JTextField(); MinerSelectionBox1 = new javax.swing.JComboBox(); MinerHashRatesRefreshButton = new javax.swing.JButton(); MinerTemperaturePanel = new javax.swing.JPanel(); TemperatureCurrentMinerLabel = new javax.swing.JLabel(); MinerTemp1Label = new javax.swing.JLabel(); MinerTemp2Label = new javax.swing.JLabel(); MinerTemp3Label = new javax.swing.JLabel(); MinerTemp4Label = new javax.swing.JLabel(); MinerTempAvgLabel = new javax.swing.JLabel(); MinerTempMaxLabel = new javax.swing.JLabel(); MinerTemp1TextField = new javax.swing.JTextField(); MinerTemp2TextField = new javax.swing.JTextField(); MinerTemp3TextField = new javax.swing.JTextField(); MinerTemp4TextField = new javax.swing.JTextField(); MinerTempAvgTextField = new javax.swing.JTextField(); MinerTextMaxTextField = new javax.swing.JTextField(); MinerSelectionBox2 = new javax.swing.JComboBox(); MinerTemperaturesRefreshButton = new javax.swing.JButton(); MinerFansPanel = new javax.swing.JPanel(); FansCurrentMinerLabel = new javax.swing.JLabel(); MinerFan1Label = new javax.swing.JLabel(); MinerFan2Label = new javax.swing.JLabel(); MinerFan3Label = new javax.swing.JLabel(); MinerFan4Label = new javax.swing.JLabel(); MinerFan1TextField = new javax.swing.JTextField(); MinerFan2TextField = new javax.swing.JTextField(); MinerFan3TextField = new javax.swing.JTextField(); MinerFan4TextField = new javax.swing.JTextField(); MinerSelectionBox3 = new javax.swing.JComboBox(); MinerFanSpeedsRefreshButton = new javax.swing.JButton(); CustomAPICommandPanel = new javax.swing.JPanel(); CustomAPICommandCurrentMiner = new javax.swing.JLabel(); CustomCommandEntryLabel = new javax.swing.JLabel(); CustomCommandEntryTextField = new javax.swing.JTextField(); CustomCommandOutputScrollPane = new javax.swing.JScrollPane(); CustomCommandOutputTextArea = new javax.swing.JTextArea(); CustomCommandOutputLabel = new javax.swing.JLabel(); CustomCommandSubmitButton = new javax.swing.JButton(); CustomCommandJsonCheckBox = new javax.swing.JCheckBox(); CustomCommandMinerSelectionBox = new javax.swing.JComboBox(); MinerVitalsPanel = new javax.swing.JPanel(); jScrollPane2 = new javax.swing.JScrollPane(); MinerVitalStatsTextPane = new javax.swing.JTextPane(); jLabel1 = new javax.swing.JLabel(); VitalStatsRefreshButton = new javax.swing.JButton(); BTCInformationPane = new javax.swing.JPanel(); BitcoinInformationTabbedPane = new javax.swing.JTabbedPane(); BTCGenericInformationPanel = new javax.swing.JPanel(); BTCConversionRateLabel = new javax.swing.JLabel(); NetworkDifficultyLabel = new javax.swing.JLabel(); EstimatedPayoutLabel = new javax.swing.JLabel(); NetworkDifficultyTextField = new javax.swing.JTextField(); BTCConversionRateTextField = new javax.swing.JTextField(); EstimatedPayoutTextField = new javax.swing.JTextField(); CurrentBlockHashLabel = new javax.swing.JLabel(); CurrentBlockHashTextField = new javax.swing.JTextField(); CurrentBlockTimeLabel = new javax.swing.JLabel(); CurrentBlockTimeTextField = new javax.swing.JTextField(); GenericInformationCurrentMinerLabel = new javax.swing.JLabel(); MinerSelectionBox5 = new javax.swing.JComboBox(); BitcoinInformationRefreshButton = new javax.swing.JButton(); GenericInformationCoinbaseUserLabel = new javax.swing.JLabel(); GenericInformationCoinbaseUserSelectionBox = new javax.swing.JComboBox(); GenericInformationAbbreviatedPreferredCurrencyLabel = new javax.swing.JLabel(); GenericInformationAbbreviatedPreferredCurrencyLabel2 = new javax.swing.JLabel(); CoinbaseAPIPanel = new javax.swing.JPanel(); CoinbaseAPILabel = new javax.swing.JLabel(); CoinbaseAPICurrentUserLabel = new javax.swing.JLabel(); CoinbaseAPIUserSelectionBox = new javax.swing.JComboBox(); EligiusPoolInformationPanel = new javax.swing.JPanel(); EligiusStatusLabel = new javax.swing.JLabel(); EligiusHashRateInformationScrollPane = new javax.swing.JScrollPane(); EligiusHashRateInformationTable = new javax.swing.JTable(); EligiusPayoutInformationPayoutScrollPane = new javax.swing.JScrollPane(); EligiusPayoutInformationTable = new javax.swing.JTable(); EligiusPoolInformationRefreshButton = new javax.swing.JButton(); EligiusPayoutKeyInformationScrollPane = new javax.swing.JScrollPane(); EligiousPayoutKeyInformationTextPane = new javax.swing.JTextPane(); EligiusUsernameSelectionBox = new javax.swing.JComboBox(); EligiusUsernameClipboardCopyButton = new javax.swing.JButton(); EligiusPoolCurrentUsernameLabel = new javax.swing.JLabel(); EligiusOpenBrowserButton = new javax.swing.JButton(); ConfigurationPanel = new javax.swing.JPanel(); ConfigurationTabbedPane = new javax.swing.JTabbedPane(); MinerConfigurationPanel = new javax.swing.JPanel(); ConfigurationPromptLabel = new javax.swing.JLabel(); ConfigurationRemoveMinerButton = new javax.swing.JButton(); ConfigurationAddMinerButton = new javax.swing.JButton(); ConfigurationAddMinerNameLabel = new javax.swing.JLabel(); ConfigurationAddMinerNameTextField = new javax.swing.JTextField(); ConfigurationAddMinerIPLabel = new javax.swing.JLabel(); ConfigurationAddMinerIPTextField = new javax.swing.JTextField(); ConfigurationMinerPortLabel = new javax.swing.JLabel(); ConfigurationMinerPortTextField = new javax.swing.JTextField(); ConfigurationAddMinersLabel = new javax.swing.JLabel(); ConfigurationRemoveMinersLabel = new javax.swing.JLabel(); ConfigurationRemoveMinerNameLabel = new javax.swing.JLabel(); ConfigurationRemoveMinerNameTextField = new javax.swing.JTextField(); ConfigurationCurrentMinersLabel = new javax.swing.JLabel(); ConfigurationRemoveMinerIPLabel = new javax.swing.JLabel(); ConfigurationRemoveMinerIPTextField = new javax.swing.JTextField(); ConfigurationResolveHostAddressLabel = new javax.swing.JLabel(); ConfigurationResolveHostAddressTextField = new javax.swing.JTextField(); ConfigurationResolveHostAddressButton = new javax.swing.JButton(); ConfigurationCurrentMinersScrollPane = new javax.swing.JScrollPane(); ConfigurationCurrentMinersTextPane = new javax.swing.JTextPane(); ConfigurationAlarmPanel = new javax.swing.JPanel(); ConfigurationAlarmSettingsPromptLabel = new javax.swing.JLabel(); ConfigurationMinerTemperatureAlarmLabel = new javax.swing.JLabel(); ConfigurationMinerFanSpeedAlarmLabel = new javax.swing.JLabel(); ConfigurationMinerHashRateAlarmLabel = new javax.swing.JLabel(); MinerSelectionForAlarmsBox = new javax.swing.JComboBox(); AlarmsCurrentMinerLabel = new javax.swing.JLabel(); ConfigurationAlarmsHWErrPercentLabel = new javax.swing.JLabel(); ConfigurationMinerTempAlarmTextField = new javax.swing.JTextField(); ConfigurationFanSpeedAlarmTextField = new javax.swing.JTextField(); ConfigurationMinerHashRateAlarmTextField = new javax.swing.JTextField(); ConfigurationMinerHardwareErrPercentAlarmTextField = new javax.swing.JTextField(); ConfigurationDegreesCelsiusLabel = new javax.swing.JLabel(); ConfigurationFanRPMLabel = new javax.swing.JLabel(); ConfigurationHashRatePostfixComboBox = new javax.swing.JComboBox(); ConfigurationHWErrorPercentLabel = new javax.swing.JLabel(); ConfigurationMinerTempAlarmUpdateButton = new javax.swing.JButton(); ConfigurationMinerFanSpeedAlarmUpdateButton = new javax.swing.JButton(); ConfigurationMinerHashRateAlarmUpdateButton = new javax.swing.JButton(); ConfigurationMinerHardwareErrPercentAlarmUpdateButton = new javax.swing.JButton(); ConfigurationCurrentMinerAlarmsScrollPane = new javax.swing.JScrollPane(); ConfigurationCurrentMinerAlarmsTextPane = new javax.swing.JTextPane(); ConfigurationCurrentMinerAlarmsLabel = new javax.swing.JLabel(); ConfigurationEligiusPoolsPanel = new javax.swing.JPanel(); ConfigurationEligiusLabel = new javax.swing.JLabel(); ConfigurationMiningPoolPromptLabel = new javax.swing.JLabel(); ConfigurationEligiusUsernameLabel = new javax.swing.JLabel(); ConfigurationEligiusUsernameTextField = new javax.swing.JTextField(); ConfigurationEligiusHelpPromptLabel = new javax.swing.JLabel(); ConfigurationEligiusUsernameAddButton = new javax.swing.JButton(); ConfigurationEligiusUsernameRemoveButton = new javax.swing.JButton(); ConfigurationEligiusExampleLabel = new javax.swing.JLabel(); ConfigurationCoinExchangePanel = new javax.swing.JPanel(); ConfigurationCoinbaseLabel = new javax.swing.JLabel(); ConfigurationCoinbaseCurrencyLabel = new javax.swing.JLabel(); ConfigurationCoinbaseCurrencyComboBox = new javax.swing.JComboBox(); CoinbaseConfigurationSeparator = new javax.swing.JSeparator(); CoinbaseInformationLabel = new javax.swing.JLabel(); CoinbaseUsernameLabel = new javax.swing.JLabel(); CoinbaseAPIUsernameTextField = new javax.swing.JTextField(); CoinbaseAPIKeyLabel = new javax.swing.JLabel(); CoinbaseAPIKeyTextField = new javax.swing.JTextField(); CoinbaseAPISecretKeyLabel = new javax.swing.JLabel(); CoinbaseAPISecretKeyTextField = new javax.swing.JTextField(); AddCoinbaseUsernameButton = new javax.swing.JButton(); RemoveCoinbaseUsernameButton = new javax.swing.JButton(); CurrentCoinbaseConfigurationLabel = new javax.swing.JLabel(); CoinbaseConfigurationSeparator1 = new javax.swing.JSeparator(); CurrentCoinbaseConfigurationScrollPane = new javax.swing.JScrollPane(); CurrentCoinbaseConfigurationTextPane = new javax.swing.JTextPane(); CoinbaseConfigurationVerticalSeparator = new javax.swing.JSeparator(); CoinbaseConfigurationInstructionsScrollPane = new javax.swing.JScrollPane(); CoinbaseConfigurationInstructionsTextPane = new javax.swing.JTextPane(); CoinbaseConfigurationInstructionsLabel = new javax.swing.JLabel(); BFGMInerUIMenuBar = new javax.swing.JMenuBar(); FileMenu = new javax.swing.JMenu(); FileExitMenuItem = new javax.swing.JMenuItem(); EditMenu = new javax.swing.JMenu("Edit"); CopyMenuItem = new javax.swing.JMenuItem(new DefaultEditorKit.CopyAction()); PasteMenuItem = new javax.swing.JMenuItem(new DefaultEditorKit.PasteAction()); HelpMenu = new javax.swing.JMenu(); AppHelpMenuItem = new javax.swing.JMenuItem(); AboutMenuItem = new javax.swing.JMenuItem(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("PlanetCrypto Bitcoin"); setBackground(new java.awt.Color(204, 255, 255)); MainTabbedPane.setToolTipText(""); MainTabbedPane.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N MainTabbedPane.setName(""); // NOI18N MinerInformationTabbedPane.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N ArrayList<String> miners = new ArrayList<>(); existing_miners = currentMiners(); //jComboBox1. if (existing_miners.get(0) == null) { miners.add("No Miners"); } else { for (int i = 0; i < existing_miners.size(); i++) { miners.add(existing_miners.get(i).get("name")); } } MinerSelectionBox.setModel(new javax.swing.DefaultComboBoxModel(miners.toArray())); MinerSelectionBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { MinerSelectionBoxActionPerformed(evt); } }); MinerSelectionBoxActionPerformed(null); MinerSelectionBoxLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N MinerSelectionBoxLabel.setText("Current Miner:"); InformationMinerIPLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N InformationMinerIPLabel.setText("Miner IP:"); /* if (existing_miners.get(MinerSelectionBox.getSelectedIndex()).get("name").equals("None")) { InformationMinerIPTextField.setText("None"); } else { InformationMinerIPTextField.setText(existing_miners.get(MinerSelectionBox.getSelectedIndex()).get("ip")); } */ InformationMinerIPTextField.setEditable(false); InformationMinerPortLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N InformationMinerPortLabel.setText("Miner Port:"); InformationMinerPortTextField.setEditable(false); /* if (existing_miners.get(MinerSelectionBox.getSelectedIndex()) == null) { InformationMinerPortTextField.setText("None"); } else { InformationMinerPortTextField.setText(existing_miners.get(MinerSelectionBox.getSelectedIndex()).get("port")); } */ PrivilegedLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N PrivilegedLabel.setText("Privileged: "); ASICsLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N ASICsLabel.setText("ASICs:"); PrivilegedTextField.setEditable(false); /* if (existing_miners.get(MinerSelectionBox.getSelectedIndex()) ==null) { PrivilegedTextField.setText("None"); } else { String privileged = api_Commands.parseArgs(existing_miners.get(MinerSelectionBox.getSelectedIndex()).get("ip"), existing_miners.get(MinerSelectionBox.getSelectedIndex()).get("port"), "privileged"); String status = api_Commands.getKeys(privileged, "STATUS"); if (status.equals("E")) { PrivilegedTextField.setText("False"); } else { PrivilegedTextField.setText("True"); } } */ ASICsTextField.setEditable(false); PGAsLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N PGAsLabel.setText("PGAs:"); PGAsTextField.setEditable(false); PoolCountLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N PoolCountLabel.setText("Pool Count:"); PoolCountTextField.setEditable(false); MinerVersionLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N MinerVersionLabel.setText("Version:"); MinerVersionTextField.setEditable(false); MinerStrategyLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N MinerStrategyLabel.setText("Strategy:"); MinerStrategyTextField.setEditable(false); ACSChain1Label.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N ACSChain1Label.setText("ACS Chain 1:"); ACSChain1TextField.setEditable(false); ACSChain2Label.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N ACSChain2Label.setText("ACS Chain 2:"); ACSChain3Label.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N ACSChain3Label.setText("ACS Chain 3:"); ACSChain4Label.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N ACSChain4Label.setText("ACS Chain 4:"); ACSChain2TextField.setEditable(false); ACSChain3TextField.setEditable(false); ACSChain4TextField.setEditable(false); BytesSentLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N BytesSentLabel.setText("Bytes Sent:"); BytesRecvLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N BytesRecvLabel.setText("Bytes Recv:"); BytesSentTextField.setEditable(false); BytesRecvTextField.setEditable(false); HWErrorPercentLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N HWErrorPercentLabel.setText("HW Error %:"); HWErrorPercentageTextField.setEditable(false); HWErrorsLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N HWErrorsLabel.setText("HW Errors:"); HWErrorsTextField.setEditable(false); ACSChainInformationLabel.setText("For ACS chains: x = Not Well; o = Well"); MinerGenericInformationRefreshButton.setText("Refresh"); MinerGenericInformationRefreshButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { MinerGenericInformationRefreshButtonActionPerformed(evt); } }); javax.swing.GroupLayout InformationPanelLayout = new javax.swing.GroupLayout(InformationPanel); InformationPanel.setLayout(InformationPanelLayout); InformationPanelLayout.setHorizontalGroup(InformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(InformationPanelLayout.createSequentialGroup().addContainerGap() .addGroup(InformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(InformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(InformationPanelLayout.createSequentialGroup() .addComponent(ACSChainInformationLabel).addGap(51, 51, 51)) .addGroup(InformationPanelLayout.createSequentialGroup() .addGroup(InformationPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(InformationPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(MinerSelectionBoxLabel) .addComponent(InformationMinerIPLabel) .addComponent(ASICsLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(PGAsLabel) .addComponent(PoolCountLabel) .addComponent(MinerVersionLabel)) .addComponent(PrivilegedLabel, javax.swing.GroupLayout.Alignment.LEADING)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(InformationPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(ACSChain3TextField, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(ACSChain2TextField, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(ACSChain4TextField) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, InformationPanelLayout.createSequentialGroup() .addGroup(InformationPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(MinerVersionTextField, javax.swing.GroupLayout.Alignment.LEADING) .addComponent( InformationMinerIPTextField, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(PrivilegedTextField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE) .addComponent(ASICsTextField, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(PGAsTextField, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(PoolCountTextField, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(MinerSelectionBox, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(InformationPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addGroup(InformationPanelLayout .createSequentialGroup() .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( InformationPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup( InformationPanelLayout .createSequentialGroup() .addGroup( InformationPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent( BytesRecvLabel) .addComponent( HWErrorPercentLabel) .addComponent( HWErrorsLabel) .addComponent( MinerStrategyLabel)) .addGap(18, 18, 18) .addGroup( InformationPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( HWErrorsTextField, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent( HWErrorPercentageTextField) .addComponent( BytesRecvTextField) .addComponent( MinerStrategyTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup( InformationPanelLayout .createSequentialGroup() .addGroup( InformationPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( InformationMinerPortLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE) .addComponent( BytesSentLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(18, 18, 18) .addGroup( InformationPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent( BytesSentTextField) .addComponent( InformationMinerPortTextField))))) .addGroup(InformationPanelLayout .createSequentialGroup() .addGap(31, 31, 31) .addComponent( MinerGenericInformationRefreshButton)))) .addComponent(ACSChain1TextField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 458, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(41, 41, 41))) .addComponent(ACSChain1Label).addComponent(ACSChain2Label) .addComponent(ACSChain3Label).addComponent(ACSChain4Label)))); InformationPanelLayout.setVerticalGroup(InformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(InformationPanelLayout.createSequentialGroup().addContainerGap() .addGroup(InformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(MinerSelectionBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(MinerSelectionBoxLabel) .addComponent(MinerGenericInformationRefreshButton)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(InformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(InformationMinerIPLabel) .addComponent(InformationMinerIPTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(InformationMinerPortLabel).addComponent(InformationMinerPortTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(InformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(PrivilegedLabel).addComponent(BytesSentLabel) .addComponent(BytesSentTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(PrivilegedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(InformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ASICsLabel) .addComponent(ASICsTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(BytesRecvLabel) .addComponent(BytesRecvTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(InformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(PGAsLabel) .addComponent(PGAsTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(HWErrorsLabel) .addComponent(HWErrorsTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(InformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(PoolCountLabel) .addComponent(PoolCountTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(HWErrorPercentLabel).addComponent(HWErrorPercentageTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(InformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(MinerVersionLabel) .addComponent(MinerVersionTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(MinerStrategyLabel).addComponent(MinerStrategyTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(InformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ACSChain1Label).addComponent(ACSChain1TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(InformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ACSChain2Label).addComponent(ACSChain2TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(InformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ACSChain3Label).addComponent(ACSChain3TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(InformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ACSChain4Label).addComponent(ACSChain4TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18).addComponent(ACSChainInformationLabel).addGap(41, 41, 41))); MinerInformationTabbedPane.addTab("Information", InformationPanel); MinerHashRatesPanel.add(MinerSelectionBox); HashRatesCurrentMiner.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N HashRatesCurrentMiner.setText("Current Miner:"); MinerCurrentHashLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N MinerCurrentHashLabel.setText("Current Hash:"); MinerCurrentHashTextField.setEditable(false); MinerAverageHashLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N MinerAverageHashLabel.setText("Average Hash:"); MinerAverageHashTextField.setEditable(false); MinerFoundBlocksLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N MinerFoundBlocksLabel.setText("Found Blocks:"); MinerAcceptedLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N MinerAcceptedLabel.setText("Accepted:"); MinerRejectedLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N MinerRejectedLabel.setText("Rejected:"); MinerBestShareLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N MinerBestShareLabel.setText("Best Share:"); MinerNetworkBlocksLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N MinerNetworkBlocksLabel.setText("Network Blocks:"); MinerFoundBlocksTextField.setEditable(false); MinerAcceptedTextField.setEditable(false); MinerRejectedTextField.setEditable(false); MinerBestShareTextField.setEditable(false); MinerNetworkBlocksTextField.setEditable(false); MinerSelectionBox1.setModel(new javax.swing.DefaultComboBoxModel(miners.toArray())); org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, MinerSelectionBox, org.jdesktop.beansbinding.ELProperty.create("${selectedItem}"), MinerSelectionBox1, org.jdesktop.beansbinding.BeanProperty.create("selectedItem")); bindingGroup.addBinding(binding); MinerHashRatesRefreshButton.setText("Refresh"); MinerHashRatesRefreshButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { MinerHashRatesRefreshButtonActionPerformed(evt); } }); javax.swing.GroupLayout MinerHashRatesPanelLayout = new javax.swing.GroupLayout(MinerHashRatesPanel); MinerHashRatesPanel.setLayout(MinerHashRatesPanelLayout); MinerHashRatesPanelLayout.setHorizontalGroup(MinerHashRatesPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(MinerHashRatesPanelLayout.createSequentialGroup().addContainerGap() .addGroup(MinerHashRatesPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(HashRatesCurrentMiner).addComponent(MinerCurrentHashLabel) .addComponent(MinerAverageHashLabel).addComponent(MinerFoundBlocksLabel) .addComponent(MinerAcceptedLabel).addComponent(MinerRejectedLabel) .addComponent(MinerBestShareLabel).addComponent(MinerNetworkBlocksLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(MinerHashRatesPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(MinerHashRatesPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(MinerCurrentHashTextField) .addComponent(MinerAverageHashTextField) .addComponent(MinerFoundBlocksTextField) .addComponent(MinerAcceptedTextField).addComponent(MinerRejectedTextField) .addComponent(MinerBestShareTextField) .addComponent(MinerNetworkBlocksTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)) .addGroup(MinerHashRatesPanelLayout.createSequentialGroup() .addComponent(MinerSelectionBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(MinerHashRatesRefreshButton))) .addContainerGap(440, Short.MAX_VALUE))); MinerHashRatesPanelLayout.setVerticalGroup(MinerHashRatesPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(MinerHashRatesPanelLayout.createSequentialGroup().addContainerGap() .addGroup(MinerHashRatesPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(HashRatesCurrentMiner) .addComponent(MinerSelectionBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(MinerHashRatesRefreshButton)) .addGap(21, 21, 21) .addGroup(MinerHashRatesPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(MinerCurrentHashLabel).addComponent(MinerCurrentHashTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(MinerHashRatesPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(MinerAverageHashLabel).addComponent(MinerAverageHashTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(MinerHashRatesPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(MinerFoundBlocksLabel).addComponent(MinerFoundBlocksTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(MinerHashRatesPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(MinerAcceptedLabel).addComponent(MinerAcceptedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(MinerHashRatesPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(MinerRejectedLabel).addComponent(MinerRejectedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(MinerHashRatesPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(MinerBestShareLabel).addComponent(MinerBestShareTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(MinerHashRatesPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(MinerNetworkBlocksLabel).addComponent(MinerNetworkBlocksTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); MinerInformationTabbedPane.addTab("Hash Rates", MinerHashRatesPanel); TemperatureCurrentMinerLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N TemperatureCurrentMinerLabel.setText("Current Miner:"); MinerTemp1Label.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N MinerTemp1Label.setText("Temp 1:"); MinerTemp2Label.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N MinerTemp2Label.setText("Temp 2:"); MinerTemp3Label.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N MinerTemp3Label.setText("Temp 3:"); MinerTemp4Label.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N MinerTemp4Label.setText("Temp 4:"); MinerTempAvgLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N MinerTempAvgLabel.setText("Temp Avg:"); MinerTempMaxLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N MinerTempMaxLabel.setText("Temp Max"); MinerTemp1TextField.setEditable(false); MinerTemp2TextField.setEditable(false); MinerTemp3TextField.setEditable(false); MinerTemp4TextField.setEditable(false); MinerTempAvgTextField.setEditable(false); MinerTextMaxTextField.setEditable(false); MinerSelectionBox2.setModel(new javax.swing.DefaultComboBoxModel(miners.toArray())); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, MinerSelectionBox1, org.jdesktop.beansbinding.ELProperty.create("${selectedItem}"), MinerSelectionBox2, org.jdesktop.beansbinding.BeanProperty.create("selectedItem")); bindingGroup.addBinding(binding); MinerTemperaturesRefreshButton.setText("Refresh"); MinerTemperaturesRefreshButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { MinerTemperaturesRefreshButtonActionPerformed(evt); } }); javax.swing.GroupLayout MinerTemperaturePanelLayout = new javax.swing.GroupLayout(MinerTemperaturePanel); MinerTemperaturePanel.setLayout(MinerTemperaturePanelLayout); MinerTemperaturePanelLayout.setHorizontalGroup(MinerTemperaturePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(MinerTemperaturePanelLayout.createSequentialGroup().addContainerGap() .addGroup(MinerTemperaturePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(TemperatureCurrentMinerLabel).addComponent(MinerTemp1Label) .addComponent(MinerTemp2Label).addComponent(MinerTemp3Label) .addComponent(MinerTemp4Label).addComponent(MinerTempAvgLabel) .addComponent(MinerTempMaxLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(MinerTemperaturePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(MinerTemperaturePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(MinerTemp1TextField).addComponent(MinerTemp2TextField) .addComponent(MinerTemp3TextField).addComponent(MinerTemp4TextField) .addComponent(MinerTempAvgTextField).addComponent(MinerTextMaxTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)) .addGroup(MinerTemperaturePanelLayout.createSequentialGroup() .addComponent(MinerSelectionBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(MinerTemperaturesRefreshButton))) .addContainerGap(448, Short.MAX_VALUE))); MinerTemperaturePanelLayout.setVerticalGroup( MinerTemperaturePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(MinerTemperaturePanelLayout.createSequentialGroup().addContainerGap() .addGroup(MinerTemperaturePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(TemperatureCurrentMinerLabel) .addComponent(MinerSelectionBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(MinerTemperaturesRefreshButton)) .addGap(21, 21, 21) .addGroup(MinerTemperaturePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(MinerTemp1Label).addComponent(MinerTemp1TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(MinerTemperaturePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(MinerTemp2Label).addComponent(MinerTemp2TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(MinerTemperaturePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(MinerTemp3Label).addComponent(MinerTemp3TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(MinerTemperaturePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(MinerTemp4Label).addComponent(MinerTemp4TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(MinerTemperaturePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(MinerTempAvgLabel).addComponent(MinerTempAvgTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(MinerTemperaturePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(MinerTempMaxLabel).addComponent(MinerTextMaxTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); MinerInformationTabbedPane.addTab("Temperatures", MinerTemperaturePanel); FansCurrentMinerLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N FansCurrentMinerLabel.setText("Current Miner:"); MinerFan1Label.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N MinerFan1Label.setText("Fan 1:"); MinerFan2Label.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N MinerFan2Label.setText("Fan 2:"); MinerFan3Label.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N MinerFan3Label.setText("Fan 3:"); MinerFan4Label.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N MinerFan4Label.setText("Fan 4:"); MinerFan1TextField.setEditable(false); MinerFan2TextField.setEditable(false); MinerFan3TextField.setEditable(false); MinerFan4TextField.setEditable(false); MinerSelectionBox3.setModel(new javax.swing.DefaultComboBoxModel(miners.toArray())); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, MinerSelectionBox2, org.jdesktop.beansbinding.ELProperty.create("${selectedItem}"), MinerSelectionBox3, org.jdesktop.beansbinding.BeanProperty.create("selectedItem")); bindingGroup.addBinding(binding); MinerFanSpeedsRefreshButton.setText("Refresh"); MinerFanSpeedsRefreshButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { MinerFanSpeedsRefreshButtonActionPerformed(evt); } }); javax.swing.GroupLayout MinerFansPanelLayout = new javax.swing.GroupLayout(MinerFansPanel); MinerFansPanel.setLayout(MinerFansPanelLayout); MinerFansPanelLayout.setHorizontalGroup(MinerFansPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(MinerFansPanelLayout.createSequentialGroup().addContainerGap() .addGroup(MinerFansPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(MinerFansPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(MinerFan3Label, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(MinerFan2Label, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(MinerFan1Label, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(MinerFan4Label, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE)) .addComponent(FansCurrentMinerLabel)) .addGap(18, 18, 18) .addGroup(MinerFansPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(MinerFansPanelLayout.createSequentialGroup() .addComponent(MinerSelectionBox3, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(MinerFanSpeedsRefreshButton)) .addGroup(MinerFansPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(MinerFan4TextField, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(MinerFan3TextField, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(MinerFan2TextField, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(MinerFan1TextField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE))) .addContainerGap(442, Short.MAX_VALUE))); MinerFansPanelLayout.setVerticalGroup( MinerFansPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(MinerFansPanelLayout.createSequentialGroup().addContainerGap() .addGroup(MinerFansPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(FansCurrentMinerLabel) .addComponent(MinerSelectionBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(MinerFanSpeedsRefreshButton)) .addGap(21, 21, 21) .addGroup(MinerFansPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(MinerFan1Label) .addComponent(MinerFan1TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(MinerFansPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(MinerFan2TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(MinerFan2Label)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(MinerFansPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(MinerFan3Label).addComponent(MinerFan3TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(MinerFansPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(MinerFan4Label).addComponent(MinerFan4TextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); MinerInformationTabbedPane.addTab("Fans", MinerFansPanel); CustomAPICommandCurrentMiner.setText("Current Miner:"); CustomCommandEntryLabel.setText("Enter Custom Command:"); CustomCommandOutputTextArea.setEditable(false); CustomCommandOutputTextArea.setColumns(20); CustomCommandOutputTextArea.setRows(5); CustomCommandOutputScrollPane.setViewportView(CustomCommandOutputTextArea); CustomCommandOutputLabel.setText("Output:"); CustomCommandSubmitButton.setText("Submit"); CustomCommandSubmitButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { CustomCommandSubmitButtonActionPerformed(evt); } }); CustomCommandJsonCheckBox.setText("Check for JSON Output"); CustomCommandJsonCheckBox.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { CustomCommandJsonCheckBoxKeyPressed(evt); } }); CustomCommandMinerSelectionBox.setModel(new javax.swing.DefaultComboBoxModel(miners.toArray())); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, MinerSelectionBox3, org.jdesktop.beansbinding.ELProperty.create("${selectedItem}"), CustomCommandMinerSelectionBox, org.jdesktop.beansbinding.BeanProperty.create("selectedItem")); bindingGroup.addBinding(binding); javax.swing.GroupLayout CustomAPICommandPanelLayout = new javax.swing.GroupLayout(CustomAPICommandPanel); CustomAPICommandPanel.setLayout(CustomAPICommandPanelLayout); CustomAPICommandPanelLayout.setHorizontalGroup(CustomAPICommandPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(CustomAPICommandPanelLayout.createSequentialGroup().addGap(22, 22, 22) .addGroup(CustomAPICommandPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(CustomCommandOutputScrollPane).addComponent(CustomCommandOutputLabel) .addGroup(CustomAPICommandPanelLayout.createSequentialGroup() .addComponent(CustomCommandEntryLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(CustomCommandEntryTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(CustomCommandJsonCheckBox) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(CustomCommandSubmitButton)) .addGroup(CustomAPICommandPanelLayout.createSequentialGroup() .addComponent(CustomAPICommandCurrentMiner) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(CustomCommandMinerSelectionBox, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); CustomAPICommandPanelLayout.setVerticalGroup(CustomAPICommandPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(CustomAPICommandPanelLayout.createSequentialGroup().addContainerGap() .addGroup(CustomAPICommandPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(CustomAPICommandCurrentMiner).addComponent( CustomCommandMinerSelectionBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(20, 20, 20) .addGroup(CustomAPICommandPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(CustomCommandEntryLabel) .addComponent(CustomCommandEntryTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(CustomCommandSubmitButton).addComponent(CustomCommandJsonCheckBox)) .addGap(18, 18, 18).addComponent(CustomCommandOutputLabel).addGap(7, 7, 7) .addComponent(CustomCommandOutputScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 234, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); MinerInformationTabbedPane.addTab("Custom Command", CustomAPICommandPanel); //System.out.println(existing_miners.toString()); MinerVitalStatsTextPane.setContentType("text/html"); MinerVitalStatsTextPane.setEditable(false); MinerVitalStatsTextPane.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { MinerVitalStatsTextPanePropertyChange(evt); } }); jScrollPane2.setViewportView(MinerVitalStatsTextPane); jLabel1.setFont(new java.awt.Font("DejaVu Sans", 3, 14)); // NOI18N jLabel1.setText("Vital Miner Statistics"); VitalStatsRefreshButton.setText("Refresh"); VitalStatsRefreshButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { VitalStatsRefreshButtonActionPerformed(evt); } }); javax.swing.GroupLayout MinerVitalsPanelLayout = new javax.swing.GroupLayout(MinerVitalsPanel); MinerVitalsPanel.setLayout(MinerVitalsPanelLayout); MinerVitalsPanelLayout.setHorizontalGroup( MinerVitalsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(MinerVitalsPanelLayout.createSequentialGroup().addContainerGap() .addGroup(MinerVitalsPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(MinerVitalsPanelLayout.createSequentialGroup() .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 645, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(VitalStatsRefreshButton)) .addComponent(jLabel1)) .addContainerGap(93, Short.MAX_VALUE))); MinerVitalsPanelLayout.setVerticalGroup(MinerVitalsPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(MinerVitalsPanelLayout.createSequentialGroup().addGap(16, 16, 16).addComponent(jLabel1) .addGap(18, 18, 18) .addGroup(MinerVitalsPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 306, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(VitalStatsRefreshButton)) .addContainerGap(229, Short.MAX_VALUE))); MinerInformationTabbedPane.addTab("Vitals", MinerVitalsPanel); javax.swing.GroupLayout MinerInformationPanelLayout = new javax.swing.GroupLayout(MinerInformationPanel); MinerInformationPanel.setLayout(MinerInformationPanelLayout); MinerInformationPanelLayout.setHorizontalGroup( MinerInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(MinerInformationTabbedPane)); MinerInformationPanelLayout.setVerticalGroup( MinerInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(MinerInformationPanelLayout.createSequentialGroup().addContainerGap() .addComponent(MinerInformationTabbedPane, javax.swing.GroupLayout.PREFERRED_SIZE, 615, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); MainTabbedPane.addTab("Miners", MinerInformationPanel); BTCConversionRateLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N BTCConversionRateLabel.setText("BTC Conversion Rate:"); NetworkDifficultyLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N NetworkDifficultyLabel.setText("Network Difficulty:"); EstimatedPayoutLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N EstimatedPayoutLabel.setText("Estimated Payout:"); NetworkDifficultyTextField.setEditable(false); BTCConversionRateTextField.setEditable(false); BTCConversionRateTextField.setText("Not configured yet"); EstimatedPayoutTextField.setEditable(false); CurrentBlockHashLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N CurrentBlockHashLabel.setText("Current Block Hash:"); CurrentBlockHashTextField.setEditable(false); CurrentBlockTimeLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N CurrentBlockTimeLabel.setText("Current Block Time:"); CurrentBlockTimeTextField.setEditable(false); GenericInformationCurrentMinerLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N GenericInformationCurrentMinerLabel.setText("Current Miner:"); MinerSelectionBox5.setModel(new javax.swing.DefaultComboBoxModel(miners.toArray())); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, CustomCommandMinerSelectionBox, org.jdesktop.beansbinding.ELProperty.create("${selectedItem}"), MinerSelectionBox5, org.jdesktop.beansbinding.BeanProperty.create("selectedItem")); bindingGroup.addBinding(binding); BitcoinInformationRefreshButton.setText("Refresh"); BitcoinInformationRefreshButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { BitcoinInformationRefreshButtonActionPerformed(evt); } }); GenericInformationCoinbaseUserLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N GenericInformationCoinbaseUserLabel.setText("Current Coinbase User:"); existing_coinbase = currentCoinbase(); ; ArrayList<String> coinbase_users = new ArrayList<>(); if (existing_coinbase == null) { coinbase_users.add("No Users"); } else { for (int i = 0; i < existing_coinbase.size(); i++) { coinbase_users.add(existing_coinbase.get(i).get("email")); } } GenericInformationCoinbaseUserSelectionBox .setModel(new javax.swing.DefaultComboBoxModel(coinbase_users.toArray())); GenericInformationCoinbaseUserSelectionBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { GenericInformationCoinbaseUserSelectionBoxActionPerformed(evt); } }); GenericInformationAbbreviatedPreferredCurrencyLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N GenericInformationAbbreviatedPreferredCurrencyLabel .addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { GenericInformationAbbreviatedPreferredCurrencyLabelPropertyChange(evt); } }); GenericInformationAbbreviatedPreferredCurrencyLabel2.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, GenericInformationAbbreviatedPreferredCurrencyLabel, org.jdesktop.beansbinding.ELProperty.create("${text}"), GenericInformationAbbreviatedPreferredCurrencyLabel2, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); javax.swing.GroupLayout BTCGenericInformationPanelLayout = new javax.swing.GroupLayout( BTCGenericInformationPanel); BTCGenericInformationPanel.setLayout(BTCGenericInformationPanelLayout); BTCGenericInformationPanelLayout.setHorizontalGroup(BTCGenericInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(BTCGenericInformationPanelLayout.createSequentialGroup().addContainerGap() .addGroup(BTCGenericInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(EstimatedPayoutLabel).addComponent(BTCConversionRateLabel) .addComponent(NetworkDifficultyLabel).addComponent(CurrentBlockHashLabel) .addComponent(GenericInformationCurrentMinerLabel) .addComponent(CurrentBlockTimeLabel) .addComponent(GenericInformationCoinbaseUserLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(BTCGenericInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(BTCGenericInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(CurrentBlockHashTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 559, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(BTCGenericInformationPanelLayout.createSequentialGroup() .addComponent(MinerSelectionBox5, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(BitcoinInformationRefreshButton)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, BTCGenericInformationPanelLayout.createSequentialGroup() .addGroup(BTCGenericInformationPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(EstimatedPayoutTextField, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(BTCConversionRateTextField)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(BTCGenericInformationPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( GenericInformationAbbreviatedPreferredCurrencyLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( GenericInformationAbbreviatedPreferredCurrencyLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)) .addGap(184, 184, 184)) .addComponent(NetworkDifficultyTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(CurrentBlockTimeTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(GenericInformationCoinbaseUserSelectionBox, javax.swing.GroupLayout.PREFERRED_SIZE, 255, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); BTCGenericInformationPanelLayout.setVerticalGroup(BTCGenericInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(BTCGenericInformationPanelLayout.createSequentialGroup().addGap(3, 3, 3) .addGroup(BTCGenericInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(GenericInformationCurrentMinerLabel) .addComponent(MinerSelectionBox5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(BitcoinInformationRefreshButton)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(BTCGenericInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(GenericInformationCoinbaseUserLabel) .addComponent(GenericInformationCoinbaseUserSelectionBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(7, 7, 7) .addGroup(BTCGenericInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(NetworkDifficultyTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(NetworkDifficultyLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(BTCGenericInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(CurrentBlockHashTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(CurrentBlockHashLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(BTCGenericInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(CurrentBlockTimeTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(CurrentBlockTimeLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(BTCGenericInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(BTCConversionRateTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(BTCConversionRateLabel) .addComponent(GenericInformationAbbreviatedPreferredCurrencyLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(BTCGenericInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(GenericInformationAbbreviatedPreferredCurrencyLabel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(BTCGenericInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(EstimatedPayoutLabel).addComponent(EstimatedPayoutTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(372, 372, 372))); BitcoinInformationTabbedPane.addTab("Generic Information", BTCGenericInformationPanel); CoinbaseAPILabel.setFont(new java.awt.Font("DejaVu Serif", 3, 14)); // NOI18N CoinbaseAPILabel.setText("Buy, Sell, Trade BTC Here"); CoinbaseAPICurrentUserLabel.setText("Current Coinbase User"); CoinbaseAPIUserSelectionBox.setModel(new javax.swing.DefaultComboBoxModel(existingCoinbase().toArray())); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, GenericInformationCoinbaseUserSelectionBox, org.jdesktop.beansbinding.ELProperty.create("${selectedItem}"), CoinbaseAPIUserSelectionBox, org.jdesktop.beansbinding.BeanProperty.create("selectedItem")); bindingGroup.addBinding(binding); javax.swing.GroupLayout CoinbaseAPIPanelLayout = new javax.swing.GroupLayout(CoinbaseAPIPanel); CoinbaseAPIPanel.setLayout(CoinbaseAPIPanelLayout); CoinbaseAPIPanelLayout.setHorizontalGroup( CoinbaseAPIPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(CoinbaseAPIPanelLayout.createSequentialGroup().addContainerGap() .addGroup(CoinbaseAPIPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(CoinbaseAPILabel, javax.swing.GroupLayout.PREFERRED_SIZE, 351, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(CoinbaseAPIPanelLayout.createSequentialGroup() .addComponent(CoinbaseAPICurrentUserLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(CoinbaseAPIUserSelectionBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addContainerGap(469, Short.MAX_VALUE))); CoinbaseAPIPanelLayout.setVerticalGroup(CoinbaseAPIPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(CoinbaseAPIPanelLayout.createSequentialGroup().addGap(18, 18, 18) .addComponent(CoinbaseAPILabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(CoinbaseAPIPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(CoinbaseAPICurrentUserLabel).addComponent(CoinbaseAPIUserSelectionBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(526, Short.MAX_VALUE))); BitcoinInformationTabbedPane.addTab("Coinbase API", CoinbaseAPIPanel); EligiusStatusLabel.setFont(new java.awt.Font("DejaVu Serif", 3, 14)); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, EligiusUsernameSelectionBox, org.jdesktop.beansbinding.ELProperty.create("${selectedItem}"), EligiusStatusLabel, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); /* org.planetcrypto.bitcoin.PlanetCryptoNetworkMethods parser = new org.planetcrypto.bitcoin.PlanetCryptoNetworkMethods(); ArrayList<String> eligius_names = cfg.getEligius(); //System.out.println(eligius_names); EligiusUsernameSelectionBox.setModel(new javax.swing.DefaultComboBoxModel(eligius_names.toArray())); String eligius_name = EligiusUsernameSelectionBox.getSelectedItem().toString(); if (eligius_name.startsWith("Eligius not configured")) { EligiusHashRateInformationTable.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {"12 Hours", null, null}, {"3 Hours", null, null}, {"22.5 Minutes", null, null}, {"256 Seconds", null, null}, {"128 Seconds", null, null} }, new String [] { "Interval", "Hashrate", "Weighted Shares" } ) { Class[] types = new Class [] { java.lang.String.class, java.lang.String.class, java.lang.Integer.class }; boolean[] canEdit = new boolean [] { false, false, false }; public Class getColumnClass(int columnIndex) { return types [columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit [columnIndex]; } }); } else { String hashrates = parser.getHashRate("&username=" + eligius_name); EligiusHashRateInformationTable.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {"12 Hours", parser.getHashRateIntervals(hashrates, "av43200").get(0), parser.getHashRateIntervals(hashrates, "av43200").get(1)}, {"3 Hours", parser.getHashRateIntervals(hashrates, "av10800").get(0), parser.getHashRateIntervals(hashrates, "av10800").get(1)}, {"22.5 Minutes", parser.getHashRateIntervals(hashrates, "av1350").get(0), parser.getHashRateIntervals(hashrates, "av1350").get(1)}, {"256 Seconds", parser.getHashRateIntervals(hashrates, "av256").get(0), parser.getHashRateIntervals(hashrates, "av256").get(1)}, {"128 Seconds", parser.getHashRateIntervals(hashrates, "av128").get(0), parser.getHashRateIntervals(hashrates, "av128").get(1)} }, new String [] { "Interval", "Hashrate", "Weighted Shares" } ) { Class[] types = new Class [] { java.lang.String.class, java.lang.String.class, java.lang.Integer.class }; boolean[] canEdit = new boolean [] { false, false, false }; public Class getColumnClass(int columnIndex) { return types [columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit [columnIndex]; } }); } cfg.closeAll(); EligiusHashRateInformationScrollPane.setViewportView(EligiusHashRateInformationTable); */ EligiusPoolInformationRefreshButtonActionPerformed(null); /* Thread t = new Thread(new Runnable() { @Override public void run() { eligius_name = EligiusUsernameSelectionBox.getSelectedItem().toString(); if (eligius_name.startsWith("Eligius not configured")) { EligiusPayoutInformationTable.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {"bal", null}, {"ec", null}, {"everpaid", null}, {"lbal", null}, {"lec", null} }, new String [] { "", "Amount" } ) { Class[] types = new Class [] { java.lang.String.class, java.lang.String.class, java.lang.Integer.class }; boolean[] canEdit = new boolean [] { false, false, false }; public Class getColumnClass(int columnIndex) { return types [columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit [columnIndex]; }} ); } else { String stats = parser.getUserStat("&username=" + eligius_name); EligiusPayoutInformationTable.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {"bal", parser.getUserStats(stats, "bal")}, {"ec", parser.getUserStats(stats, "ec")}, {"everpaid", parser.getUserStats(stats, "everpaid")}, {"lbal", parser.getUserStats(stats, "lbal")}, {"lec", parser.getUserStats(stats, "lec")} }, new String [] { "", "Amount" } ) { Class[] types = new Class [] { java.lang.String.class, java.lang.String.class, java.lang.Integer.class }; boolean[] canEdit = new boolean [] { false, false, false }; public Class getColumnClass(int columnIndex) { return types [columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit [columnIndex]; }} ); BFGMinerAPICoinbase coinbase = new BFGMinerAPICoinbase(); String rate = coinbase.getContent("https://coinbase.com/api/v1/currencies/exchange_rates", "btc_to_usd"); String payout = EligiusPayoutInformationTable.getValueAt(0, 1).toString().replace(" BTC", ""); BTCConversionRateTextField.setText(rate); EstimatedPayoutTextField.setText(String.valueOf(Float.parseFloat(rate)* Float.parseFloat(payout))); } //BFGMinerAPICoinbase coinbase = new BFGMinerAPICoinbase(); //BTCConversionRateTextField.setText(coinbase.getContent("https://coinbase.com/api/v1/currencies/exchange_rates", "btc_to_usd")); //if (EligiusPayoutInformationTable.getValueAt(0, 1) != null) { // System.out.println(EligiusPayoutInformationTable.getValueAt(0, 1).toString()); //} else { // System.out.println("No Value yet"); //} EligiusPayoutInformationTable.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { EligiusPayoutInformationTablePropertyChange(evt); } }); EligiusPayoutInformationPayoutScrollPane.setViewportView(EligiusPayoutInformationTable); } }); t.start(); */ //EligiusPayoutInformationTableAncestorRemoved(null); EligiusPoolInformationRefreshButton.setText("Refresh"); EligiusPoolInformationRefreshButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { EligiusPoolInformationRefreshButtonActionPerformed(evt); } }); EligiousPayoutKeyInformationTextPane.setFont(new Font("Dialog", Font.PLAIN, 14)); EligiousPayoutKeyInformationTextPane.setContentType("text/html"); EligiousPayoutKeyInformationTextPane.setText( "<html><ul><li><em><b>bal</b></em> - Current unpaid balance including estimates for the current round</li>" + "<li><em><b>ec</b></em> - Sum of CPPSRB shelved shares and SMPPS extra credit (if applicable) including estimates for the current round</li>" + "<li><em><b>everpaid</b></em> - Total actually paid (and verifyable in the blockchain) to this miner</li>" + "<li><em><b>lbal</b></em> - Unpaid balance as of the last block (no estimates)</li>" + "<li><em><b>lec</b></em> - Sum of CPPSRB shelved shares and SMPPS extra credit (if applicable) as of the last block (no estimates)</li></ul></html>"); EligiousPayoutKeyInformationTextPane.setEditable(false); EligiusPayoutKeyInformationScrollPane.setViewportView(EligiousPayoutKeyInformationTextPane); existing_eligius = currentEligius(); EligiusUsernameSelectionBox.setModel(new javax.swing.DefaultComboBoxModel(existing_eligius.toArray())); EligiusUsernameSelectionBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { EligiusUsernameSelectionBoxActionPerformed(evt); } }); EligiusUsernameClipboardCopyButton.setText("Copy To Clipboard"); EligiusUsernameClipboardCopyButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { EligiusUsernameClipboardCopyButtonActionPerformed(evt); } }); EligiusPoolCurrentUsernameLabel.setFont(new java.awt.Font("DejaVu Serif", 3, 12)); // NOI18N EligiusPoolCurrentUsernameLabel.setText("Eligius Username:"); EligiusOpenBrowserButton.setText("Open Eligius in Browser"); EligiusOpenBrowserButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { EligiusOpenBrowserButtonActionPerformed(evt); } }); javax.swing.GroupLayout EligiusPoolInformationPanelLayout = new javax.swing.GroupLayout( EligiusPoolInformationPanel); EligiusPoolInformationPanel.setLayout(EligiusPoolInformationPanelLayout); EligiusPoolInformationPanelLayout.setHorizontalGroup(EligiusPoolInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(EligiusPoolInformationPanelLayout.createSequentialGroup().addContainerGap() .addGroup(EligiusPoolInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(EligiusPayoutKeyInformationScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 695, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(EligiusPoolInformationPanelLayout.createSequentialGroup() .addComponent(EligiusPayoutInformationPayoutScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(EligiusPoolInformationRefreshButton)) .addComponent(EligiusHashRateInformationScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(EligiusPoolInformationPanelLayout.createSequentialGroup() .addGroup(EligiusPoolInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(EligiusPoolInformationPanelLayout.createSequentialGroup() .addComponent(EligiusStatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 408, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(EligiusUsernameClipboardCopyButton)) .addGroup(EligiusPoolInformationPanelLayout.createSequentialGroup() .addComponent(EligiusPoolCurrentUsernameLabel) .addGap(3, 3, 3).addComponent(EligiusUsernameSelectionBox, javax.swing.GroupLayout.PREFERRED_SIZE, 459, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(EligiusOpenBrowserButton))) .addGap(14, 14, 14))); EligiusPoolInformationPanelLayout.setVerticalGroup(EligiusPoolInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(EligiusPoolInformationPanelLayout.createSequentialGroup().addGap(13, 13, 13) .addGroup(EligiusPoolInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(EligiusUsernameSelectionBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(EligiusPoolCurrentUsernameLabel)) .addGap(16, 16, 16) .addGroup(EligiusPoolInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(EligiusStatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(EligiusUsernameClipboardCopyButton) .addComponent(EligiusOpenBrowserButton)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(EligiusHashRateInformationScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(EligiusPoolInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(EligiusPayoutInformationPayoutScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(EligiusPoolInformationRefreshButton)) .addGap(18, 18, 18).addComponent(EligiusPayoutKeyInformationScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())); BitcoinInformationTabbedPane.addTab("Pool Information", EligiusPoolInformationPanel); javax.swing.GroupLayout BTCInformationPaneLayout = new javax.swing.GroupLayout(BTCInformationPane); BTCInformationPane.setLayout(BTCInformationPaneLayout); BTCInformationPaneLayout.setHorizontalGroup( BTCInformationPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(BitcoinInformationTabbedPane)); BTCInformationPaneLayout.setVerticalGroup( BTCInformationPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(BitcoinInformationTabbedPane)); MainTabbedPane.addTab("Bitcoin Information", BTCInformationPane); MinerConfigurationPanel.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { MinerConfigurationPanelFocusGained(evt); } }); ConfigurationPromptLabel.setFont(new java.awt.Font("DejaVu Serif", 3, 14)); // NOI18N ConfigurationPromptLabel .setText("Please fill in the following form to configure this interface. Changes are persistent."); ConfigurationRemoveMinerButton.setText("Remove Miner"); ConfigurationRemoveMinerButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ConfigurationRemoveMinerButtonActionPerformed(evt); } }); ConfigurationAddMinerButton.setText("Add Miner"); ConfigurationAddMinerButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ConfigurationAddMinerButtonActionPerformed(evt); } }); ConfigurationAddMinerNameLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N ConfigurationAddMinerNameLabel.setText("Miner Name:"); ConfigurationAddMinerIPLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N ConfigurationAddMinerIPLabel.setText("Miner IP:"); ConfigurationMinerPortLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N ConfigurationMinerPortLabel.setText("Miner Port:"); ConfigurationAddMinersLabel.setFont(new java.awt.Font("DejaVu Serif", 3, 14)); // NOI18N ConfigurationAddMinersLabel.setText("Add Miners"); ConfigurationRemoveMinersLabel.setFont(new java.awt.Font("DejaVu Serif", 3, 14)); // NOI18N ConfigurationRemoveMinersLabel.setText("Remove Miners"); ConfigurationRemoveMinerNameLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N ConfigurationRemoveMinerNameLabel.setText("Miner Name:"); ConfigurationCurrentMinersLabel.setFont(new java.awt.Font("DejaVu Serif", 3, 14)); // NOI18N ConfigurationCurrentMinersLabel.setText("Current Miners:"); ConfigurationRemoveMinerIPLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N ConfigurationRemoveMinerIPLabel.setText("or Miner IP:"); ConfigurationResolveHostAddressLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N ConfigurationResolveHostAddressLabel.setText("Resolve host address:"); ConfigurationResolveHostAddressButton.setText("Get IP"); ConfigurationResolveHostAddressButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ConfigurationResolveHostAddressButtonActionPerformed(evt); } }); ConfigurationCurrentMinersTextPane.setEditable(false); ConfigurationCurrentMinersTextPane.setFont(new Font("Monospaced", 0, 12)); // NOI18N ConfigurationCurrentMinersTextPane.setContentType("text/html"); org.planetcrypto.bitcoin.PlanetCryptoBitcoinUserConfiguration current_miners_configuration = new org.planetcrypto.bitcoin.PlanetCryptoBitcoinUserConfiguration(); ConfigurationCurrentMinersTextPane.setText(current_miners_configuration.currentMiners()); current_miners_configuration.closeAll(); ConfigurationCurrentMinersTextPane.setEditable(false); ConfigurationCurrentMinersScrollPane.setViewportView(ConfigurationCurrentMinersTextPane); javax.swing.GroupLayout MinerConfigurationPanelLayout = new javax.swing.GroupLayout( MinerConfigurationPanel); MinerConfigurationPanel.setLayout(MinerConfigurationPanelLayout); MinerConfigurationPanelLayout.setHorizontalGroup(MinerConfigurationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(MinerConfigurationPanelLayout.createSequentialGroup().addContainerGap() .addGroup(MinerConfigurationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(MinerConfigurationPanelLayout.createSequentialGroup() .addComponent(ConfigurationRemoveMinerNameLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(ConfigurationRemoveMinerNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(ConfigurationRemoveMinerIPLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(ConfigurationRemoveMinerIPTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(ConfigurationRemoveMinerButton)) .addComponent(ConfigurationPromptLabel).addComponent(ConfigurationAddMinersLabel) .addComponent(ConfigurationRemoveMinersLabel) .addComponent(ConfigurationCurrentMinersLabel) .addGroup(MinerConfigurationPanelLayout.createSequentialGroup() .addGroup(MinerConfigurationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, MinerConfigurationPanelLayout.createSequentialGroup() .addComponent(ConfigurationResolveHostAddressLabel) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( ConfigurationResolveHostAddressTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent( ConfigurationResolveHostAddressButton)) .addGroup(MinerConfigurationPanelLayout.createSequentialGroup() .addComponent(ConfigurationAddMinerNameLabel) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(ConfigurationAddMinerNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(21, 21, 21) .addComponent(ConfigurationAddMinerIPLabel) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(ConfigurationAddMinerIPTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(ConfigurationMinerPortLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(ConfigurationMinerPortTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(43, 43, 43).addComponent(ConfigurationAddMinerButton)) .addComponent(ConfigurationCurrentMinersScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 333, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); MinerConfigurationPanelLayout.setVerticalGroup(MinerConfigurationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(MinerConfigurationPanelLayout.createSequentialGroup().addGap(16, 16, 16) .addComponent(ConfigurationPromptLabel) .addGroup(MinerConfigurationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(MinerConfigurationPanelLayout.createSequentialGroup().addGap(16, 16, 16) .addComponent(ConfigurationAddMinersLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(MinerConfigurationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ConfigurationAddMinerNameLabel) .addComponent(ConfigurationAddMinerNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ConfigurationAddMinerIPLabel) .addComponent(ConfigurationAddMinerIPTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ConfigurationMinerPortLabel) .addComponent(ConfigurationMinerPortTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(MinerConfigurationPanelLayout.createSequentialGroup().addGap(37, 37, 37) .addComponent(ConfigurationAddMinerButton))) .addGap(35, 35, 35) .addGroup(MinerConfigurationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ConfigurationResolveHostAddressLabel) .addComponent(ConfigurationResolveHostAddressTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ConfigurationResolveHostAddressButton)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(ConfigurationRemoveMinersLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(MinerConfigurationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ConfigurationRemoveMinerNameLabel) .addComponent(ConfigurationRemoveMinerNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ConfigurationRemoveMinerIPLabel) .addComponent(ConfigurationRemoveMinerIPTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ConfigurationRemoveMinerButton)) .addGap(25, 25, 25).addComponent(ConfigurationCurrentMinersLabel).addGap(33, 33, 33) .addComponent(ConfigurationCurrentMinersScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 209, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); ConfigurationTabbedPane.addTab("Miners", MinerConfigurationPanel); ConfigurationAlarmSettingsPromptLabel.setFont(new java.awt.Font("DejaVu Serif", 3, 14)); // NOI18N ConfigurationAlarmSettingsPromptLabel.setText("Configure Alarm Settings Here."); ConfigurationMinerTemperatureAlarmLabel.setText("Temperature:"); ConfigurationMinerFanSpeedAlarmLabel.setText("Fan Speed:"); ConfigurationMinerHashRateAlarmLabel.setText("Hash Rate:"); MinerSelectionForAlarmsBox.setModel(new javax.swing.DefaultComboBoxModel(miners.toArray())); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, MinerSelectionBox5, org.jdesktop.beansbinding.ELProperty.create("${selectedItem}"), MinerSelectionForAlarmsBox, org.jdesktop.beansbinding.BeanProperty.create("selectedItem")); bindingGroup.addBinding(binding); AlarmsCurrentMinerLabel.setText("Current Miner:"); ConfigurationAlarmsHWErrPercentLabel.setText("Hardware Errors:"); ConfigurationMinerTempAlarmTextField.setHorizontalAlignment(javax.swing.JTextField.RIGHT); ConfigurationFanSpeedAlarmTextField.setHorizontalAlignment(javax.swing.JTextField.RIGHT); ConfigurationMinerHashRateAlarmTextField.setHorizontalAlignment(javax.swing.JTextField.RIGHT); ConfigurationMinerHardwareErrPercentAlarmTextField.setHorizontalAlignment(javax.swing.JTextField.RIGHT); ConfigurationDegreesCelsiusLabel.setText("C"); ConfigurationFanRPMLabel.setText("RPM"); ConfigurationHashRatePostfixComboBox .setModel(new javax.swing.DefaultComboBoxModel(new String[] { "TH/s", "GH/s", "MH/s" })); ConfigurationHashRatePostfixComboBox.setSelectedIndex(1); ConfigurationHWErrorPercentLabel.setText("%"); ConfigurationMinerTempAlarmUpdateButton.setText("Update"); ConfigurationMinerTempAlarmUpdateButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ConfigurationMinerTempAlarmUpdateButtonActionPerformed(evt); } }); ConfigurationMinerFanSpeedAlarmUpdateButton.setText("Update"); ConfigurationMinerFanSpeedAlarmUpdateButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ConfigurationMinerFanSpeedAlarmUpdateButtonActionPerformed(evt); } }); ConfigurationMinerHashRateAlarmUpdateButton.setText("Update"); ConfigurationMinerHashRateAlarmUpdateButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ConfigurationMinerHashRateAlarmUpdateButtonActionPerformed(evt); } }); ConfigurationMinerHardwareErrPercentAlarmUpdateButton.setText("Update"); ConfigurationMinerHardwareErrPercentAlarmUpdateButton .addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ConfigurationMinerHardwareErrPercentAlarmUpdateButtonActionPerformed(evt); } }); ConfigurationCurrentMinerAlarmsTextPane.setContentType(("text/html")); /*StringBuffer current_alarms = new StringBuffer(); String temp = new String(); Object temp_type = new Object(); HashMap<String, Object> temp_alarms = new HashMap<>(); current_alarms.append(CurrentAlarmsHeader); System.out.println(existing_miners.toString()); for (int i = 0; i < existing_miners.size(); i++) { temp = existing_miners.get(i).get("name"); if (temp.equals("No Miners")) { current_alarms.append(newrow); for (int j = 0; j < 5; j++) { current_alarms.append("None"); if (j == 4) { break; } current_alarms.append(newcolumn); } current_alarms.append(closerow); current_alarms.append(VitalStatsFooter); System.out.println(current_alarms.toString()); break; } temp_alarms = cfg.getAlarms(temp); if (temp_alarms == null) { current_alarms.append(newrow); current_alarms.append(temp); current_alarms.append(newcolumn); for (int j = 0; j < 4; j++) { current_alarms.append("None"); if (j == 3) { break; } current_alarms.append(newcolumn); } current_alarms.append(closerow); current_alarms.append(VitalStatsFooter); System.out.println(current_alarms.toString()); break; } current_alarms.append(newrow); current_alarms.append(temp); current_alarms.append(newcolumn); current_alarms.append(temp_alarms.get("fan")); current_alarms.append(newcolumn); current_alarms.append(temp_alarms.get("temp")); current_alarms.append(newcolumn); temp_type = temp_alarms.get("hash_rate_type"); temp_type = (temp_type == null) ? "GH/s" : temp_type.toString(); current_alarms.append(temp_alarms.get("hash_rate") + " " + temp_type); current_alarms.append(newcolumn); current_alarms.append(temp_alarms.get("hw_err")); current_alarms.append(closerow); current_alarms.append(VitalStatsFooter); } ConfigurationCurrentMinerAlarmsTextPane.setText(current_alarms.toString()); */ ConfigurationCurrentMinerAlarmsTextPanePropertyChange(null); ConfigurationCurrentMinerAlarmsTextPane.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { ConfigurationCurrentMinerAlarmsTextPanePropertyChange(evt); } }); ConfigurationCurrentMinerAlarmsScrollPane.setViewportView(ConfigurationCurrentMinerAlarmsTextPane); ConfigurationCurrentMinerAlarmsLabel.setFont(new java.awt.Font("DejaVu Serif", 3, 12)); // NOI18N ConfigurationCurrentMinerAlarmsLabel.setText("Current alarms:"); javax.swing.GroupLayout ConfigurationAlarmPanelLayout = new javax.swing.GroupLayout( ConfigurationAlarmPanel); ConfigurationAlarmPanel.setLayout(ConfigurationAlarmPanelLayout); ConfigurationAlarmPanelLayout.setHorizontalGroup(ConfigurationAlarmPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(ConfigurationAlarmPanelLayout.createSequentialGroup().addContainerGap() .addGroup(ConfigurationAlarmPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(ConfigurationCurrentMinerAlarmsScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 371, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(ConfigurationAlarmPanelLayout.createSequentialGroup() .addGroup(ConfigurationAlarmPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(ConfigurationAlarmSettingsPromptLabel, javax.swing.GroupLayout.Alignment.LEADING) .addGroup(ConfigurationAlarmPanelLayout.createSequentialGroup() .addGroup(ConfigurationAlarmPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(ConfigurationAlarmsHWErrPercentLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( ConfigurationMinerTemperatureAlarmLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(ConfigurationMinerFanSpeedAlarmLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(ConfigurationMinerHashRateAlarmLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(AlarmsCurrentMinerLabel, 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(ConfigurationAlarmPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(MinerSelectionForAlarmsBox, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(ConfigurationAlarmPanelLayout .createSequentialGroup() .addGroup(ConfigurationAlarmPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent( ConfigurationMinerHardwareErrPercentAlarmTextField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 129, Short.MAX_VALUE) .addComponent( ConfigurationMinerHashRateAlarmTextField, javax.swing.GroupLayout.Alignment.LEADING) .addComponent( ConfigurationFanSpeedAlarmTextField, javax.swing.GroupLayout.Alignment.LEADING) .addComponent( ConfigurationMinerTempAlarmTextField, javax.swing.GroupLayout.Alignment.LEADING)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(ConfigurationAlarmPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent( ConfigurationDegreesCelsiusLabel) .addComponent( ConfigurationFanRPMLabel) .addComponent( ConfigurationHashRatePostfixComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( ConfigurationHWErrorPercentLabel)))))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(ConfigurationAlarmPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(ConfigurationMinerHashRateAlarmUpdateButton) .addComponent(ConfigurationMinerHardwareErrPercentAlarmUpdateButton) .addComponent(ConfigurationMinerTempAlarmUpdateButton) .addComponent(ConfigurationMinerFanSpeedAlarmUpdateButton))) .addComponent(ConfigurationCurrentMinerAlarmsLabel)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); ConfigurationAlarmPanelLayout.setVerticalGroup(ConfigurationAlarmPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(ConfigurationAlarmPanelLayout.createSequentialGroup().addContainerGap() .addComponent(ConfigurationAlarmSettingsPromptLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(ConfigurationAlarmPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(AlarmsCurrentMinerLabel).addComponent(MinerSelectionForAlarmsBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(ConfigurationAlarmPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ConfigurationMinerTemperatureAlarmLabel) .addComponent(ConfigurationMinerTempAlarmTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ConfigurationDegreesCelsiusLabel) .addComponent(ConfigurationMinerTempAlarmUpdateButton)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(ConfigurationAlarmPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ConfigurationMinerFanSpeedAlarmLabel) .addComponent(ConfigurationFanSpeedAlarmTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ConfigurationFanRPMLabel) .addComponent(ConfigurationMinerFanSpeedAlarmUpdateButton)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(ConfigurationAlarmPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ConfigurationMinerHashRateAlarmLabel) .addComponent(ConfigurationMinerHashRateAlarmTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ConfigurationHashRatePostfixComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ConfigurationMinerHashRateAlarmUpdateButton)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(ConfigurationAlarmPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ConfigurationAlarmsHWErrPercentLabel) .addComponent(ConfigurationMinerHardwareErrPercentAlarmTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ConfigurationHWErrorPercentLabel) .addComponent(ConfigurationMinerHardwareErrPercentAlarmUpdateButton)) .addGap(18, 18, 18).addComponent(ConfigurationCurrentMinerAlarmsLabel).addGap(18, 18, 18) .addComponent(ConfigurationCurrentMinerAlarmsScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); ConfigurationTabbedPane.addTab("Alarms", ConfigurationAlarmPanel); ConfigurationEligiusLabel.setFont(new java.awt.Font("DejaVu Serif", 3, 14)); // NOI18N ConfigurationEligiusLabel.setText("Eligius"); ConfigurationMiningPoolPromptLabel.setFont(new java.awt.Font("DejaVu Serif", 3, 18)); // NOI18N ConfigurationMiningPoolPromptLabel.setText("Use this tab to configure mining pools"); ConfigurationEligiusUsernameLabel.setText("Eligius Username*:"); ConfigurationEligiusHelpPromptLabel.setFont(new java.awt.Font("Monospaced", 0, 10)); // NOI18N ConfigurationEligiusHelpPromptLabel.setText("*For more information about these fields, please see help*"); ConfigurationEligiusUsernameAddButton.setText("Add"); ConfigurationEligiusUsernameAddButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ConfigurationEligiusUsernameAddButtonActionPerformed(evt); } }); ConfigurationEligiusUsernameRemoveButton.setText("Remove"); ConfigurationEligiusUsernameRemoveButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ConfigurationEligiusUsernameRemoveButtonActionPerformed(evt); } }); ConfigurationEligiusExampleLabel.setFont(new java.awt.Font("DejaVu Serif", 0, 10)); // NOI18N ConfigurationEligiusExampleLabel.setText( "*User name is the same as Mining Address for example: \"1EXfBqvLTyFbL6Dr5CG1fjxNKEPSezg7yF\""); javax.swing.GroupLayout ConfigurationEligiusPoolsPanelLayout = new javax.swing.GroupLayout( ConfigurationEligiusPoolsPanel); ConfigurationEligiusPoolsPanel.setLayout(ConfigurationEligiusPoolsPanelLayout); ConfigurationEligiusPoolsPanelLayout.setHorizontalGroup(ConfigurationEligiusPoolsPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(ConfigurationEligiusPoolsPanelLayout.createSequentialGroup().addContainerGap() .addGroup(ConfigurationEligiusPoolsPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(ConfigurationEligiusPoolsPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(ConfigurationEligiusPoolsPanelLayout.createSequentialGroup() .addComponent(ConfigurationMiningPoolPromptLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(ConfigurationEligiusHelpPromptLabel)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, ConfigurationEligiusPoolsPanelLayout.createSequentialGroup() .addComponent(ConfigurationEligiusUsernameLabel) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(ConfigurationEligiusUsernameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(ConfigurationEligiusUsernameAddButton) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(ConfigurationEligiusUsernameRemoveButton))) .addComponent(ConfigurationEligiusLabel) .addGroup(ConfigurationEligiusPoolsPanelLayout.createSequentialGroup() .addGap(12, 12, 12).addComponent(ConfigurationEligiusExampleLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 527, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); ConfigurationEligiusPoolsPanelLayout.setVerticalGroup( ConfigurationEligiusPoolsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(ConfigurationEligiusPoolsPanelLayout.createSequentialGroup().addContainerGap() .addGroup(ConfigurationEligiusPoolsPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ConfigurationEligiusHelpPromptLabel) .addComponent(ConfigurationMiningPoolPromptLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(ConfigurationEligiusLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(ConfigurationEligiusPoolsPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ConfigurationEligiusUsernameLabel) .addComponent(ConfigurationEligiusUsernameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ConfigurationEligiusUsernameAddButton) .addComponent(ConfigurationEligiusUsernameRemoveButton)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(ConfigurationEligiusExampleLabel) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); ConfigurationTabbedPane.addTab("Pools", ConfigurationEligiusPoolsPanel); ConfigurationCoinExchangePanel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N ConfigurationCoinbaseLabel.setFont(new java.awt.Font("DejaVu Serif", 3, 14)); // NOI18N ConfigurationCoinbaseLabel.setText("Configure Coinbase Here"); ConfigurationCoinbaseCurrencyLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N ConfigurationCoinbaseCurrencyLabel.setText("Preferred Exchange Currency:"); ConfigurationCoinbaseCurrencyComboBox.setModel( new javax.swing.DefaultComboBoxModel(PlanetCryptoBitcoinCoinbaseCurrency.coinbaseCurrencies())); /* new javax.swing.DefaultComboBoxModel( new String[]{ "Select", "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTC", "BTN", "BWP", "BYR", "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EEK", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LVL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRO", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SRD", "STD", "SVC", "SYP", "SZL", "THB", "TJS", "TMM", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "USD", "UY", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XCD", "XOF", "XPF", "YER", "ZAR", "ZMK", "ZWL" } */ CoinbaseInformationLabel.setFont(new java.awt.Font("DejaVu Serif", 3, 14)); // NOI18N CoinbaseInformationLabel.setText("Coinbase User API Information"); CoinbaseUsernameLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N CoinbaseUsernameLabel.setText("Coinbase Username:"); CoinbaseAPIKeyLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N CoinbaseAPIKeyLabel.setText("Coinbase API Key:"); CoinbaseAPISecretKeyLabel.setFont(new java.awt.Font("DejaVu Serif", 1, 12)); // NOI18N CoinbaseAPISecretKeyLabel.setText("Coinbase API Secret:"); AddCoinbaseUsernameButton.setText("Add/Update"); AddCoinbaseUsernameButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { AddCoinbaseUsernameButtonActionPerformed(evt); } }); RemoveCoinbaseUsernameButton.setText("Remove"); RemoveCoinbaseUsernameButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { RemoveCoinbaseUsernameButtonActionPerformed(evt); } }); CurrentCoinbaseConfigurationLabel.setFont(new java.awt.Font("DejaVu Serif", 3, 14)); // NOI18N CurrentCoinbaseConfigurationLabel.setText("Current Coinbase Configuration:"); CurrentCoinbaseConfigurationTextPane.setEditable(false); CurrentCoinbaseConfigurationTextPane.setContentType("text/html"); // NOI18N /* existing_coinbase = currentCoinbase(); if (existing_coinbase == null) { CurrentCoinbaseConfigurationTextPane.setText("<html><body><p><b>No Configuration</b></p></body></html>"); } else { CurrentCoinbaseConfigurationTextPane.setText(existing_coinbase.toString()); } */ CurrentCoinbaseConfigurationTextPane.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { CurrentCoinbaseConfigurationTextPanePropertyChange(evt); } }); CurrentCoinbaseConfigurationScrollPane.setViewportView(CurrentCoinbaseConfigurationTextPane); CoinbaseConfigurationVerticalSeparator.setOrientation(javax.swing.SwingConstants.VERTICAL); CoinbaseConfigurationInstructionsTextPane.setEditable(false); CoinbaseConfigurationInstructionsTextPane.setContentType("text/html"); // NOI18N CoinbaseConfigurationInstructionsTextPane.setFont(new java.awt.Font("DejaVu Serif", 0, 12)); // NOI18N CoinbaseConfigurationInstructionsTextPane.setText( "<html>\n <head>\n <style>\n body {background:#D6D9DF }\n </style>\n </head>\n <body>\n <ul>\n <li>At a minimum <b>Coinbase Username</b> and <b>Preferred Exchange Currency</b> are required.</li>\n <li>To add the minimum required parameters: \n <ol>\n <li>Enter the <b>Coinbase Username</b> to add</li>\n <li>Select your <b>Preferred Exchange Currency</b></li>\n <li>Click <b>Add/Update</b></li>\n </ol>\n </li>\n <li>To add an API Key:\n <ol>\n <li>Enter the <b>Coinbase Username</b> to associate with key</li>\n <li>Enter <b>Coinbase API Key</b> value</li>\n <li>Enter <b>Coinbase API Secret</b> Value</li>\n <li>Select your <b>Preferred Exchange Currency</b></li>\n <li>Click <b>Add/Update</b></li>\n </ol>\n </li>\n <li>To update/remove configuration associated with a <b>Coinbase Username</b></li>\n <ol>\n <li>Enter the <b>Coinbase Username</b> to update</li>\n <li><b>If removing this configuration, simply click \"Remove\"</b></li>\n <ul><li><b>Warning: This will remove ALL information from this app associated with this Coinbase Username</b></li></ul>\n <li><b>If updating this configuration:</b></li>\n <ul><li>Enter/Select the field to update, and click <b>Add/Update</b></li></ul>\n </ol>\n </ul>\n </body>\n</html>\n"); CoinbaseConfigurationInstructionsTextPane.setCaretPosition(0); CoinbaseConfigurationInstructionsScrollPane.setViewportView(CoinbaseConfigurationInstructionsTextPane); CoinbaseConfigurationInstructionsLabel.setFont(new java.awt.Font("DejaVu Serif", 3, 14)); // NOI18N CoinbaseConfigurationInstructionsLabel.setText("Configuration Instructions:"); javax.swing.GroupLayout ConfigurationCoinExchangePanelLayout = new javax.swing.GroupLayout( ConfigurationCoinExchangePanel); ConfigurationCoinExchangePanel.setLayout(ConfigurationCoinExchangePanelLayout); ConfigurationCoinExchangePanelLayout.setHorizontalGroup(ConfigurationCoinExchangePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(ConfigurationCoinExchangePanelLayout.createSequentialGroup().addContainerGap() .addGroup(ConfigurationCoinExchangePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(CurrentCoinbaseConfigurationScrollPane) .addComponent(ConfigurationCoinbaseLabel) .addGroup(ConfigurationCoinExchangePanelLayout.createSequentialGroup() .addGroup(ConfigurationCoinExchangePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(ConfigurationCoinExchangePanelLayout .createSequentialGroup() .addGroup(ConfigurationCoinExchangePanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, ConfigurationCoinExchangePanelLayout .createSequentialGroup() .addComponent( ConfigurationCoinbaseCurrencyLabel) .addGap(18, 18, 18).addComponent( ConfigurationCoinbaseCurrencyComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 263, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(ConfigurationCoinExchangePanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent( CoinbaseConfigurationSeparator1, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(CoinbaseInformationLabel, javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.LEADING, ConfigurationCoinExchangePanelLayout .createSequentialGroup() .addGroup( ConfigurationCoinExchangePanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( CoinbaseUsernameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( CoinbaseAPISecretKeyLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( CoinbaseAPIKeyLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(18, 18, 18) .addGroup( ConfigurationCoinExchangePanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent( CoinbaseAPIUsernameTextField) .addComponent( CoinbaseAPIKeyTextField) .addComponent( CoinbaseAPISecretKeyTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 330, Short.MAX_VALUE))) .addComponent( CoinbaseConfigurationSeparator, javax.swing.GroupLayout.Alignment.LEADING))) .addGap(0, 0, 0) .addComponent(CoinbaseConfigurationVerticalSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 12, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(CurrentCoinbaseConfigurationLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 266, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(32, 32, 32).addComponent(AddCoinbaseUsernameButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(RemoveCoinbaseUsernameButton)) .addComponent(CoinbaseConfigurationInstructionsLabel) .addComponent(CoinbaseConfigurationInstructionsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 791, Short.MAX_VALUE)) .addContainerGap(17, Short.MAX_VALUE))); ConfigurationCoinExchangePanelLayout.setVerticalGroup(ConfigurationCoinExchangePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(ConfigurationCoinExchangePanelLayout.createSequentialGroup().addContainerGap() .addComponent(ConfigurationCoinbaseLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(ConfigurationCoinExchangePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(ConfigurationCoinExchangePanelLayout.createSequentialGroup() .addComponent(CoinbaseConfigurationSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(CoinbaseInformationLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(ConfigurationCoinExchangePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(CoinbaseUsernameLabel) .addComponent(CoinbaseAPIUsernameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(ConfigurationCoinExchangePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(CoinbaseAPIKeyLabel) .addComponent(CoinbaseAPIKeyTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(AddCoinbaseUsernameButton) .addComponent(RemoveCoinbaseUsernameButton)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(ConfigurationCoinExchangePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(CoinbaseAPISecretKeyTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(CoinbaseAPISecretKeyLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(ConfigurationCoinExchangePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(ConfigurationCoinbaseCurrencyLabel) .addComponent(ConfigurationCoinbaseCurrencyComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(CoinbaseConfigurationSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(ConfigurationCoinExchangePanelLayout.createSequentialGroup() .addComponent(CoinbaseConfigurationVerticalSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(CurrentCoinbaseConfigurationLabel))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(CurrentCoinbaseConfigurationScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(CoinbaseConfigurationInstructionsLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(CoinbaseConfigurationInstructionsScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(21, 21, 21))); ConfigurationTabbedPane.addTab("Coin Exchange", ConfigurationCoinExchangePanel); javax.swing.GroupLayout ConfigurationPanelLayout = new javax.swing.GroupLayout(ConfigurationPanel); ConfigurationPanel.setLayout(ConfigurationPanelLayout); ConfigurationPanelLayout.setHorizontalGroup( ConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup( javax.swing.GroupLayout.Alignment.TRAILING, ConfigurationPanelLayout.createSequentialGroup() .addContainerGap().addComponent(ConfigurationTabbedPane).addContainerGap())); ConfigurationPanelLayout.setVerticalGroup( ConfigurationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(ConfigurationTabbedPane)); MainTabbedPane.addTab("Configuration", ConfigurationPanel); FileMenu.setText("File"); FileExitMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.ALT_MASK)); FileExitMenuItem.setText("Quit"); FileExitMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { FileExitMenuItemActionPerformed(evt); } }); FileMenu.add(FileExitMenuItem); BFGMInerUIMenuBar.add(FileMenu); EditMenu.setText("Edit"); EditMenu.setMnemonic(KeyEvent.VK_E); CopyMenuItem.setText("Copy"); CopyMenuItem.setMnemonic(KeyEvent.VK_C); EditMenu.add(CopyMenuItem); PasteMenuItem.setText("Paste"); PasteMenuItem.setMnemonic(KeyEvent.VK_P); EditMenu.add(PasteMenuItem); BFGMInerUIMenuBar.add(EditMenu); HelpMenu.setText("Help"); AppHelpMenuItem.setText("App Help"); AppHelpMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { AppHelpMenuItemActionPerformed(evt); } }); HelpMenu.add(AppHelpMenuItem); AboutMenuItem.setText("About BFGMinerAPI"); AboutMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { AboutMenuItemActionPerformed(evt); } }); HelpMenu.add(AboutMenuItem); BFGMInerUIMenuBar.add(HelpMenu); setJMenuBar(BFGMInerUIMenuBar); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(MainTabbedPane, javax.swing.GroupLayout.Alignment.TRAILING)); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(MainTabbedPane)); MainTabbedPane.getAccessibleContext().setAccessibleName(""); bindingGroup.bind(); pack(); }