@OpenApiAll
public class HTMLHelper
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
HTMLHelper.Renderer
Root text view that acts as an HTML renderer.
|
| Modifier and Type | Field and Description |
|---|---|
static java.net.URL |
BASE |
static java.lang.String |
MD_ICON_TAG |
| Constructor and Description |
|---|
HTMLHelper() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
applyFontSizeStyleSheetColorOnP(java.lang.String html,
java.awt.Font font,
boolean ptUnits,
int red,
int green,
int blue)
Deprecated.
use
HtmlStyleUtils.applyFontSizeStyleSheetColorOnP(String, Font, boolean, int, int, int) |
static java.lang.String |
applyFontSizeStyleSheetOnP(java.lang.String html,
java.awt.Font font,
boolean ptUnits)
Deprecated.
use
HtmlStyleUtils.applyFontSizeStyleSheetOnP(String, Font, boolean) |
static void |
applyStyleSheet(javax.swing.text.html.StyleSheet styles,
com.nomagic.magicdraw.uml.symbols.shapes.TextObject obj,
boolean takeZoomFactor)
Changes the properties of the given style sheet according to the properties of the given text object.
|
static java.lang.String |
constructHTMLText(java.lang.String text)
Deprecated.
|
static java.lang.String |
constructHTMLText(java.lang.String text,
boolean convertCharacters,
boolean addEnterAfterP)
Deprecated.
use
HtmlTextUtilsInternal.toHtmlText(String, boolean, boolean) |
static javax.swing.text.html.HTMLDocument |
createDefaultDocument(com.nomagic.magicdraw.uml.symbols.shapes.TextObject obj)
Creates the html document for given text object with given style sheet.
|
static javax.swing.text.View |
createHTMLView(java.lang.String html,
javax.swing.text.StyledDocument doc,
Project project)
|
static javax.swing.text.View |
createHTMLView(java.lang.String html,
javax.swing.text.StyledDocument document,
Project project,
com.nomagic.magicdraw.uml.symbols.shapes.TextObject object,
boolean useAlphaChannelForTransparency)
Create an html renderer for the html text and document container
|
static javax.swing.text.View |
createHTMLView(com.nomagic.magicdraw.uml.symbols.shapes.TextObject object,
java.lang.String html,
Project project)
Create an html renderer for the text object and string of html.
|
static java.lang.String |
getHTMLBody(java.lang.String text)
Deprecated.
|
static java.lang.String |
getPureText(javax.swing.text.Document doc)
Deprecated.
|
static java.lang.String |
getPureTextFromHTMLSource(java.lang.String source)
Deprecated.
|
static boolean |
isHTMLText(java.lang.String text)
Deprecated.
|
static java.lang.String |
makeEndTag(java.lang.String tag)
Deprecated.
|
static java.lang.String |
makeStartTag(java.lang.String tag)
Deprecated.
|
static java.lang.String |
removeHTMLHeader(java.lang.String text)
Deprecated.
|
static void |
setPStyleProperties(javax.swing.text.html.StyleSheet styleSheet,
int fontSize,
java.lang.String family,
java.awt.Color foreground)
Set Style property
|
static java.lang.String |
stringToHTMLString(java.lang.String string)
Deprecated.
|
static java.lang.String |
wrapAsHTML(java.lang.String text)
Deprecated.
|
static java.lang.StringBuilder |
wrapAsHTML(java.lang.StringBuilder text)
Deprecated.
|
static java.lang.String |
wrapAsHTMLDocument(java.lang.String text)
Deprecated.
|
static java.lang.String |
wrapByHtmlBody(java.lang.String text)
Deprecated.
|
public static final java.lang.String MD_ICON_TAG
public static java.net.URL BASE
public static javax.swing.text.View createHTMLView(com.nomagic.magicdraw.uml.symbols.shapes.TextObject object,
java.lang.String html,
@CheckForNull
Project project)
object - the given text object.html - the given html text.@Deprecated
public static javax.swing.text.View createHTMLView(java.lang.String html,
javax.swing.text.StyledDocument doc,
@CheckForNull
Project project)
public static javax.swing.text.View createHTMLView(java.lang.String html,
javax.swing.text.StyledDocument document,
@CheckForNull
Project project,
@CheckForNull
com.nomagic.magicdraw.uml.symbols.shapes.TextObject object,
boolean useAlphaChannelForTransparency)
html - the given html textdocument - documentobject - the given text objectpublic static javax.swing.text.html.HTMLDocument createDefaultDocument(com.nomagic.magicdraw.uml.symbols.shapes.TextObject obj)
obj - the text object.public static void applyStyleSheet(javax.swing.text.html.StyleSheet styles,
com.nomagic.magicdraw.uml.symbols.shapes.TextObject obj,
boolean takeZoomFactor)
styles - the given style sheet.obj - the given text object.public static void setPStyleProperties(javax.swing.text.html.StyleSheet styleSheet,
int fontSize,
java.lang.String family,
java.awt.Color foreground)
styleSheet - Style sheetfontSize - Font size.family - Font Familyforeground - Fore ground color.@Deprecated
public static java.lang.String applyFontSizeStyleSheetOnP(java.lang.String html,
java.awt.Font font,
boolean ptUnits)
HtmlStyleUtils.applyFontSizeStyleSheetOnP(String, Font, boolean)@Deprecated
public static java.lang.String applyFontSizeStyleSheetColorOnP(java.lang.String html,
java.awt.Font font,
boolean ptUnits,
int red,
int green,
int blue)
HtmlStyleUtils.applyFontSizeStyleSheetColorOnP(String, Font, boolean, int, int, int)@Deprecated public static java.lang.String wrapAsHTML(java.lang.String text)
HtmlTextUtils.wrapInHtmlTag(String)@Deprecated public static java.lang.StringBuilder wrapAsHTML(java.lang.StringBuilder text)
HtmlTextUtils.wrapInHtmlTag(StringBuilder)@Deprecated public static java.lang.String wrapAsHTMLDocument(java.lang.String text)
HtmlTextUtils.wrapInHtmlBodyPTags(String)@Deprecated public static java.lang.String wrapByHtmlBody(java.lang.String text)
HtmlTextUtils.wrapInHtmlBodyNewLineTags(String)@Deprecated public static java.lang.String stringToHTMLString(java.lang.String string)
HtmlTextUtils.encodeHtmlCharacters(String)@Deprecated public static java.lang.String getPureText(javax.swing.text.Document doc)
HtmlTextUtils.toPlainText(Document)@Deprecated public static java.lang.String getPureTextFromHTMLSource(java.lang.String source)
HtmlTextUtils.toPlainText(String)@Deprecated
public static boolean isHTMLText(@CheckForNull
java.lang.String text)
HtmlTextUtils.isHtml(String)@Deprecated public static java.lang.String removeHTMLHeader(java.lang.String text)
HtmlTextUtils.removeHtmlBodyPTags(String) }@Deprecated public static java.lang.String getHTMLBody(java.lang.String text)
HtmlTextUtils.removeHtmlBodyTags(String) }@Deprecated public static java.lang.String constructHTMLText(java.lang.String text)
HtmlTextUtils.toHtmlText(String) }@Deprecated
public static java.lang.String constructHTMLText(java.lang.String text,
boolean convertCharacters,
boolean addEnterAfterP)
HtmlTextUtilsInternal.toHtmlText(String, boolean, boolean)@Deprecated public static java.lang.String makeStartTag(java.lang.String tag)
HtmlTextUtils.startTag(String)@Deprecated public static java.lang.String makeEndTag(java.lang.String tag)
HtmlTextUtils.endTag(String)