Changeset 5185
- Timestamp:
- 2003-08-19T13:29:36+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/WarningDialog.java
r5164 r5185 14 14 public class WarningDialog 15 15 extends JDialog 16 implements ActionListener {16 implements ActionListener, KeyListener { 17 17 18 18 static final private Dimension LABEL_SIZE = new Dimension(150, 25); … … 90 90 ok_button.addActionListener(this); 91 91 cancel_button.addActionListener(this); 92 ok_button.addKeyListener(this); 93 cancel_button.addKeyListener(this); 92 94 // Layout 93 95 icon_label.setBorder(BorderFactory.createEmptyBorder(0,0,0,5)); … … 171 173 } 172 174 175 176 /** Gives notification of key events on the buttons */ 177 public void keyPressed(KeyEvent e) { 178 if (e.getKeyCode() == KeyEvent.VK_ENTER) { 179 // Enter: Click the button in focus 180 Object source = e.getSource(); 181 if (source instanceof AbstractButton) { 182 ((AbstractButton) source).doClick(); 183 } 184 } 185 } 186 187 public void keyReleased(KeyEvent e) { } 188 189 public void keyTyped(KeyEvent e) { } 190 191 173 192 public int display() { 174 193 ///ystem.err.println("Show " + full_property + ": " + Gatherer.config.get(full_property, false));
Note:
See TracChangeset
for help on using the changeset viewer.