Changeset 11791
- Timestamp:
- 2006-05-09T16:32:19+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/NewCollectionDetailsPrompt.java
r11778 r11791 158 158 cancel_button.addActionListener(new CancelListener()); 159 159 create_button.addActionListener(new CreateListener()); 160 description.addKeyListener(new ColorListener(description));161 160 description.addKeyListener(new DescriptionListener()); 162 title.addKeyListener(new ColorListener(title));163 161 164 162 // Layout … … 305 303 } 306 304 307 private class ColorListener308 extends KeyAdapter {309 private JTextComponent component1;310 private JTextComponent component2;311 public ColorListener(JTextComponent component) {312 this.component1 = component;313 this.component2 = null;314 }315 public ColorListener(JTextComponent component1, JTextComponent component2) {316 this.component1 = component1;317 this.component2 = component2;318 }319 public void keyPressed(KeyEvent event) {320 component1.setForeground(Configuration.getColor("coloring.editable_foreground", false));321 component1.setBackground(Configuration.getColor("coloring.editable_background", false));322 if(component2 != null) {323 component2.setForeground(Configuration.getColor("coloring.editable_foreground", false));324 component2.setBackground(Configuration.getColor("coloring.editable_background", false));325 }326 }327 }328 305 329 306 private class CreateListener
Note:
See TracChangeset
for help on using the changeset viewer.