Skip to content

Instantly share code, notes, and snippets.

Created November 19, 2016 00:47
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
public class MyCustomButton extends Button {
private static PseudoClass EXPLODING_PSEUDO_CLASS = PseudoClass.getPseudoClass("exploding");
BooleanProperty exploding;
public MyCustomButton() {
exploding = new SimpleBooleanProperty(false);
exploding.addListener(e -> pseudoClassStateChanged(EXPLODING_PSEUDO_CLASS, exploding.get()));
public void setExploding(boolean exploding) {
public boolean isExploding() {
return this.exploding.get();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment