Class HTMLHelper
java.lang.Object
com.nomagic.magicdraw.uml.symbols.shapes.html.HTMLHelper
The class is used for html document creation.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringapplyFontSizeStyleSheetColorOnP(String html, Font font, boolean ptUnits, int red, int green, int blue) Deprecated.static StringapplyFontSizeStyleSheetOnP(String html, Font font, boolean ptUnits) Deprecated.useHtmlStyleUtils.applyFontSizeStyleSheetOnP(String, Font, boolean)static voidapplyStyleSheet(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 StringconstructHTMLText(String text) Deprecated.static StringconstructHTMLText(String text, boolean convertCharacters, boolean addEnterAfterP) Deprecated.useHtmlTextUtilsInternal.toHtmlText(String, boolean, boolean)static HTMLDocumentcreateDefaultDocument(com.nomagic.magicdraw.uml.symbols.shapes.TextObject obj) Creates the html document for given text object with given style sheet.static ViewcreateHTMLView(com.nomagic.magicdraw.uml.symbols.shapes.TextObject object, String html, Project project) Create a html renderer for the text object and string of html.static ViewcreateHTMLView(String html, StyledDocument doc, Project project) static ViewcreateHTMLView(String html, StyledDocument document, Project project, ShapeElement object, boolean useAlphaChannelForTransparency) Create html renderer for the html text and document containerstatic ViewcreateHTMLView(String html, StyledDocument document, Project project, ShapeElement object, boolean useAlphaChannelForTransparency, JTextPane customContainer) Create html renderer for the html text and document containerstatic URLstatic StringgetHTMLBody(String text) Deprecated.static StringgetPureText(Document doc) Deprecated.static StringgetPureTextFromHTMLSource(String source) Deprecated.static booleanisHTMLText(String text) Deprecated.static StringmakeEndTag(String tag) Deprecated.static StringmakeStartTag(String tag) Deprecated.static StringremoveHTMLHeader(String text) Deprecated.static voidsetPStyleProperties(StyleSheet styleSheet, int fontSize, String family, Color foreground) Set Style propertystatic StringstringToHTMLString(String string) Deprecated.static StringwrapAsHTML(String text) Deprecated.static StringBuilderwrapAsHTML(StringBuilder text) Deprecated.static StringwrapAsHTMLDocument(String text) Deprecated.static StringwrapByHtmlBody(String text) Deprecated.
-
Field Details
-
MD_ICON_TAG
- See Also:
-
-
Constructor Details
-
HTMLHelper
public HTMLHelper()
-
-
Method Details
-
getDocumentBase
-
createHTMLView
public static View createHTMLView(com.nomagic.magicdraw.uml.symbols.shapes.TextObject object, String html, @CheckForNull Project project) Create a 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 View createHTMLView(String html, StyledDocument doc, @CheckForNull Project project) -
createHTMLView
public static View createHTMLView(String html, StyledDocument document, @CheckForNull Project project, @CheckForNull ShapeElement object, boolean useAlphaChannelForTransparency) Create html renderer for the html text and document container- Parameters:
html- the given html textdocument- documentobject- the given text object
-
createHTMLView
public static View createHTMLView(String html, StyledDocument document, @CheckForNull Project project, @CheckForNull ShapeElement object, boolean useAlphaChannelForTransparency, @CheckForNull JTextPane customContainer) Create html renderer for the html text and document container- Parameters:
html- the given html textdocument- documentobject- the given text objectcustomContainer- custom renderer component. Used to override font metrics
-
createDefaultDocument
public static 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(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(StyleSheet styleSheet, int fontSize, String family, Color foreground) Set Style property- Parameters:
styleSheet- Style sheetfontSize- Font sizefamily- Font Familyforeground- foreground color
-
applyFontSizeStyleSheetOnP
@Deprecated public static String applyFontSizeStyleSheetOnP(String html, Font font, boolean ptUnits) Deprecated.useHtmlStyleUtils.applyFontSizeStyleSheetOnP(String, Font, boolean) -
applyFontSizeStyleSheetColorOnP
@Deprecated public static String applyFontSizeStyleSheetColorOnP(String html, Font font, boolean ptUnits, int red, int green, int blue) Deprecated.useHtmlStyleUtils.applyFontSizeStyleSheetColorOnP(String, Font, boolean, int, int, int) -
wrapAsHTML
Deprecated. -
wrapAsHTML
Deprecated. -
wrapAsHTMLDocument
Deprecated. -
wrapByHtmlBody
Deprecated. -
stringToHTMLString
Deprecated. -
getPureText
Deprecated. -
getPureTextFromHTMLSource
Deprecated. -
isHTMLText
Deprecated. -
removeHTMLHeader
Deprecated. -
getHTMLBody
Deprecated. -
constructHTMLText
Deprecated. -
constructHTMLText
@Deprecated public static String constructHTMLText(String text, boolean convertCharacters, boolean addEnterAfterP) Deprecated.useHtmlTextUtilsInternal.toHtmlText(String, boolean, boolean) -
makeStartTag
Deprecated. -
makeEndTag
Deprecated.
-
HtmlStyleUtils.applyFontSizeStyleSheetColorOnP(String, Font, boolean, int, int, int)