Peppe,

I was home sick from work yesterday and I did some research so I could
try to answer your question. Here is my attempt:

There are three (3) pop-up menus associated with the LayerNamePanel in
each TaskFrame. One is for regular layers, one is for WMS layers, and
one is for Categories. The TaskFrame.createLayerNamePanel method uses
a nodeclassToLayerNamePopupMenu Map to determine which pop-up menu to
associate with each type of "node" or item showed in the
LayerNamePanel.

This map is created in the WorkbenchFrame class. It contains a member
variable called layerNamePopupMenu that is an instance of the
TitledPopupMenu class. (The WMS Layer and Category pop-up menus are
also instances of this same class.)

The FeatureInstaller class, which is used to install plug-ins in
OpenJUMP, contains a method named addPopupMenuItem. This method is
typically called in the initialize method of plug-ins that want to add
menu item entries to one of the pop-up menus. You can take a look at
the SelectAllLayerItems plug-in for an example of this.

To summarize this from a non-coder perspective, each plug-in
contributes its own entry to the pop-up menus in the Layer Tree. The
order of the menu items in the pop-up menu depends on the order in
which plug-ins are initialized. To my knowledge, the only way to
change the order in the menu is to create an Extension (which extends
FeatureInstaller) that installs all of the plug-ins for the pop-up
menus in the desired order, instead of allowing the plug-ins to be
installed in some random order of initialization.

If all of the menu items in the pop-up menus are installed by plug-ins
controlled in the JUMPConfiguration class, tweaking the order of
plug-in installation there might work as well.

The Sunburned Surveyor



On Mon, Feb 14, 2011 at 9:40 AM, Giuseppe Aruta <giuseppe_ar...@yahoo.it> wrote:
> Hi all,
> which class defines tool positions on layer tree?
> thanks
> Peppe
>
>
>
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to