Class HTMLHelper
java.lang.Object
com.nomagic.magicdraw.uml.symbols.shapes.html.HTMLHelper
The class is used for html document creation.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
applyFontSizeStyleSheetColorOnP
(String html, Font font, boolean ptUnits, int red, int green, int blue) Deprecated.static String
applyFontSizeStyleSheetOnP
(String html, Font font, boolean ptUnits) Deprecated.useHtmlStyleUtils.applyFontSizeStyleSheetOnP(String, Font, boolean)
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.static String
constructHTMLText
(String text) Deprecated.static String
constructHTMLText
(String text, boolean convertCharacters, boolean addEnterAfterP) Deprecated.useHtmlTextUtilsInternal.toHtmlText(String, boolean, boolean)
static HTMLDocument
createDefaultDocument
(com.nomagic.magicdraw.uml.symbols.shapes.TextObject obj) Creates the html document for given text object with given style sheet.static View
createHTMLView
(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 View
createHTMLView
(String html, StyledDocument doc, Project project) static View
createHTMLView
(String html, StyledDocument document, Project project, ShapeElement object, boolean useAlphaChannelForTransparency) Create html renderer for the html text and document containerstatic View
createHTMLView
(String html, StyledDocument document, Project project, ShapeElement object, boolean useAlphaChannelForTransparency, JTextPane customContainer) Create html renderer for the html text and document containerstatic URL
static String
getHTMLBody
(String text) Deprecated.static String
getPureText
(Document doc) Deprecated.static String
getPureTextFromHTMLSource
(String source) Deprecated.static boolean
isHTMLText
(String text) Deprecated.static String
makeEndTag
(String tag) Deprecated.static String
makeStartTag
(String tag) Deprecated.static String
removeHTMLHeader
(String text) Deprecated.static void
setPStyleProperties
(StyleSheet styleSheet, int fontSize, String family, Color foreground) Set Style propertystatic String
stringToHTMLString
(String string) Deprecated.static String
wrapAsHTML
(String text) Deprecated.static StringBuilder
wrapAsHTML
(StringBuilder text) Deprecated.static String
wrapAsHTMLDocument
(String text) Deprecated.static String
wrapByHtmlBody
(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)