Changeset 8397
- Timestamp:
- 01/24/05 16:18:29 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/j/IncrementalFindTextFieldHandler.java
r7258 r8397 2 2 * IncrementalFindTextFieldHandler.java 3 3 * 4 * Copyright (C) 1998-200 4Peter Graves5 * $Id: IncrementalFindTextFieldHandler.java,v 1. 5 2004-07-15 19:20:11piso Exp $4 * Copyright (C) 1998-2005 Peter Graves 5 * $Id: IncrementalFindTextFieldHandler.java,v 1.6 2005-01-24 16:18:29 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 22 22 package org.armedbear.j; 23 23 24 import java.awt.Color; 24 25 import java.awt.event.KeyEvent; 25 26 import javax.swing.SwingUtilities; … … 82 83 // Erase "not found" message (if any). 83 84 editor.status(""); 85 unhighlightTextField(); 84 86 } 85 87 … … 211 213 private void finish(KeyEvent e) 212 214 { 215 unhighlightTextField(); 213 216 if (search.getPattern() != null && search.getPatternLength() > 0) { 214 217 editor.setLastSearch(search); … … 277 280 if (pos != null) 278 281 found(pos); 279 else 282 else { 280 283 search.notFound(editor); 284 highlightTextField(); 285 } 281 286 } 282 287 … … 295 300 // Erase "not found" message (if any). 296 301 editor.status(""); 302 unhighlightTextField(); 297 303 } else 298 304 search.notFound(editor); … … 387 393 } 388 394 }; 395 396 private final void highlightTextField() 397 { 398 textField.setBackground(Color.RED); 399 } 400 401 private final void unhighlightTextField() 402 { 403 textField.setBackground(Color.WHITE); 404 } 389 405 }
Note: See TracChangeset
for help on using the changeset viewer.