⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 prefsframe.java

📁 一个java版本数据分析显示程序
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
        colorPanel.add(label31, gridBagConstraints);        brushColButton.setBackground(new java.awt.Color(0, 0, 0));        brushColButton.setFont(new java.awt.Font("Dialog", 1, 3));        brushColButton.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 2));        brushColButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);        brushColButton.setMargin(new java.awt.Insets(0, 0, 0, 0));        brushColButton.setMaximumSize(new java.awt.Dimension(10, 10));        brushColButton.setMinimumSize(new java.awt.Dimension(10, 10));        brushColButton.setPreferredSize(new java.awt.Dimension(14, 14));        brushColButton.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                colButtonActionPerformed(evt);            }        });        gridBagConstraints = new java.awt.GridBagConstraints();        gridBagConstraints.gridx = 1;        gridBagConstraints.gridy = 3;        gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);        colorPanel.add(brushColButton, gridBagConstraints);        gridBagConstraints = new java.awt.GridBagConstraints();        gridBagConstraints.gridx = 0;        gridBagConstraints.gridy = 0;        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;        getContentPane().add(colorPanel, gridBagConstraints);        histogramPanel.setLayout(new java.awt.GridBagLayout());        histogramPanel.setBorder(new javax.swing.border.TitledBorder(new javax.swing.border.EtchedBorder(), "Histogram"));        label32.setFont(new java.awt.Font("Dialog", 0, 11));        label32.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);        label32.setText("Bins: ");        gridBagConstraints = new java.awt.GridBagConstraints();        gridBagConstraints.gridx = 0;        gridBagConstraints.gridy = 0;        gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);        histogramPanel.add(label32, gridBagConstraints);        binsField.setFont(new java.awt.Font("Dialog", 0, 10));        binsField.setHorizontalAlignment(javax.swing.JTextField.TRAILING);        binsField.setText("10");        binsField.setPreferredSize(new java.awt.Dimension(36, 18));        binsField.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                binsFieldActionPerformed(evt);            }        });        gridBagConstraints = new java.awt.GridBagConstraints();        gridBagConstraints.gridx = 1;        gridBagConstraints.gridy = 0;        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;        histogramPanel.add(binsField, gridBagConstraints);        label33.setFont(new java.awt.Font("Dialog", 0, 11));        label33.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);        label33.setText("Width: ");        gridBagConstraints = new java.awt.GridBagConstraints();        gridBagConstraints.gridx = 0;        gridBagConstraints.gridy = 1;        gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);        histogramPanel.add(label33, gridBagConstraints);        jPanel1.setLayout(new java.awt.GridLayout(3, 1));        totalRadio.setFont(new java.awt.Font("Dialog", 0, 10));        totalRadio.setSelected(true);        totalRadio.setText("total # of records");        histoWidthGroup.add(totalRadio);        totalRadio.setMargin(new java.awt.Insets(0, 0, 0, 0));        totalRadio.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                binWidthActionPerformed(evt);            }        });        jPanel1.add(totalRadio);        binRadio.setFont(new java.awt.Font("Dialog", 0, 10));        binRadio.setText("max # in bin");        histoWidthGroup.add(binRadio);        binRadio.setMargin(new java.awt.Insets(0, 0, 0, 0));        binRadio.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                binWidthActionPerformed(evt);            }        });        jPanel1.add(binRadio);        brushedRadio.setFont(new java.awt.Font("Dialog", 0, 10));        brushedRadio.setText("max brushed in bin");        histoWidthGroup.add(brushedRadio);        brushedRadio.setMargin(new java.awt.Insets(0, 0, 0, 0));        brushedRadio.addActionListener(new java.awt.event.ActionListener() {            public void actionPerformed(java.awt.event.ActionEvent evt) {                binWidthActionPerformed(evt);            }        });        jPanel1.add(brushedRadio);        gridBagConstraints = new java.awt.GridBagConstraints();        gridBagConstraints.gridx = 1;        gridBagConstraints.gridy = 1;        histogramPanel.add(jPanel1, gridBagConstraints);        gridBagConstraints = new java.awt.GridBagConstraints();        gridBagConstraints.gridx = 1;        gridBagConstraints.gridy = 0;        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;        getContentPane().add(histogramPanel, gridBagConstraints);        pack();    }//GEN-END:initComponents    private void colButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_colButtonActionPerformed        Color current = bgColButton.getBackground();        if (evt.getSource() == recordColButton) {             current = recordColButton.getBackground();        }        else if (evt.getSource() == axisColButton) {             current = axisColButton.getBackground();        }        else if (evt.getSource() == brushColButton) {             current = brushColButton.getBackground();        }         // Bring up a color chooser         Color c = JColorChooser.showDialog(this, "Choose Color", current);         if (evt.getSource() == bgColButton) {             bgColButton.setBackground(c);            parent.setBackground(c);        }        else if (evt.getSource() == recordColButton) {             recordColButton.setBackground(c);            parent.setPreference("recordColor", c);        }        else if (evt.getSource() == axisColButton) {             axisColButton.setBackground(c);            parent.setForeground(c);        }        else {             brushColButton.setBackground(c);            parent.setPreference("brushColor", c);        }     }//GEN-LAST:event_colButtonActionPerformed    private void binsFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_binsFieldActionPerformed        parent.setIntPreference("histogramBins", Integer.parseInt(binsField.getText()));    }//GEN-LAST:event_binsFieldActionPerformed    private void binWidthActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_binWidthActionPerformed        if (totalRadio.isSelected()) {            parent.setIntPreference("histogramWidth", ParallelDisplay.HISTO_TOTALREC);        }        else if (binRadio.isSelected()) {            parent.setIntPreference("histogramWidth", ParallelDisplay.HISTO_BINREC);        }        else if (brushedRadio.isSelected()) {            parent.setIntPreference("histogramWidth", ParallelDisplay.HISTO_BRUSHREC);        }    }//GEN-LAST:event_binWidthActionPerformed        /** Exit the Application */    private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm    }//GEN-LAST:event_exitForm                // Variables declaration - do not modify//GEN-BEGIN:variables    private javax.swing.JLabel label3;    private javax.swing.JLabel label2;    private javax.swing.JLabel label1;    private javax.swing.JButton brushColButton;    private javax.swing.JPanel jPanel1;    private javax.swing.JRadioButton binRadio;    private javax.swing.JButton axisColButton;    private javax.swing.JRadioButton brushedRadio;    private javax.swing.JPanel colorPanel;    private javax.swing.JRadioButton totalRadio;    private javax.swing.JLabel label33;    private javax.swing.JLabel label32;    private javax.swing.JLabel label31;    private javax.swing.JTextField binsField;    private javax.swing.JButton bgColButton;    private javax.swing.ButtonGroup histoWidthGroup;    private javax.swing.JButton recordColButton;    private javax.swing.JPanel histogramPanel;    // End of variables declaration//GEN-END:variables    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -