Changeset 5194 in josm for trunk/src


Ignore:
Timestamp:
2012-04-16T21:57:13+02:00 (12 years ago)
Author:
simon04
Message:

about dialog: set cursor/caret position to 0 in order to scroll to top

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

Legend:

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

    r5050 r5194  
    4545        JTabbedPane about = new JTabbedPane();
    4646
     47        Version version = Version.getInstance();
     48
    4749        JTextArea readme = new JTextArea();
    4850        readme.setEditable(false);
    4951        readme.setText(Version.loadResourceFile(Main.class.getResource("/README")));
     52        readme.setCaretPosition(0);
     53
     54        JTextArea revision = new JTextArea();
     55        revision.setEditable(false);
     56        revision.setText(version.getReleaseAttributes());
     57        revision.setCaretPosition(0);
    5058
    5159        JTextArea contribution = new JTextArea();
    5260        contribution.setEditable(false);
    5361        contribution.setText(Version.loadResourceFile(Main.class.getResource("/CONTRIBUTION")));
     62        contribution.setCaretPosition(0);
    5463
    5564        JTextArea license = new JTextArea();
    5665        license.setEditable(false);
    5766        license.setText(Version.loadResourceFile(Main.class.getResource("/LICENSE")));
    58 
    59         Version version = Version.getInstance();
     67        license.setCaretPosition(0);
    6068
    6169        JPanel info = new JPanel(new GridBagLayout());
    62         JLabel caption = new JLabel("JOSM - " + tr("Java OpenStreetMap Editor"));
     70        JLabel caption = new JLabel("JOSM " + tr("Java OpenStreetMap Editor"));
    6371        caption.setFont(new Font("Helvetica", Font.BOLD, 20));
    6472        info.add(caption, GBC.eol().fill(GBC.HORIZONTAL).insets(10,0,0,0));
     
    7684        info.add(new UrlLabel("http://josm.openstreetmap.de/newticket",2), GBC.eol().fill(GBC.HORIZONTAL));
    7785
    78         JTextArea revision = new JTextArea();
    79         revision.setEditable(false);
    80         revision.setText(version.getReleaseAttributes());
    8186        about.addTab(tr("Info"), info);
    8287        about.addTab(tr("Readme"), createScrollPane(readme));
  • trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java

    r5145 r5194  
    10631063                    a.setEditable(false);
    10641064                    a.setText(b.toString());
     1065                    a.setCaretPosition(0);
    10651066                    JOptionPane.showMessageDialog(Main.parent, new JScrollPane(a), tr("Plugin information"),
    10661067                            JOptionPane.INFORMATION_MESSAGE);
     
    10761077            description.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
    10771078            description.setBackground(UIManager.getColor("Panel.background"));
     1079            description.setCaretPosition(0);
    10781080
    10791081            pluginTab.add(description, GBC.eop().fill(GBC.HORIZONTAL));
Note: See TracChangeset for help on using the changeset viewer.