﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
10554	[patch] Add notes dialog	ToeBee	team	"Time for another big notes patch! Some comments:

== Icons ==

* Copy images/notes/note_open_24x24.png to images/dialogs/notes.png
* Copy images/notes/note_new_24x24.png to images/mapmode/addnote.png
* Add file  images/notes/note_comment.png (will attach)
* Add file images/cursor/modifier/create_note.png (will attach)

To make the note_comment.png icon I started off with something from openclipart and modified it.

Note that the create_note.png cursor modifier may look like the 16 pixel new note file but the contents are different. Apparently the cursor doesn't like having more than 3 or 4 colors in it. The dithering around the edges of the marker made the cursor do weird things so I simplified it to only have solid blue, solid white and transparency.

== UI ==

I'm not going to expect any awards for UI design here. I pretty much just duplicated the functionality of the notes plugin for now. Using a JToolTip to render the note comments on the map seems like a hack and I have some ideas for how to change it but I think I will ask for some input on the mailing list before I go too far there. Also, for right now I want to get the basics working so that I can finish the rest of the functionality (uploading and saving still need to be implemented). Then things can be made prettier.

== Internals ==

There are several things in the code that assume there will only ever be a single note layer. I don't really see how things would work if you could make two note layers. Since the note layer isn't an active editable layer but still responds to mouse events, it would be weird to have more than one. Which one would respond to note selection events? Which list of notes would be displayed in the dialog? I also don't see why you would need more than one. It's not like you can perform all that many actions on notes. They are just an aid for editing the map data. Any objections to this?

{{{NoteLayer}}} and {{{NoteDialog}}} need to communicate with each other. I'm not sure the way I have done it is ideal. Whenever {{{NoteLayer}}} modifies its collection of notes it pushes the list to {{{NoteDialog}}} through a public reference in {{{MapFrame}}}. There were already some other dialogs that did something similar. The other way I thought about doing it was to make a change listener interface and then have {{{NoteDialog}}} register itself with {{{NoteLayer}}} to receive updates. Wouldn't be hard to do and would let other things listen for note changes as well. I can't really think of much that would need it off the top of my head but who knows.

The slightly more complicated interaction is note selections. Notes can be selected in both {{{NoteDialog}}} and {{{NoteLayer}}} so they both have to communicate to each other. Layer to dialog interaction is done through the public reference in {{{MapFrame}}} again. For the dialog to talk to the layer, it registers itself to listen for layer changes and if a note layer is created, keeps a pointer to it until the layer is removed. This is also how the dialog interacts with the layer to modify notes. This is one instance of only being able to support a single layer."	enhancement	closed	normal	14.10	Core notes		fixed		ToeBee
