Class HTMLHelper
- java.lang.Object
-
- com.nomagic.magicdraw.uml.symbols.shapes.html.HTMLHelper
-
@OpenApiAll public class HTMLHelper extends java.lang.ObjectThe class is used for html document creation.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMD_ICON_TAG
-
Constructor Summary
Constructors Constructor Description HTMLHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.StringapplyFontSizeStyleSheetColorOnP(java.lang.String html, java.awt.Font font, boolean ptUnits, int red, int green, int blue)Deprecated.useHtmlStyleUtils.applyFontSizeStyleSheetColorOnP(String, Font, boolean, int, int, int)static java.lang.StringapplyFontSizeStyleSheetOnP(java.lang.String html, java.awt.Font font, boolean ptUnits)Deprecated.useHtmlStyleUtils.applyFontSizeStyleSheetOnP(String, Font, boolean)static voidapplyStyleSheet(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.StringconstructHTMLText(java.lang.String text)Deprecated.static java.lang.StringconstructHTMLText(java.lang.String text, boolean convertCharacters, boolean addEnterAfterP)Deprecated.useHtmlTextUtilsInternal.toHtmlText(String, boolean, boolean)static javax.swing.text.html.HTMLDocumentcreateDefaultDocument(com.nomagic.magicdraw.uml.symbols.shapes.TextObject obj)Creates the html document for given text object with given style sheet.static javax.swing.text.ViewcreateHTMLView(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 javax.swing.text.ViewcreateHTMLView(java.lang.String html, javax.swing.text.StyledDocument doc, Project project)static javax.swing.text.ViewcreateHTMLView(java.lang.String html, javax.swing.text.StyledDocument document, Project project, ShapeElement object, boolean useAlphaChannelForTransparency)Create an html renderer for the html text and document containerstatic java.net.URLgetDocumentBase()static java.lang.StringgetHTMLBody(java.lang.String text)Deprecated.static java.lang.StringgetPureText(javax.swing.text.Document doc)Deprecated.static java.lang.StringgetPureTextFromHTMLSource(java.lang.String source)Deprecated.static booleanisHTMLText(java.lang.String text)Deprecated.static java.lang.StringmakeEndTag(java.lang.String tag)Deprecated.static java.lang.StringmakeStartTag(java.lang.String tag)Deprecated.static java.lang.StringremoveHTMLHeader(java.lang.String text)Deprecated.static voidsetPStyleProperties(javax.swing.text.html.StyleSheet styleSheet, int fontSize, java.lang.String family, java.awt.Color foreground)Set Style propertystatic java.lang.StringstringToHTMLString(java.lang.String string)Deprecated.static java.lang.StringwrapAsHTML(java.lang.String text)Deprecated.static java.lang.StringBuilderwrapAsHTML(java.lang.StringBuilder text)Deprecated.static java.lang.StringwrapAsHTMLDocument(java.lang.String text)Deprecated.static java.lang.StringwrapByHtmlBody(java.lang.String text)Deprecated.
-
-
-
Field Detail
-
MD_ICON_TAG
public static final java.lang.String MD_ICON_TAG
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDocumentBase
public static java.net.URL getDocumentBase()
-
createHTMLView
public static javax.swing.text.View createHTMLView(com.nomagic.magicdraw.uml.symbols.shapes.TextObject object, java.lang.String html, @CheckForNull Project project)Create an html renderer for the text object and string of html.- Parameters:
object- the given text object.html- the given html text.
-
createHTMLView
@Deprecated public static javax.swing.text.View createHTMLView(java.lang.String html, javax.swing.text.StyledDocument doc, @CheckForNull Project project)
-
createHTMLView
public static javax.swing.text.View createHTMLView(java.lang.String html, javax.swing.text.StyledDocument document, @CheckForNull Project project, @CheckForNull ShapeElement object, boolean useAlphaChannelForTransparency)Create an html renderer for the html text and document container- Parameters:
html- the given html textdocument- documentobject- the given text object
-
createDefaultDocument
public 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.- Parameters:
obj- the text object.
-
applyStyleSheet
public 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.- Parameters:
styles- the given style sheet.obj- the given text object.
-
setPStyleProperties
public static void setPStyleProperties(javax.swing.text.html.StyleSheet styleSheet, int fontSize, java.lang.String family, java.awt.Color foreground)Set Style property- Parameters:
styleSheet- Style sheetfontSize- Font size.family- Font Familyforeground- Fore ground color.
-
applyFontSizeStyleSheetOnP
@Deprecated public static java.lang.String applyFontSizeStyleSheetOnP(java.lang.String html, java.awt.Font font, boolean ptUnits)Deprecated.useHtmlStyleUtils.applyFontSizeStyleSheetOnP(String, Font, boolean)
-
applyFontSizeStyleSheetColorOnP
@Deprecated public static java.lang.String applyFontSizeStyleSheetColorOnP(java.lang.String html, java.awt.Font font, boolean ptUnits, int red, int green, int blue)Deprecated.useHtmlStyleUtils.applyFontSizeStyleSheetColorOnP(String, Font, boolean, int, int, int)
-
wrapAsHTML
@Deprecated public static java.lang.String wrapAsHTML(java.lang.String text)
Deprecated.
-
wrapAsHTML
@Deprecated public static java.lang.StringBuilder wrapAsHTML(java.lang.StringBuilder text)
Deprecated.
-
wrapAsHTMLDocument
@Deprecated public static java.lang.String wrapAsHTMLDocument(java.lang.String text)
Deprecated.
-
wrapByHtmlBody
@Deprecated public static java.lang.String wrapByHtmlBody(java.lang.String text)
Deprecated.
-
stringToHTMLString
@Deprecated public static java.lang.String stringToHTMLString(java.lang.String string)
Deprecated.
-
getPureText
@Deprecated public static java.lang.String getPureText(javax.swing.text.Document doc)
Deprecated.
-
getPureTextFromHTMLSource
@Deprecated public static java.lang.String getPureTextFromHTMLSource(java.lang.String source)
Deprecated.
-
isHTMLText
@Deprecated public static boolean isHTMLText(@CheckForNull java.lang.String text)Deprecated.
-
removeHTMLHeader
@Deprecated public static java.lang.String removeHTMLHeader(java.lang.String text)
Deprecated.
-
getHTMLBody
@Deprecated public static java.lang.String getHTMLBody(java.lang.String text)
Deprecated.
-
constructHTMLText
@Deprecated public static java.lang.String constructHTMLText(java.lang.String text)
Deprecated.
-
constructHTMLText
@Deprecated public static java.lang.String constructHTMLText(java.lang.String text, boolean convertCharacters, boolean addEnterAfterP)Deprecated.useHtmlTextUtilsInternal.toHtmlText(String, boolean, boolean)
-
makeStartTag
@Deprecated public static java.lang.String makeStartTag(java.lang.String tag)
Deprecated.
-
makeEndTag
@Deprecated public static java.lang.String makeEndTag(java.lang.String tag)
Deprecated.
-
-