Ignore:
Timestamp:
2015-10-23T14:50:40+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #11262 - Images not displayed correctly in Help Browser

File:
1 edited

Legend:

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

    r8415 r8933  
    22package org.openstreetmap.josm.gui.widgets;
    33
     4import javax.swing.text.ViewFactory;
    45import javax.swing.text.html.HTMLEditorKit;
    56import javax.swing.text.html.StyleSheet;
     
    89 * A subclass of {@link HTMLEditorKit} that fixes an uncommon design choice that shares the set stylesheet between all instances.
    910 * This class stores a single stylesheet per instance, as it should have be done by Sun in the first place.
     11 * Moreover it allows to display SVG images.
    1012 * @since 6040
    1113 */
    1214public class JosmHTMLEditorKit extends HTMLEditorKit {
    1315
    14     protected StyleSheet ss = super.getStyleSheet();
     16    /** Shared factory for creating HTML Views. */
     17    private static final ViewFactory FACTORY = new JosmHTMLFactory();
     18
     19    private StyleSheet ss = super.getStyleSheet();
    1520
    1621    /**
     
    4247        return ss;
    4348    }
     49
     50    @Override
     51    public ViewFactory getViewFactory() {
     52        return FACTORY;
     53    }
    4454}
Note: See TracChangeset for help on using the changeset viewer.