Skip to content

This library can shorten something in JavaFX! I was inspired by Swinger for swing which was created by Litarvan

License

Notifications You must be signed in to change notification settings

maxenceeee/JavaFX-addon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

JavaFX-

This library can be shorten something in JavaFX! I was inspired by Swinger for swing which was created by Litarvan

To begin

you just need to create a new Object (for now be CutonButton or CustomBar)

To make a CustomButton

// the image of the button will be the one
CustomButtom button = new CustomButton(new Image("url"));


// the image of the button will be the one if then when the button will be clicked
CustomButtom button = new CustomButton (new Image("url"), new Image("url"));

// now the image of the button will be the one if then when the button will be clicked and when we go over it
CustomButtom button = new CustomButton(new Image("url"), new Image("url"), new Image("url"));

To know when we click on the button

// do not put .setOnAction();
button.setListener(new MySuperListener);

then create your MySuperListener class

public MySuperListener implements JavaFXPlusEventListener {

  @Override
  public void onEvent(JavaFXPlusEvent event) {
  
  }
  
}

then reissue this to know if we click on your button

@Override
public void onEvent(JavaFXPlusEvent event) {
  if (event.getComponent().equals(button)) {
    // continue process
  }

}

About

This library can shorten something in JavaFX! I was inspired by Swinger for swing which was created by Litarvan

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages