You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Sciss Found an interesting issue with <hr> and <i> rendering in HTML content, quote:
I'm seeing an exception when using horizontal-rule <hr> in label that uses HTML:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.text.html.HRuleView.paint(HRuleView.java:148)
at javax.swing.text.BoxView.paintChild(BoxView.java:161)
at javax.swing.text.BoxView.paint(BoxView.java:433)
at javax.swing.text.BoxView.paintChild(BoxView.java:161)
at javax.swing.text.BoxView.paint(BoxView.java:433)
at javax.swing.text.ParagraphView.paint(ParagraphView.java:580)
at javax.swing.text.html.ParagraphView.paint(ParagraphView.java:233)
at javax.swing.text.BoxView.paintChild(BoxView.java:161)
at javax.swing.text.BoxView.paint(BoxView.java:433)
at javax.swing.text.html.BlockView.paint(BlockView.java:282)
at javax.swing.text.BoxView.paintChild(BoxView.java:161)
at javax.swing.text.BoxView.paint(BoxView.java:433)
at javax.swing.text.html.BlockView.paint(BlockView.java:282)
at javax.swing.text.BoxView.paintChild(BoxView.java:161)
at javax.swing.text.BoxView.paint(BoxView.java:433)
at javax.swing.text.html.BlockView.paint(BlockView.java:282)
at com.alee.utils.swing.BasicHTML$Renderer.paint(BasicHTML.java:544)
at com.alee.painter.decoration.content.AbstractTextContent.paintHtml(AbstractTextContent.java:501)
at com.alee.painter.decoration.content.AbstractTextContent.paintContent(AbstractTextContent.java:468)
at com.alee.painter.decoration.content.AbstractContent.paint(AbstractContent.java:342)
at com.alee.painter.decoration.layout.AbstractContentLayout.paintContent(AbstractContentLayout.java:265)
at com.alee.painter.decoration.content.AbstractContent.paint(AbstractContent.java:342)
at com.alee.painter.decoration.ContentDecoration.paintContent(ContentDecoration.java:157)
at com.alee.painter.decoration.WebDecoration.paint(WebDecoration.java:417)
at com.alee.painter.decoration.AbstractDecorationPainter.paint(AbstractDecorationPainter.java:1367)
at com.alee.laf.label.WebLabelUI.paint(WebLabelUI.java:172)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161)
at javax.swing.JComponent.paintComponent(JComponent.java:780)
If I remove the <hr> in the label text, the error disappears, so I suspect that it's the cause of the problem somehow. Doesn't happen with Metal LaF.
val html =
s"""<html><center> |<font size=+1><b>About BLA</b></font><p> |<p> <p><hr> |<i>Foo<i> |""".stripMargin
val lb = new javax.swing.JLabel(html)
Also element doesn't have effect (no italics rendering)
The text was updated successfully, but these errors were encountered:
Problem was in BasicHTML class replacement within WebLaF.
BasicHTML replacement was originally added to fix HTML content foreground issues ( #420 ) and host property of the Renderer view subclass was omitted. Hard to say whether it was intentional or not. Either way it doesn't cause issues described in #420 and fixes current issues so it was either an error or an optimization that didn't work out well.
There is also a possibility that foreground issue described in #420 was related to non-UIResource colors that were provided from the style back then or some missing L&F defaults.
@Sciss Found an interesting issue with
<hr>
and<i>
rendering in HTML content, quote:The text was updated successfully, but these errors were encountered: