Changeset 2891 in josm for trunk/src


Ignore:
Timestamp:
2010-01-25T15:30:51+01:00 (10 years ago)
Author:
bastiK
Message:

Made the bbox display in the 'Bookmarks' tab of the download dialog copy/selectable. (To be used for xapi request and similar)

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/coor/LatLon.java

    r2845 r2891  
    3434    private static DecimalFormat cDmsMinuteFormatter = new DecimalFormat("00");
    3535    private static DecimalFormat cDmsSecondFormatter = new DecimalFormat("00.0");
    36     private static DecimalFormat cDdFormatter = new DecimalFormat("###0.0000");
     36    private static DecimalFormat cDdFormatter = new DecimalFormat("###0.00000");
    3737
    3838    /**
     
    5656    }
    5757
     58    /**
     59     * Replies the coordinate in degrees/minutes/seconds format
     60     */
    5861    public static String dms(double pCoordinate) {
    5962
  • trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java

    r2626 r2891  
    1717import javax.swing.JPanel;
    1818import javax.swing.JScrollPane;
     19import javax.swing.JTextArea;
    1920import javax.swing.SwingUtilities;
    2021import javax.swing.event.ListSelectionEvent;
     
    4950    /** displays information about the current download area */
    5051    private JMultilineLabel lblCurrentDownloadArea;
     52    final private JTextArea bboxDisplay = new JTextArea();
    5153    /** the add action */
    5254    private AddAction actAdd;
     
    8587        GridBagConstraints  gc = new GridBagConstraints();
    8688        gc.anchor = GridBagConstraints.NORTHWEST;
    87         gc.fill = GridBagConstraints.BOTH;
    88         gc.weightx = 1.0;
    89         gc.weighty = 1.0;
    9089        gc.insets = new Insets(5,5,5,5);
    91 
    9290        pnl.add(lblCurrentDownloadArea = new JMultilineLabel(""), gc);
     91       
     92        gc.weightx = 1.0;
     93        gc.weighty = 1.0;
     94        bboxDisplay.setEditable(false);
     95        bboxDisplay.setBackground(pnl.getBackground());
     96        bboxDisplay.addFocusListener(new BoundingBoxSelection.SelectAllOnFocusHandler(bboxDisplay));
     97        pnl.add(bboxDisplay, gc);
    9398
    9499        gc.anchor = GridBagConstraints.NORTHEAST;
     
    147152            lblCurrentDownloadArea.setText(tr("<html>There is currently no download area selected.</html>"));
    148153        } else {
    149             lblCurrentDownloadArea.setText(tr("<html><strong>Current download area</strong> (minlat,minlon, maxlat, maxlon): {0}, {1}, {2}, {3}</html>",
    150                     currentArea.getMin().latToString(CoordinateFormat.DECIMAL_DEGREES),
    151                     currentArea.getMin().lonToString(CoordinateFormat.DECIMAL_DEGREES),
    152                     currentArea.getMax().latToString(CoordinateFormat.DECIMAL_DEGREES),
     154            lblCurrentDownloadArea.setText(tr("<html><strong>Current download area</strong> (minlat,minlon, maxlat, maxlon): </html>"));
     155            bboxDisplay.setText(
     156                    currentArea.getMin().latToString(CoordinateFormat.DECIMAL_DEGREES)+","+
     157                    currentArea.getMin().lonToString(CoordinateFormat.DECIMAL_DEGREES)+","+
     158                    currentArea.getMax().latToString(CoordinateFormat.DECIMAL_DEGREES)+","+
    153159                    currentArea.getMax().lonToString(CoordinateFormat.DECIMAL_DEGREES)
    154             )
    155160            );
    156161        }
Note: See TracChangeset for help on using the changeset viewer.