Re: [OpenMap Users] JSplitPane in OpenMap?

From: Don Dietrick <dietrick_at_bbn.com>
Date: Wed, 08 Jul 2009 23:21:52 -0400

Hi Mulone,

You can add anything you like to a MapHandler, and that object will get
passed around to all of the other BeanContextMembershipListeners. Only
BeanContextMembershipListeners will get notifications of objects added
or removed from the MapHandler, however.

I think the problem I saw before is that you are adding the MapHandler
as the visible component, and it's not a visible component. The
BasicMapPanel is the component you would see (or the MapBean, depends
what you want), and the one that needs to get added to the JSplitPane.
The BasicMapPanel contains a MapHandler, MapBean, etc.

-- Don

Mulone wrote:
> Thanks Melvin, I tried to apply your solution but I get an empty grey
> panel... Apparently I can't load a simple awt/swing component to the
> maphandler. Maybe I have to define it as "implements BeanContextChild,
> BeanContextMembershipListener". What do you think?
>
> Thanks a million,
> Mulone
>
>
> Mulone,
>
> You are definitely on the right track by adding the MapBean to your
> JSplitPane. Chances are, the MapHandler object does not know what to do with
> the JSplitPane though. Try adding it to a Container like a JFrame. See
> Below.
>
>
> JFrame frame = new JFrame();
> frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
> frame.setSize(1000, 800);
> frame.setLayout(new BorderLayout());
>
> //YOUR CODE HERE, ILL JUST CONTINUE WITH THE SPLIT PANE
>
> JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, mapBean,
> infoBr); frame.add(splitPane, BorderLayout.CENTER);
>
> frame.setVisible(true);
>
>
>
> I apologize the syntax may be off a little I just wrote this quickly to give
> you an idea of what I was talking about. Chances are you may need to extract
> the individual OpenMap components and add them to the container as well.
> Good luck.
>
> Derek Melvin
>
>
>
>

--
[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 Wed Jul 08 2009 - 23:22:09 EDT

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