Another release of JMetro has just came out.

This time the focus has been on fixing bugs and tweaking existing styles. A bunch of these have been fixed in this release.

Besides this, a new feature has been added. It is now also possible to easily add grid lines on table like controls.

Keep on reading for details.

Adding gridlines to Table like controls

On table like controls you already had the ability to easily add alternating row colors. This was easily set by adding the JMetroStyleClass.ALTERNATING_ROW_COLORS style class to any control with cells. With this turned on, information dense controls become easier to scan because it becomes easier to distinguish between different rows.

On this new release it is now also possible to add grid lines to columns, thus making information dense table like controls even easier to read. To set this, all that’s needed is to add the JMetroStyleClass.TABLE_GRID_LINES style class to Tables or TreeTables.

TreeTableView sample in JavaFX using JMetro Light Style
TreeTableView with no gridlines (LIGHT Style)
TreeTableView with gridlines sample in JavaFX using JMetro Light Style
TreeTableView with gridlines and alternating row colors (LIGHT Style)

The pictures above show examples of using and not using this new style class. In these examples there isn’t much to gain in adding gridlines and alternating row colors but if the table/treetable has lots of data to show (e.g. a considerable number of columns, etc) the difference in ease of scanning will be greater.

Complete list of tweaks and fixes

  1. Fixes #143: Panes – Check warnings when running PanesWithBackgroundStyleClassSample
  2. Fixes #91: Label – move label in light stylesheet to the same place as dark stylesheet
  3. Fixes #131: ScrollPane – Fix control’s that use a ScrollPane like control inside and whose corners appear wrong on Dark theme
  4. Issue #137: Spinner – some buttons are slightly misaligned when using some styleclasses
  5. Fixes #137: Spinner – tweak colors for hover and pressed of decrement/increment button
  6. Fixes #94: ListView – style unfilled cells differently
  7. Fixes #156: ListView – ListCell hover background color with selected item is invalid
  8. Fixes #157: JMetro Alert – Expandable content “Expand all” Label stay in dark when the style is dark
  9. Fixes #158: JMetro TextInputDialog – TextField has a black background and a black font-color in Dark Style
  10. Fixes #159: ListView – Odd row hover effects issue when “alternating row colors” style is applied and ListView has focus
  11. Fixes #160: ListView, TreeTableView – Should have hover effects on cells even when not focused
  12. Fixes #148: TextField, PasswordField – TextFields in VBox expand outside of scene if window is resized
  13. Issue #148: TextField, PasswordField – Add TextField and PasswordField shrink glitch test
  14. Fixes #164: SplitMenuButton – Tweak hover effect when SplitMenuButton is inside a Toolbar
  15. Fixes #165: TableView, TreeTableView – Add the ability to set column gridlines on Tables
  16. TreeTableView – Make bottom border of TreeTableView header slightly darker when column grid lines are enabled
  17. Issue #170: TreeTableView – Sort arrow isn’t showing on secondary column
  18. Fixes #166: ToggleSwitch – thumbs moves out of control bounds
  19. Fixes #166: ToggleSwitch – further optimize css and further clean up ToggleSwitchSkin class
  20. Deprecate JMetro automaticallyColorPanes property
  21. Fixes #168: TableView, TreeTableView – Have gridlines in table headers too when column grid line styleclass is present
  22. Issue #168: TableView, TreeTableView – Update CSS based on changes made in 11 branch to fix header grid line issues
  23. Fixes #171: TextField – Wrong color when not focused and in DARK Style
  24. Fixes #172: TreeTableView – Collapse/Expand arrow color is wrong on DARK Style

Further changes

The property automaticallyColorPanes of JMetro class has been deprecated and will be removed on a later version.

Programmers are advised to use JMetroStyleClass.BACKGROUND instead. Add it to the styleclass list of Panes that are supposed to be a background and consequently should change their color depending on whether JMetro LIGHT Style or DARK is being used.

For other planned issues, as usual, check out the issue tracker on Github.

3 thoughts on “JMetro version 8.6.14 and 11.6.14 released

  1. Thanks for the great work! Does JMetro support dark-theme title bars? Looks like Java a whole doesn’t support dark-theme title bars. I was wondering if JMetro has custom title bars that can support dark-theme?

    • Hi Saeid,
      Thanks!

      That’s a good point. No JMetro doesn’t support dark theme title bars, nor does JavaFX have API for that.
      That’s something I’ve never actually thought about, but I guess you’d have to create a JavaFX frameless window and create your own title bar along with the window buttons..

      Something to think about.. perhaps, potentially could be a future addition to JMetro but first would be required to create a custom component: a window with custom frame and window buttons.

      Cheers

      • Indeed, seems like using frameless window and creating custom titlebar is the way to go.

        I found a few JDK tickets about supporting dark-mode for Java titlebars. It doesn’t seem like they will actually address those tickets anytime soon though. But even if they do, they are planning to inherit dark-mode flag from system. So if I use JMetro dark-mode but the system is in light-mode, it would still show light-mode.

        If you do end up making a custom titlebar, it would be great if you also add an option to include menu bars in the titlebar (like Intellij).

Leave a Reply

Your email address will not be published. Required fields are marked *