Ignore:
Timestamp:
2013-06-29T01:23:39+02:00 (11 years ago)
Author:
Don-vip
Message:

fix #8827 - HTML rendering differ if run before or after having launched Help Browser

Location:
trunk/src/org/openstreetmap/josm/gui
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java

    r5951 r6040  
    2121import javax.swing.JOptionPane;
    2222import javax.swing.KeyStroke;
    23 import javax.swing.SwingUtilities;
    2423
    2524import org.openstreetmap.josm.gui.help.HelpBrowser;
    2625import org.openstreetmap.josm.gui.help.HelpUtil;
     26import org.openstreetmap.josm.gui.util.GuiHelper;
    2727import org.openstreetmap.josm.gui.widgets.JosmEditorPane;
    2828import org.openstreetmap.josm.tools.ImageProvider;
     
    284284     */
    285285    static public void showMessageDialogInEDT(final Component parentComponent, final Object msg, final String title, final int messageType, final String helpTopic)  {
    286         SwingUtilities.invokeLater(new Runnable() {
     286        GuiHelper.runInEDT(new Runnable() {
    287287            public void run() {
    288288                showOptionDialog(parentComponent, msg, title, messageType, null, null, null, helpTopic);
  • trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java

    r5998 r6040  
    4141import javax.swing.text.html.HTML.Tag;
    4242import javax.swing.text.html.HTMLDocument;
    43 import javax.swing.text.html.HTMLEditorKit;
    4443import javax.swing.text.html.StyleSheet;
    4544
     
    4948import org.openstreetmap.josm.gui.MainMenu;
    5049import org.openstreetmap.josm.gui.widgets.JosmEditorPane;
     50import org.openstreetmap.josm.gui.widgets.JosmHTMLEditorKit;
    5151import org.openstreetmap.josm.tools.ImageProvider;
    5252import org.openstreetmap.josm.tools.LanguageInfo.LocaleType;
     
    168168    protected void build() {
    169169        help = new JosmEditorPane();
    170         HTMLEditorKit kit = new HTMLEditorKit();
     170        JosmHTMLEditorKit kit = new JosmHTMLEditorKit();
    171171        kit.setStyleSheet(buildStyleSheet());
    172172        help.setEditorKit(kit);
  • trunk/src/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java

    r5886 r6040  
    1717import javax.swing.event.HyperlinkEvent;
    1818import javax.swing.event.HyperlinkListener;
    19 import javax.swing.text.html.HTMLEditorKit;
    2019import javax.swing.text.html.StyleSheet;
    2120
    2221import org.openstreetmap.josm.data.osm.Changeset;
    2322import org.openstreetmap.josm.gui.widgets.JosmEditorPane;
     23import org.openstreetmap.josm.gui.widgets.JosmHTMLEditorKit;
    2424import org.openstreetmap.josm.io.OsmApi;
    2525import org.openstreetmap.josm.tools.ImageProvider;
    2626
     27// FIXME this class should extend HtmlPanel instead (duplicated code in here)
    2728public class UploadParameterSummaryPanel extends JPanel implements HyperlinkListener, PropertyChangeListener{
    2829    private UploadStrategySpecification spec = new UploadStrategySpecification();
     
    127128        ss.addRule(rule);
    128129        ss.addRule("a {text-decoration: underline; color: blue}");
    129         HTMLEditorKit kit = new HTMLEditorKit();
     130        JosmHTMLEditorKit kit = new JosmHTMLEditorKit();
    130131        kit.setStyleSheet(ss);
    131132        jepMessage.setEditorKit(kit);
  • trunk/src/org/openstreetmap/josm/gui/widgets/HtmlPanel.java

    r5886 r6040  
    99import javax.swing.JPanel;
    1010import javax.swing.UIManager;
    11 import javax.swing.text.html.HTMLEditorKit;
    1211import javax.swing.text.html.StyleSheet;
    1312
     
    1918 * blue and they are underlined. There is also a CSS rule for the HTML tag <strong>
    2019 * configured.
    21  *
     20 * @since 2688
    2221 */
    2322public class HtmlPanel extends JPanel {
     
    5049        ss.addRule("a {text-decoration: underline; color: blue}");
    5150        ss.addRule("ul {margin-left: 1cm; list-style-type: disc}");
    52         HTMLEditorKit kit = new HTMLEditorKit();
     51        JosmHTMLEditorKit kit = new JosmHTMLEditorKit();
    5352        kit.setStyleSheet(ss);
    5453        jepMessage.setEditorKit(kit);
Note: See TracChangeset for help on using the changeset viewer.