[OpenMap Users] How to close panels?

From: Bart Jourquin <bart.jourquin_at_fucam.ac.be>
Date: Thu, 23 Dec 2004 15:42:50 +0100

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++) {

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
[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

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:06 EDT