Revision 1796
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.api/src/main/java/org/gvsig/tools/swing/api/ToolsSwingManager.java | ||
---|---|---|
161 | 161 |
|
162 | 162 |
public void removeBorder(JComponent component); |
163 | 163 |
|
164 |
public void addClearButton(final JTextField text, final ActionListener action);
|
|
164 |
public void addClearButton(final JTextComponent text, final ActionListener action);
|
|
165 | 165 |
|
166 |
public void addClearButton(final JTextField text);
|
|
166 |
public void addClearButton(final JTextComponent text);
|
|
167 | 167 |
|
168 | 168 |
} |
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/DefaultToolsSwingManager.java | ||
---|---|---|
28 | 28 |
import javax.swing.JScrollPane; |
29 | 29 |
import javax.swing.JSlider; |
30 | 30 |
import javax.swing.JTabbedPane; |
31 |
import javax.swing.JTextArea; |
|
31 | 32 |
import javax.swing.JTextField; |
32 | 33 |
import javax.swing.JViewport; |
33 | 34 |
import javax.swing.text.DefaultEditorKit; |
... | ... | |
430 | 431 |
} |
431 | 432 |
|
432 | 433 |
@Override |
433 |
public void addClearButton(JTextField text) {
|
|
434 |
public void addClearButton(JTextComponent text) {
|
|
434 | 435 |
this.addClearButton(text, null); |
435 | 436 |
} |
436 | 437 |
|
437 | 438 |
@Override |
438 |
public void addClearButton(final JTextField text, final ActionListener action) {
|
|
439 |
public void addClearButton(final JTextComponent text, final ActionListener action) {
|
|
439 | 440 |
final JButton btnClear = new JButton(getIcon("picker-cleartext")); |
440 | 441 |
btnClear.setBorderPainted( false ); |
441 | 442 |
btnClear.setFocusPainted( false ); |
Also available in: Unified diff