| 
 | JGraph X 1.4.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mxgraph.shape.mxCurveLabelShape
public class mxCurveLabelShape
Draws the edge label along a curve derived from the curve describing the edge's path
| Nested Class Summary | |
|---|---|
|  class | mxCurveLabelShape.LabelGlyphCacheUtility class to describe the characteristics of each glyph of a branch branch label. | 
|  class | mxCurveLabelShape.LabelPositionUtility class that stores details of how the label is positioned on the curve | 
| Field Summary | |
|---|---|
| protected  mxCurve | curveCache of the points between which drawing straight lines views as a curve | 
| static FontRenderContext | frcShared FRC for font size calculations | 
| static double | LABEL_BUFFERBuffer at both ends of the label | 
| protected  mxRectangle | labelBoundsCache of the bounds of the label | 
| protected  mxCurveLabelShape.LabelGlyphCache[] | labelGlyphsCache of information describing characteristics relating to drawing each glyph of this label | 
| protected  mxCurveLabelShape.LabelPosition | labelPositionADT to encapsulate label positioning information | 
| protected  double | labelSizeCache of the total length of the branch label | 
| protected  Font | lastFontCache of the label font | 
| protected  List<mxPoint> | lastPointsCache of the last set of guide points that this label was calculated for | 
| protected  String | lastValueCache of the label text | 
| protected  boolean | rotationEnabled | 
| protected  mxCellState | stateCache the state associated with this shape | 
| Constructor Summary | |
|---|---|
| mxCurveLabelShape(mxCellState state,
                  mxCurve value) | |
| Method Summary | |
|---|---|
| protected  void | calculationLabelPosition(Map<String,Object> style,
                         String label)Hook method to override how the label is positioned on the curve | 
|  mxCurve | getCurve() | 
|  boolean | getRotationEnabled() | 
|  boolean | intersectsRect(mxRectangle rect)Returns whether or not the rectangle passed in hits any part of this curve. | 
|  void | paintShape(mxGraphics2DCanvas canvas,
           String text,
           mxCellState state,
           Map<String,Object> style) | 
| protected  void | postprocessGlyph(mxCurve curve,
                 int j,
                 double currentPos)Hook for sub-classers to perform additional processing on each glyph | 
|  void | setCurve(mxCurve curve) | 
|  void | setRotationEnabled(boolean value) | 
|  mxRectangle | updateLabelBounds(String label,
                  Map<String,Object> style)Updates the cached position and size of each glyph in the edge label. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected String lastValue
protected Font lastFont
protected List<mxPoint> lastPoints
protected mxCurve curve
protected mxCellState state
protected mxCurveLabelShape.LabelGlyphCache[] labelGlyphs
protected double labelSize
protected mxRectangle labelBounds
protected mxCurveLabelShape.LabelPosition labelPosition
public static double LABEL_BUFFER
public static FontRenderContext frc
protected boolean rotationEnabled
| Constructor Detail | 
|---|
public mxCurveLabelShape(mxCellState state,
                         mxCurve value)
| Method Detail | 
|---|
public boolean getRotationEnabled()
public void setRotationEnabled(boolean value)
public void paintShape(mxGraphics2DCanvas canvas,
                       String text,
                       mxCellState state,
                       Map<String,Object> style)
paintShape in interface mxITextShape
public mxRectangle updateLabelBounds(String label,
                                     Map<String,Object> style)
label - the entire string of the label.style - the edge style
protected void postprocessGlyph(mxCurve curve,
                                int j,
                                double currentPos)
j - the index of the labelcurrentPos - the distance along the label curve the glyph ispublic boolean intersectsRect(mxRectangle rect)
rect - the rectangle to detect for a hit
protected void calculationLabelPosition(Map<String,Object> style,
                                        String label)
style - the style of the curvelabel - the string label to be displayed on the curvepublic mxCurve getCurve()
public void setCurve(mxCurve curve)
curve - the curve to set| 
 | JGraph X 1.4.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||