forked from controlsfx/controlsfx
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a clear icon click listener for ClearableTextField controlsfx#1296
- Loading branch information
bykka
committed
Aug 19, 2020
1 parent
acd5efa
commit b5ffaf0
Showing
3 changed files
with
66 additions
and
18 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
controlsfx/src/main/java/org/controlsfx/control/textfield/ClearEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.controlsfx.control.textfield; | ||
|
||
import javafx.event.EventType; | ||
import javafx.scene.input.InputEvent; | ||
|
||
/** | ||
* An event which indicates that a clear icon has been pressed in a {@link TextFields#createClearableTextField()} or {@link TextFields#createClearablePasswordField()}. | ||
* | ||
* This event is generated after cleaning a text for the TextField | ||
*/ | ||
public class ClearEvent extends InputEvent { | ||
|
||
public static final EventType<ClearEvent> CLEAR_PRESSED = new EventType<>(InputEvent.ANY, "CLEAR_PRESSED"); | ||
|
||
public ClearEvent(EventType<? extends InputEvent> eventType) { | ||
super(eventType); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters