/** * Overridden for the case that we're running with the lightweight html renderer disabled, to convert * any less-than-legal html to legal html for purposes of Swing's html rendering. * * @return The text - unless the renderer is disabled, this just return super.getText() */ public @Override String getText() { String result = super.getText(); if (swingRendering && Boolean.TRUE.equals(html)) { //Standard swing rendering needs an opening HTML tag to function, so make sure there is //one if we're not using HtmlLabelUI result = ensureHtmlTags(result); } else if (swingRendering && (html == null)) { //Cannot call isHtml() here, it will create an endless loop, so manually check the HTML status html = checkHtml(super.getText()); if (Boolean.TRUE.equals(html)) { result = ensureHtmlTags(result); } } return result; }
/** * Overridden for the case that we're running with the lightweight html renderer disabled, to convert * any less-than-legal html to legal html for purposes of Swing's html rendering. * * @return The text - unless the renderer is disabled, this just return super.getText() */ public String getText() { String result = super.getText(); if (swingRendering && Boolean.TRUE.equals(html)) { //Standard swing rendering needs an opening HTML tag to function, so make sure there is //one if we're not using HtmlLabelUI result = ensureHtmlTags (result); } else if (swingRendering && html == null) { //Cannot call isHtml() here, it will create an endless loop, so manually check the HTML status html = checkHtml (super.getText()); if (Boolean.TRUE.equals(html)) { result = ensureHtmlTags (result); } } return result; }
/** * Overridden for the case that we're running with the lightweight html renderer disabled, to convert * any less-than-legal html to legal html for purposes of Swing's html rendering. * * @return The text - unless the renderer is disabled, this just return super.getText() */ public String getText() { String result = super.getText(); if (swingRendering && Boolean.TRUE.equals(html)) { //Standard swing rendering needs an opening HTML tag to function, so make sure there is //one if we're not using HtmlLabelUI result = ensureHtmlTags (result); } else if (swingRendering && html == null) { //Cannot call isHtml() here, it will create an endless loop, so manually check the HTML status html = checkHtml (super.getText()); if (Boolean.TRUE.equals(html)) { result = ensureHtmlTags (result); } } return result; }