Change your application theme dynamically.

I recently spent quite some time on a trivial (apparently not) issue. I wanted to deliver custom themes for my application, and allow users to radically change the look with a click in a Menu.

The difficulty went with the fact that I wanted to allow people to modify my application JAR, in order for them to ship their own theme.

Here is how I’ve done it.
Continue reading “Change your application theme dynamically.”

About caching and optimizing your application.

Working on the SpreadsheetView taught me that I had to profile my application on a regular basis. In fact, I always discover something.

But it’s not always simple to find bad implementation or memory leaks. For example, I rarely put some images inside my SpreadsheetView. I recently discovered a SpreadsheetView, built by a colleague, with the same image repeated on all rows. And just like that, you take up to 35% of your time fetching and displaying images!
Continue reading “About caching and optimizing your application.”

Close options for TabPane

Currently, you have three closing options for a TabPane, that you can set with TabClosingPolicy :

  • All_TABS : All tabs will have the option to be closed and have the cross displayed in the upper-right corner.
  • SELECTED_TAB : Only the selected tab will have the option to be closed.
  • UNAVAILABLE : Tabs can not be closed by the user.

Continue reading “Close options for TabPane”

Automatically download subtitles with FileBot

Tutorial initially written for FileBot forum : here

This tutorial is intended for people who wants to automatically download subtitles for their movies/series. Basically, everything is already written in the FileBot forums, but this tutorial aims at regrouping everything in one article.

I’m using Download Station of Synology combined to an RSS feed in order to automatically download some series (if you want to do that, it’s there). What I wanted was to also download subtitles automatically.
Continue reading “Automatically download subtitles with FileBot”

Is my Stage visible ?

In my application, I often show some “popup window” for user’s input.

Quite often, I simply use JavaFX Alert class, and it does the trick :

Alert alert = new Alert(Alert.AlertType.WARNING);
alert.setHeaderText("Be careful");
alert.setContentText("I warned you");
alert.showAndWait();

But sometimes, I need to display more complex windows and I also want to remember where the user has left the window. For example, if the user has placed the search window in the upper-left corner. If he closes it and opens it again, maybe he would like to see it appear in the same spot.
Continue reading “Is my Stage visible ?”