javaswingdashboardjide

How to use a custom layout with JIDE Dashboard


I am using Jidesoft's Dashboard framework to create a dashboard and some widgets. The problem I'm running into right now is the layout of the dashboard. I would like the user to be able to drag and drop a widget anywhere in the dashboard and not in some predefined location. In Jidesoft's example application, the developers use MigLayout to drop widgets in certain locations, i.e. predefined. So instead of using that layout, I found another one that fits my needs, Drag Layout. However, it seems like one needs to add "placeholders" to get my layout to work. The gray square in the screenshot below is a placeholder.

enter image description here

Is there a way to drag widgets from the Gadget Palette to anywhere in the dashboard without using placeholders? It seems like the placeholders get added on top of each other if I added more than one, and it seems weird to have to drag a widget into the placeholder to be able to add it to the dashboard. Also, the widgets are different sizes, and using predefined layouts would not allow the user to resize them. Moreover, the predefined layouts would also make some widgets bigger than they ought to be.

In short, my goal is to create a dashboard that allows a user to add widgets anywhere, just like in the example screenshot below. I would appreciate any comments or suggestions you may have. Thanks!

enter image description here


Solution

  • Instead of laying out the gadgets as I did in the figures above, I decided that I am simply going to use a FlowLayout. I think the former is impossible to implement as of right now. Also, the user may have trouble navigating the interface with the layout I proposed above. FlowLayout is good enough for me.