Calling addDockabke to soon hides the dockable

18 views
Skip to first unread message

cmadsen_dk

unread,
May 21, 2013, 4:16:47 AM5/21/13
to vldo...@googlegroups.com
Hello

I'm having an issue with calling readXML and then addDockable (upon startup before the JLayeredPane is visible) that cause the newly added dockable to become invisible.

If I introduce a small delay and then call addDockable the docakable appears as expected.

Is there some way of getting notified when the desktop is ready, i.e., the initial layout/rendering is done?

BR
Carsten

Lilian Chamontin

unread,
May 21, 2013, 4:34:47 AM5/21/13
to vldo...@googlegroups.com
Hi Carsten,

some questions first :

- Are these two steps done in sequence (from the same thread) or from differerent threads ?

- If it's from the same thread, is it the Swing EDT or another one ?
 

Regards,

Lilian



2013/5/21 cmadsen_dk <carste...@gmail.com>

--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes vldocking.
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse vldocking+...@googlegroups.com.
Pour envoyer un message à ce groupe, adressez un e-mail à vldo...@googlegroups.com.
Visitez ce groupe à l'adresse http://groups.google.com/group/vldocking?hl=fr .
Pour plus d'options, visitez le site https://groups.google.com/groups/opt_out .
 
 

Carsten Øland Madsen

unread,
May 23, 2013, 3:05:09 AM5/23/13
to vldo...@googlegroups.com
Hi Lilian

Thanks for helping.

It all happens on the EDT via invokeLater but before the DockingDesktop/JLayeredPane has become visible.

If I delay the addDockable with a sleep in a SwingWorker it seems to work.

Regards
Carsten

Lilian Chamontin

unread,
May 24, 2013, 3:45:19 AM5/24/13
to vldo...@googlegroups.com
Hi,

Unfortunately there's no VLDocking way to be notified when desktop is ready, and there's a workaround (SplitResizer) that uses invokeLater to position splitpanes at the right place which makes it rather difficult to implement, but I can understand the need.

Did you try with the Workspace object ? it allows you to define a layout before displaying it (and enables layout switching) and also supports the readXML() approach.

Regards,

Lilian

Carsten Øland Madsen

unread,
May 24, 2013, 3:49:50 AM5/24/13
to vldo...@googlegroups.com
Ok, If I scan the XML for the id that I want to add and I discover that it is not present is there an easy way to "inject" the dockkey in to the XML or do I have to manipulate the raw XML?


Lilian Chamontin

unread,
May 24, 2013, 3:53:20 AM5/24/13
to vldo...@googlegroups.com
you should be able to do so with through the WSDesktop API (addDockable / split / ...)

Hope it helps (my memories on this specific topic are a bit fuzzy^^)

Lilian


2013/5/24 Carsten Øland Madsen <carste...@gmail.com>
Reply all
Reply to author
Forward
0 new messages