Package com.mxgraph.shape
Class mxHtmlTextShape
- java.lang.Object
-
- com.mxgraph.shape.mxHtmlTextShape
-
- All Implemented Interfaces:
mxITextShape
public class mxHtmlTextShape extends java.lang.Object implements mxITextShape
To set global CSS for all HTML labels, use the following code:mxGraphics2DCanvas.putTextShape(mxGraphics2DCanvas.TEXT_SHAPE_HTML, new mxHtmlTextShape() { protected String createHtmlDocument(Map
style, String text) { return mxUtils.createHtmlDocument(style, text, 1, 0, ""); } } );
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
replaceHtmlLinefeeds
Specifies if linefeeds should be replaced with breaks in HTML markup.
-
Constructor Summary
Constructors Constructor Description mxHtmlTextShape()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
createHtmlDocument(java.util.Map<java.lang.String,java.lang.Object> style, java.lang.String text, int w, int h)
boolean
isReplaceHtmlLinefeeds()
Returns replaceHtmlLinefeedsvoid
paintShape(mxGraphics2DCanvas canvas, java.lang.String text, mxCellState state, java.util.Map<java.lang.String,java.lang.Object> style)
void
setReplaceHtmlLinefeeds(boolean value)
Returns replaceHtmlLinefeeds
-
-
-
Method Detail
-
isReplaceHtmlLinefeeds
public boolean isReplaceHtmlLinefeeds()
Returns replaceHtmlLinefeeds
-
setReplaceHtmlLinefeeds
public void setReplaceHtmlLinefeeds(boolean value)
Returns replaceHtmlLinefeeds
-
createHtmlDocument
protected java.lang.String createHtmlDocument(java.util.Map<java.lang.String,java.lang.Object> style, java.lang.String text, int w, int h)
-
paintShape
public void paintShape(mxGraphics2DCanvas canvas, java.lang.String text, mxCellState state, java.util.Map<java.lang.String,java.lang.Object> style)
- Specified by:
paintShape
in interfacemxITextShape
-
-