0

I am doing Stocks market app, I need to display Order status changes to user. I came across ControlsFX Notification. From doc example, it looks like we can only specify simple text for it's content.

Notifications.create()
             .title("Title")
             .text("Hello Notification")
             .darkStyle()
             .show();

Is there a way to specify content Node, eg: TableView? As I would like to group a bunch of messages together, present in TableView / ListView, then show in single notification.

If not achievable with ControlsFX, any other recommendation? Thanks!

Shuwn Yuan Tee
  • 5,578
  • 6
  • 28
  • 42

1 Answers1

2

You can set a Node to display unsing graphic.

Notifications.create()
        .darkStyle()
        .title("Title")
        .graphic(new Rectangle(600, 400, Color.RED)) // sets node to display
        .hideAfter(Duration.seconds(10))
        .show();
fabian
  • 80,457
  • 12
  • 86
  • 114
  • I tried using .graphic(tableview). I am developing on Mac Book, the notification appears corrupted with graphic, showing many notifications appear overlapping each other, whereas it works OK with only text. Any idea why? I will find a way to upload screenshots here. – Shuwn Yuan Tee Jan 09 '17 at 23:53
  • I describe the Notification appears as corrupted issue here: http://stackoverflow.com/questions/41559932/controlsfx-notification-graphic-corrupted . Any idea? – Shuwn Yuan Tee Jan 10 '17 at 01:52
  • My problem is fixed, I answered my own question at http://stackoverflow.com/questions/41559932/controlsfx-notification-graphic-corrupted . Thanks! – Shuwn Yuan Tee Jan 11 '17 at 03:30