Ignore:
Timestamp:
2010-01-25T15:30:51+01:00 (14 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)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.