Dockable Frames displayed in Parallel

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Dockable Frames displayed in Parallel

Postby poregan » Wed Apr 23, 2014 5:52 am

I am trying to display 3 JPanel to the west of my mainframe and a 4th panel to the east of the mainframe but I do not want to fill the entire workspace with all panels. I would like to leave the workspace area not occupied free.

I can achieve this after the fact but not on loading of the panels.

I add each frame with the following criteria:

newFrame.getContext().setInitMode(DockContext.STATE_FRAMEDOCKED);
newFrame.getContext().setInitSide(DockContext.DOCK_SIDE_WEST);

It is not clear how I can line one Frame up after another as they seem to go underneath each other.

I have also set getDockingManager().setShowWorkspace(true); in an attempt to not fill the workspace.

Are there other variables I need to user?
poregan
 
Posts: 11
Joined: Tue Dec 03, 2013 8:42 am

Re: Dockable Frames displayed in Parallel

Postby JIDE Support » Wed Apr 23, 2014 9:09 am

You can also call setInitIndex. If the frames have the same side and mode, the init index will put them in order. For the west side, they would be arranged vertically in a column. For the south side, horizontally in a row.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: Dockable Frames displayed in Parallel

Postby poregan » Wed Apr 30, 2014 7:46 am

This doesn't seem to be the case in my implementing.

When I have the following:

newFrame.getContext().setInitMode(DockContext.STATE_FRAMEDOCKED);
newFrame.getContext().setInitSide(DockContext.DOCK_SIDE_WEST);
newFrame.getContext().setInitIndex(index++);

Where the index goes from 0,1,2 for my 3 panels. They panels are displayed one under another rather next to each other going left to right.

Is there a further setting which I am missing?

If I used setInitSide(DockContext.DOCK_SIDE_SOUTH) instead they do go side by side but are stretched out in the centre. I am trying to keep the panels to the left.
poregan
 
Posts: 11
Joined: Tue Dec 03, 2013 8:42 am

Re: Dockable Frames displayed in Parallel

Postby JIDE Support » Wed Apr 30, 2014 9:15 am

As mentioned in the previous post, "For the west side, they would be arranged vertically in a column." Hence the behavior you observed are as designed. To achieve the behavior you want, please invoke DefaultDockingManager#moveFrame() to arrange the frames as you wish.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 15 guests

cron