📄 gradepanel.java
字号:
/* * GradePanel.java * * Created on 2004年1月15日, 下午8:42 */package romulus.UI;/** * * @author S */public class GradePanel extends javax.swing.JPanel { /** Creates new form GradePanel */ public GradePanel() { initComponents(); } void setLabel(String str){ this.InfoLabel.setText(str); } void setProcess(boolean pro){ this.GradeProgressBar.setIndeterminate(pro); } void setButton(boolean but){ this.GradeButton.setEnabled(but); } /** 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. */ private void initComponents() {//GEN-BEGIN:initComponents java.awt.GridBagConstraints gridBagConstraints; InfoLabel = new javax.swing.JLabel(); GradeProgressBar = new javax.swing.JProgressBar(); GradeButton = new javax.swing.JButton(); setLayout(new java.awt.GridBagLayout()); setFont(getFont()); InfoLabel.setFont(getFont()); InfoLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); InfoLabel.setAlignmentX(0.5F); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; add(InfoLabel, gridBagConstraints); GradeProgressBar.setFont(getFont()); GradeProgressBar.setIndeterminate(true); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; add(GradeProgressBar, gridBagConstraints); GradeButton.setFont(getFont()); GradeButton.setText("\u786e\u8ba4"); GradeButton.setAlignmentX(0.5F); GradeButton.setEnabled(false); GradeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { GradeButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; add(GradeButton, gridBagConstraints); }//GEN-END:initComponents private void GradeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_GradeButtonActionPerformed // Add your handling code here: firePropertyChange(PropName, null, null); }//GEN-LAST:event_GradeButtonActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel InfoLabel; private javax.swing.JProgressBar GradeProgressBar; private javax.swing.JButton GradeButton; // End of variables declaration//GEN-END:variables public static String PropName = "Grade Panel";}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -