Re: [OpenMap Users] Problem creating a custom GUI component

From: Abdullah AL-Salal <bunajim75_at_gmail.com>
Date: Fri, 24 Mar 2006 07:28:34 +0300

    Not 100% sure if it's the cause of your problem but it might be that
the empty constructor is not public? I had a similar problem when i
tried creating a custom layer. The ComponentFactory can't invoke the
empty constructor if it's not public.

Esposito, Christopher wrote:
> Greetings,
> I have written a custom GUI component to go in the horizontal list of
> tools seen in the base application - I started with the code for a
> ZoomPanel, and then modified from there, adding and deleting as needed.
> I then added it's name "probthresholdpanel" to the list of
> openmap.components in openmap.properties and added this line:
> probthresholdpanel.class=com.bbn.openmap.gui.ProbThresholdPanel
> to openmap.properties as well. I know it doesn't *really* belong in
> com.bbn.openmap.gui, but it was less fiddling with the ant script to put
> it there for now. The code for the component compiles just fine.
>
> I set the ComponentFactory debug flag and on startup I get this output:
>
> ComponentFactory.create: Failed to create
> "com.bbn.openmap.gui.ProbThresholdPanel" using component marker name
> "probthresholdpanel" - error message: InvocationTargetException: null
>
> The Javadocs for this exception describe it this way:
> "InvocationTargetException is a checked exception that wraps an
> exception thrown by an invoked method or constructor", but no
> information about the wrapped exception is actually printed so I don't
> know what actually went wrong.
>
> The class defintion for the component starts as:
> public class ProbThresholdPanel extends OMToolComponent implements
> ActionListener,
> Serializable, ChangeListener
>
> And it has a no-arg constructor.
>
> Any ideas on how to figure out why the component isn't getting
> instantiated?
>
> Chris Esposito, Ph.D.
> Associate Technical Fellow
> Boeing
> (425) 865-5322
>
>
> --
> [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"]
>
>

--
[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 Mar 23 2006 - 23:29:24 EST

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