Skip to content

Commit

Permalink
Use image caching in GCLI (#586)
Browse files Browse the repository at this point in the history
Co-authored-by: Jamie Adams <82782908+jaadams5@users.noreply.github.com>
  • Loading branch information
gausie and jaadams5 committed Feb 8, 2022
1 parent 64751b5 commit 41a01c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/net/sourceforge/kolmafia/ImageCachingEditorKit.java
Expand Up @@ -20,7 +20,7 @@ public ViewFactory getViewFactory() {
return ImageCachingEditorKit.DEFAULT_FACTORY;
}

private static class ImageCachingViewFactory extends HTMLFactory {
protected static class ImageCachingViewFactory extends HTMLFactory {
@Override
public View create(final Element elem) {
if (elem.getAttributes().getAttribute(StyleConstants.NameAttribute) == HTML.Tag.IMG) {
Expand Down
6 changes: 3 additions & 3 deletions src/net/sourceforge/kolmafia/swingui/widget/RequestPane.java
Expand Up @@ -8,15 +8,15 @@
import javax.swing.text.*;
import javax.swing.text.html.HTML;
import javax.swing.text.html.HTMLDocument;
import javax.swing.text.html.HTMLEditorKit;
import javax.swing.text.html.HTMLWriter;
import javax.swing.text.html.InlineView;
import net.sourceforge.kolmafia.ImageCachingEditorKit;
import net.sourceforge.kolmafia.KoLConstants;
import net.sourceforge.kolmafia.preferences.Preferences;
import net.sourceforge.kolmafia.utilities.StringUtilities;

public class RequestPane extends JEditorPane {
static class WrappedHtmlEditorKit extends HTMLEditorKit {
static class WrappedHtmlEditorKit extends ImageCachingEditorKit {
private final ViewFactory viewFactory;

public WrappedHtmlEditorKit() {
Expand All @@ -29,7 +29,7 @@ public ViewFactory getViewFactory() {
return this.viewFactory;
}

private static class WrappedHtmlFactory extends HTMLEditorKit.HTMLFactory {
private static class WrappedHtmlFactory extends ImageCachingViewFactory {
@Override
public View create(Element elem) {
View view = super.create(elem);
Expand Down

0 comments on commit 41a01c1

Please sign in to comment.