[josm-dev] Plugin help - change topbar toolbar josm...
Minh Quang
chumkhungbo2003 at yahoo.com
Mon Jan 11 16:56:14 GMT 2010
Thank for your help. I really appreciate it. So as you suggested, what i should do is to look at the package GUI of JOSM; there are everything i need to do on my button. But something is not really clear is that JOSM parse presets.xml to creat its preset menu, that means dans preset menu there are all of presets defined before. But after what i need to do is to access just to a group of tags ( I dont want a whole thing defined before) to our plugins.
Could you please tell me more about GUI, where i can list all the button shortcut. When i read the whole source code, I discoverd that the user can save its preference in a file. Then I just want to know where JOSM stock this file and how to read it.. Thank you very much
Best regard
--- On Mon, 1/11/10, Dirk Stöcker <openstreetmap at dstoecker.de> wrote:
From: Dirk Stöcker <openstreetmap at dstoecker.de>
Subject: Re: [josm-dev] Plugin help - change topbar toolbar josm...
To: josm-dev at openstreetmap.org
Date: Monday, January 11, 2010, 5:43 PM
On Mon, 11 Jan 2010, Minh Quang wrote:
> I read project's code source several times. I discovered some interesting classes which I will override in my plugin. We defined our "Indoor" group tags (presets) and we modified your presets.xml.
You do not need to modify the XML. You can simply add another source to the list of preset sources. This can either be done using the JOSM webpage or a plugin as you suggest.
> Now I woud like to do is to create a top icon button on the topbar toolbar as a shortcut to this tag presets (Indoor)
> "tagginggroup_Highways/Waypoints". After, I would like to create a button to draw room and then, add our "room" tag inside that.
These are two different things. First is adding the preset. This is easy. Add the presets-code to the toolbar-icon-list (use gui to do it once and look at result when you do not know the method how the unique name is built).
> ToolbarPreference is the class implementing the JOSM's toolbar?
> How you fill your two maps for the button actions?
When you create a JOSM action you can tell whether it is registered or not. Every registered action can be added to toolbar (as well as any action in menu - as long as the naming code is individual, so josm can distinguish the actions - I don't know 100% how unique name is built, but I think the action icon name is a part of it).
> How you can create a button pointing just to a group of tag (our group)?
Like above. Use GUI to try once until you understand the naming scheme. JOSMs tagging presets actions handlings menus and single entries correctly.
Ciao
-- http://www.dstoecker.eu/ (PGP key available)
-----Inline Attachment Follows-----
_______________________________________________
josm-dev mailing list
josm-dev at openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev
More information about the josm-dev
mailing list