Data tables in Nifty?

I’ve been playing around with JME3 for about 3 weeks now, working on a business simulation game. As such, a powerful GUI is very important to me and I’ve been thinking about using an actual Swing GUI. But I figured that Nifty seems to be quite powerful as well (although documentation for the latest version still appears to be scarce) and I might use it instead of the boring looking default-Swing stuff. But I will definitely need some kind of data table. A component to display varying amounts of data in the shape of lines and columns, possibly featuring scroll bars and other features common with such components.



Judging from the wiki (link) no such component exists. Is that the case and if yes, has anybody ever built one?



And now that I’m at it, two smaller “yes/no” questions:

  • Does Nifty have support for menu bars beyond placing buttons on a panel? :wink:
  • Does Nifty support “windows” (that is, panels that contain components and can be moved around/closed by the user)?

First of, the latest version of Nifty which you get from the SVN is still under heavy development, so documentation is scares for a reason. It’s impossible to write documentation for a library that hasn’t been finalized yet.



With regards to your actual questions…



At the moment, Nifty does not support menu bars out-of-the-box. Nifty does however have a system in place which allows you to add your own controls, effectively letting you implement the required menu functionality yourself. If this is to complicated for you to handle at this time, Nifty 1.3 is still under heavy development, so feel free to send in a feature request.



Nifty supports windows in the style you are describing, the are called panels. Nifty also supports drag-and-drop. Combining these two should give you the functionality you need.



I would need to run a few tests to see how easy or difficult it would be to implement both of these things, but I would expect the first one to be rather complex and the second one to be of medium difficulty.

Thank you for your reply. I figured that 1.3 was still in flux but I haven’t had a thorough look at the code yet, just skimming over the wiki.



As soon as I get to it I will see what I can do. Maybe I can build a simple data table myself, possibly derived from the ListBox. After all it’s basically a scrollable panel containing labels.

true

well…

it contains more then labels actually. You can define your own template, which will then be used in the listbox. For my caht control I use a combination of an image and a label.

The new 1.3 listbox would be a great start to get some inspiration for an effective data table which is a missing control indeed. I’d like to create a data table control myself but that would mean you’ll need to wait even longer for 1.3 and I’m pretty sure you don’t like that idea :smiley:



There is still room for more standard controls after the 1.3 release. A feature request for this on the sf.net nifty page tracker would help tho but I’d really would like to see someone else trying to create a custom control for this :smiley: