Ignore:
Timestamp:
2006-07-21T00:31:54+02:00 (20 years ago)
Author:
imi
Message:
  • added Annotation Preset Tester
  • added Language selection in preferences
  • fixed merging bug where incomplete line segments were not replaced
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java

    r116 r119  
    77import java.awt.BorderLayout;
    88import java.awt.Component;
    9 import java.awt.Dimension;
    109import java.awt.Font;
    1110import java.awt.GridLayout;
     
    209208         */
    210209        public PropertiesDialog(MapFrame mapFrame) {
    211                 super(tr("Properties"), "propertiesdialog", tr("Property for selected objects."), KeyEvent.VK_P);
    212                 setPreferredSize(new Dimension(320,150));
    213                
     210                super(tr("Properties"), "propertiesdialog", tr("Property for selected objects."), KeyEvent.VK_P, 150);
     211
    214212                Vector<AnnotationPreset> allPresets = new Vector<AnnotationPreset>();
    215213                String allAnnotations = Main.pref.get("annotation.sources");
     
    219217                        String source = st.nextToken();
    220218                        try {
    221                     if (source.startsWith("http") || source.startsWith("ftp") || source.startsWith("file"))
    222                         in = new URL(source).openStream();
    223                     else if (source.startsWith("resource://"))
    224                         in = Main.class.getResourceAsStream(source.substring("resource:/".length()));
    225                     else
    226                         in = new FileInputStream(source);
    227                     allPresets.addAll(AnnotationPreset.readAll(in));
    228             } catch (IOException e) {
    229                     e.printStackTrace();
    230                     JOptionPane.showMessageDialog(Main.parent, tr("Could not read annotation preset source: {0}",source));
    231             } catch (SAXException e) {
    232                     e.printStackTrace();
    233                     JOptionPane.showMessageDialog(Main.parent, tr("Error parsing {0}: ", source)+e.getMessage());
    234             }
     219                                if (source.startsWith("http") || source.startsWith("ftp") || source.startsWith("file"))
     220                                        in = new URL(source).openStream();
     221                                else if (source.startsWith("resource://"))
     222                                        in = Main.class.getResourceAsStream(source.substring("resource:/".length()));
     223                                else
     224                                        in = new FileInputStream(source);
     225                                allPresets.addAll(AnnotationPreset.readAll(in));
     226                        } catch (IOException e) {
     227                                e.printStackTrace();
     228                                JOptionPane.showMessageDialog(Main.parent, tr("Could not read annotation preset source: {0}",source));
     229                        } catch (SAXException e) {
     230                                e.printStackTrace();
     231                                JOptionPane.showMessageDialog(Main.parent, tr("Error parsing {0}: ", source)+e.getMessage());
     232                        }
    235233                }
    236234                if (allPresets.size() > 0) {
     
    256254                                }
    257255                                annotationPresets.setSelectedIndex(0);
    258             }
     256                        }
    259257                });
    260258
Note: See TracChangeset for help on using the changeset viewer.