Changeset 7852 in josm for trunk/src


Ignore:
Timestamp:
2014-12-20T04:16:30+01:00 (10 years ago)
Author:
Don-vip
Message:

see #10858 - rename NoteDialog to NotesDialog

Location:
trunk/src/org/openstreetmap/josm
Files:
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/mapmode/AddNoteAction.java

    r7720 r7852  
    1414import org.openstreetmap.josm.gui.NoteInputDialog;
    1515import org.openstreetmap.josm.gui.Notification;
    16 import org.openstreetmap.josm.gui.dialogs.NoteDialog;
     16import org.openstreetmap.josm.gui.dialogs.NotesDialog;
    1717import org.openstreetmap.josm.tools.ImageProvider;
    1818
     
    6363
    6464        NoteInputDialog dialog = new NoteInputDialog(Main.parent, tr("Create new note"), tr("Create note"));
    65         dialog.showNoteDialog(tr("Enter a detailed comment to create a note"), NoteDialog.ICON_NEW);
     65        dialog.showNoteDialog(tr("Enter a detailed comment to create a note"), NotesDialog.ICON_NEW);
    6666
    6767        if (dialog.getValue() != 1) {
  • trunk/src/org/openstreetmap/josm/gui/MapFrame.java

    r7750 r7852  
    6666import org.openstreetmap.josm.gui.dialogs.LayerListDialog;
    6767import org.openstreetmap.josm.gui.dialogs.MapPaintDialog;
    68 import org.openstreetmap.josm.gui.dialogs.NoteDialog;
     68import org.openstreetmap.josm.gui.dialogs.NotesDialog;
    6969import org.openstreetmap.josm.gui.dialogs.RelationListDialog;
    7070import org.openstreetmap.josm.gui.dialogs.SelectionListDialog;
     
    133133    public SelectionListDialog selectionListDialog;
    134134    public PropertiesDialog propertiesDialog;
    135     public NoteDialog noteDialog;
     135    public NotesDialog noteDialog;
    136136
    137137    // Map modes
     
    245245        //TODO: remove this if statement once note support is complete
    246246        if(Main.pref.getBoolean("osm.notes.enableDownload", false)) {
    247             addToggleDialog(noteDialog = new NoteDialog());
     247            addToggleDialog(noteDialog = new NotesDialog());
    248248        }
    249249        toolBarToggle.setFloatable(false);
  • trunk/src/org/openstreetmap/josm/gui/dialogs/NotesDialog.java

    r7847 r7852  
    4343
    4444/**
    45  * Dialog to display and manipulate notes
     45 * Dialog to display and manipulate notes.
     46 * @since 7852 (renaming)
     47 * @since 7608 (creation)
    4648 */
    47 public class NoteDialog extends ToggleDialog implements LayerChangeListener {
    48 
     49public class NotesDialog extends ToggleDialog implements LayerChangeListener {
    4950
    5051    /** Small icon size for use in graphics calculations */
     
    8283
    8384    /** Creates a new toggle dialog for notes */
    84     public NoteDialog() {
     85    public NotesDialog() {
    8586        super("Notes", "notes/note_open.png", "List of notes", null, 150);
    86         if (Main.isDebugEnabled()) {
    87             Main.debug("constructed note dialog");
    88         }
    89 
    9087        addCommentAction = new AddCommentAction();
    9188        closeAction = new CloseAction();
     
    298295            }
    299296            NoteInputDialog dialog = new NoteInputDialog(Main.parent, tr("Comment on note"), tr("Add comment"));
    300             dialog.showNoteDialog(tr("Add comment to note:"), NoteDialog.ICON_COMMENT);
     297            dialog.showNoteDialog(tr("Add comment to note:"), NotesDialog.ICON_COMMENT);
    301298            if (dialog.getValue() != 1) {
    302299                Main.debug("User aborted note reopening");
     
    318315        public void actionPerformed(ActionEvent e) {
    319316            NoteInputDialog dialog = new NoteInputDialog(Main.parent, tr("Close note"), tr("Close note"));
    320             dialog.showNoteDialog(tr("Close note with message:"), NoteDialog.ICON_CLOSED);
     317            dialog.showNoteDialog(tr("Close note with message:"), NotesDialog.ICON_CLOSED);
    321318            if (dialog.getValue() != 1) {
    322319                Main.debug("User aborted note closing");
     
    356353        public void actionPerformed(ActionEvent e) {
    357354            NoteInputDialog dialog = new NoteInputDialog(Main.parent, tr("Reopen note"), tr("Reopen note"));
    358             dialog.showNoteDialog(tr("Reopen note with message:"), NoteDialog.ICON_OPEN);
     355            dialog.showNoteDialog(tr("Reopen note with message:"), NotesDialog.ICON_OPEN);
    359356            if (dialog.getValue() != 1) {
    360357                Main.debug("User aborted note reopening");
  • trunk/src/org/openstreetmap/josm/gui/layer/NoteLayer.java

    r7820 r7852  
    3030import org.openstreetmap.josm.gui.dialogs.LayerListDialog;
    3131import org.openstreetmap.josm.gui.dialogs.LayerListPopup;
    32 import org.openstreetmap.josm.gui.dialogs.NoteDialog;
     32import org.openstreetmap.josm.gui.dialogs.NotesDialog;
    3333import org.openstreetmap.josm.io.NoteExporter;
    3434import org.openstreetmap.josm.io.XmlWriter;
     
    9999            ImageIcon icon = null;
    100100            if (note.getId() < 0) {
    101                 icon = NoteDialog.ICON_NEW_SMALL;
     101                icon = NotesDialog.ICON_NEW_SMALL;
    102102            } else if (note.getState() == State.closed) {
    103                 icon = NoteDialog.ICON_CLOSED_SMALL;
     103                icon = NotesDialog.ICON_CLOSED_SMALL;
    104104            } else {
    105                 icon = NoteDialog.ICON_OPEN_SMALL;
     105                icon = NotesDialog.ICON_OPEN_SMALL;
    106106            }
    107107            int width = icon.getIconWidth();
     
    139139
    140140            g.setColor(ColorHelper.html2color(Main.pref.get("color.selected")));
    141             g.drawRect(p.x - (NoteDialog.ICON_SMALL_SIZE / 2), p.y - NoteDialog.ICON_SMALL_SIZE, NoteDialog.ICON_SMALL_SIZE - 1, NoteDialog.ICON_SMALL_SIZE - 1);
    142 
    143             int tx = p.x + (NoteDialog.ICON_SMALL_SIZE / 2) + 5;
    144             int ty = p.y - NoteDialog.ICON_SMALL_SIZE - 1;
     141            g.drawRect(p.x - (NotesDialog.ICON_SMALL_SIZE / 2), p.y - NotesDialog.ICON_SMALL_SIZE, NotesDialog.ICON_SMALL_SIZE - 1, NotesDialog.ICON_SMALL_SIZE - 1);
     142
     143            int tx = p.x + (NotesDialog.ICON_SMALL_SIZE / 2) + 5;
     144            int ty = p.y - NotesDialog.ICON_SMALL_SIZE - 1;
    145145            g.translate(tx, ty);
    146146
     
    159159    @Override
    160160    public Icon getIcon() {
    161         return NoteDialog.ICON_OPEN_SMALL;
     161        return NotesDialog.ICON_OPEN_SMALL;
    162162    }
    163163
     
    219219            Point notePoint = Main.map.mapView.getPoint(note.getLatLon());
    220220            //move the note point to the center of the icon where users are most likely to click when selecting
    221             notePoint.setLocation(notePoint.getX(), notePoint.getY() - NoteDialog.ICON_SMALL_SIZE / 2);
     221            notePoint.setLocation(notePoint.getX(), notePoint.getY() - NotesDialog.ICON_SMALL_SIZE / 2);
    222222            double dist = clickPoint.distanceSq(notePoint);
    223223            if (minDistance > dist && clickPoint.distance(notePoint) < snapDistance ) {
Note: See TracChangeset for help on using the changeset viewer.