Hi all,
My app allows the user to open and close "projects" (basically a list of
layers). I would like that, when a project is closed, all the
sub-windows are also closed, before a new project can be opened.
This is relatively simple for frames (and dialogs), as their list can be
retrieved with a call to Frame.getFrames(), but the returned list
doesn't include the panels opened by a "getGUI()" used in many layers
and plugins.
I've tested a lot of tricks around the following idea...
Layer layer[] = myOpenMapFrame.getLayerHandler().getMapLayers();
for (int i = 0 ; i < layer.length ; i++) {
Component c[] = layer[i].getComponents();
for (int j = 0 ; j < c.length ; j++) {
c[i].setVisible(false);
}
}
or even layer[i].getGUI().setVisible(false) .... but without success.
Is there a way to obtain a reference to these particular windows, so
that I could close them?
Many thanks
--
Prof Dr Bart Jourquin
F.U.Ca.M. - G.T.M.
Chaussée de Binche, 151a, B7000 Mons (Belgium)
Tel. : +32 65 323293, Fax. : +32 65 315691
http://www.fucam.ac.be/jourquin
--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Thu Dec 23 2004 - 09:48:02 EST