Re: [OpenMap Users] Showing and hidding layer's palette

From: pitek <pitek@gdynia.mm.pl>
Date: Mon Dec 08 2003 - 16:30:01 EST

Hi Don,
I use default WindowSupport object. I assume it creates JDialog
for palette handling. It has ComponentAdapter added but it seems
that it is not notified about JDialog disposing in hidePalette() method.
I've tested this with simple class (see below). It doesn't work for
me. Please try this in your environment.
Regards,
Piotr

public class ExampleLayer extends com.bbn.openmap.Layer {

    public ExampleLayer() {
    }

    public java.awt.Component getGUI() {
        javax.swing.JPanel panel = new javax.swing.JPanel();
        javax.swing.JButton button = new javax.swing.JButton();
        panel.add(button);
        button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent event) {
                hidePalette();
            }
        });
        return panel;
    }

    public void projectionChanged(com.bbn.openmap.event.ProjectionEvent e) {
    }

}

----- Original Message -----
From: "Don Dietrick" <dietrick@bbn.com>
To: "pitek" <Piotr.Kaminski@ctm.gdynia.pl>
Cc: <openmap-users@bbn.com>
Sent: Thursday, December 04, 2003 11:14 PM
Subject: Re: [OpenMap Users] Showing and hidding layer's palette

> Hi Piotr,
>
> How are you creating the WindowSupport object? If you are creating
> your own, are you adding a ComponentAdapter like the Layer's version is
> doing in showPalette()?
>
> - Don
>
> On Dec 4, 2003, at 4:58 PM, pitek wrote:
>
> > Hi Don,
> > I've created layer with palette window. I'd like to add
> > 'Close' button in my palette. I know that there is 'X' button
> > on the window frame, but I need another button.
> > In my button I call hidePalette() method. Palette disappears
> > but icon in LayerPane remains yellow. LayerPane don't
> > receive componentHide event (I've checked it by enabling
> > debugging). When I click on 'X' button palette also disappears
> > and LayerPane receives componentHide event and icon becomes
> > gray. I think there is somethink wrong with hidePalette() method.
> > Or there is something wrong with my way of thinking.
> > What really happens when I click on 'X'. How this is different
> > from calling hidePalette()?
> >
> > Regards,
> > Piotr
>

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Mon Dec 8 16:32:40 2003

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:37 EDT