<No Comment Entered>

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@625 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
David Craine
2002-08-03 03:10:52 +00:00
parent 9eb8098bc9
commit 9a47f1a35f
2 changed files with 21 additions and 11 deletions

Binary file not shown.

View File

@ -34,13 +34,15 @@ public class AcceleratorPropertyPage extends PropertyPage {
private JLabel jLabel1 = new JLabel();
private JComboBox jComboBox1 = new JComboBox();
private JPanel jPanel2 = new JPanel();
private JTextField jTextField1 = new JTextField();
int keycode;
int modifiers;
private FlowLayout flowLayout1 = new FlowLayout();
private JTextField jTextField2 = new JTextField();
private JTextField jTextField3 = new JTextField();
private VerticalFlowLayout verticalFlowLayout1 = new VerticalFlowLayout();
private JPanel jPanel3 = new JPanel();
private JLabel jLabel2 = new JLabel();
private JLabel jLabel3 = new JLabel();
/**
* Constuctor
@ -63,18 +65,25 @@ public class AcceleratorPropertyPage extends PropertyPage {
this.setLayout(verticalFlowLayout1);
jLabel1.setText("Select the Action");
jPanel2.setLayout(flowLayout1);
jTextField2.setPreferredSize(new Dimension(50, 21));
jTextField2.setEditable(false);
jTextField3.setPreferredSize(new Dimension(50, 21));
jTextField2.setPreferredSize(new Dimension(60, 21));
jTextField3.setEnabled(false);
jTextField3.setPreferredSize(new Dimension(60, 21));
jTextField3.setEditable(false);
jTextField1.setPreferredSize(new Dimension(50, 21));
jLabel2.setPreferredSize(new Dimension(60, 17));
jLabel2.setHorizontalAlignment(SwingConstants.CENTER);
jLabel2.setText("Mod");
jLabel3.setPreferredSize(new Dimension(60, 17));
jLabel3.setHorizontalAlignment(SwingConstants.CENTER);
jLabel3.setText("Key");
this.add(jPanel1, null);
jPanel1.add(jLabel1, null);
jPanel1.add(jComboBox1, null);
this.add(jPanel3, null);
jPanel3.add(jLabel2, null);
jPanel3.add(jLabel3, null);
this.add(jPanel2, null);
jPanel2.add(jTextField1, null);
jPanel2.add(jTextField2, null);
jPanel2.add(jTextField3, null);
jPanel2.add(jTextField2, null);
}
@ -82,8 +91,9 @@ public class AcceleratorPropertyPage extends PropertyPage {
* non-Jbuilder specific initialization stuff
*/
private void init2() {
jTextField1.addKeyListener(new KeyAdapter() {
jComboBox1.addItem("Check File");
jComboBox1.addItem("Check Project");
jTextField2.addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e)
{
keycode = e.getKeyCode();
@ -92,7 +102,7 @@ public class AcceleratorPropertyPage extends PropertyPage {
{
jTextField2.setText(KeyEvent.getKeyText(keycode));
jTextField3.setText(KeyEvent.getKeyModifiersText(modifiers));
jTextField1.setText("");
//jTextField2.setText("");
}
}
@ -101,7 +111,7 @@ public class AcceleratorPropertyPage extends PropertyPage {
{
jTextField2.setText(KeyEvent.getKeyText(keycode));
jTextField3.setText(KeyEvent.getKeyModifiersText(modifiers));
jTextField1.setText("");
//jTextField2.setText("");
}
});