| 
 | 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.util.mxCurve
public class mxCurve
| Field Summary | |
|---|---|
| static String | CORE_CURVEDefines the key for the central curve index | 
| protected  Map<String,Double> | curveLengthsThe curve lengths of the curves | 
|  List<mxPoint> | guidePointsThe points this curve is drawn through. | 
| protected  Map<String,double[]> | intervalsAn array of arrays of intervals. | 
| static String | LABEL_CURVEDefines the key for the label curve index | 
| protected  double | labelBufferOffset of the label curve from the curve the label curve is based on. | 
| protected  double | maxXBounds | 
| protected  double | maxYBounds | 
| protected  double | minXBounds | 
| protected  double | minYBounds | 
| protected  Map<String,mxPoint[]> | pointsA collection of arrays of curve points | 
| protected  boolean | validWhether or not the curve currently holds valid values | 
| Constructor Summary | |
|---|---|
| mxCurve() | |
| mxCurve(List<mxPoint> points) | |
| Method Summary | |
|---|---|
|  void | configureLabelCurve() | 
| protected  void | createCoreCurve()Creates the actual | 
| protected  void | createLabelCurve() | 
| protected  mxPoint[] | getBaseLabelCurve()Returns the curve the label curve is too be based on | 
|  mxRectangle | getBounds() | 
|  double | getCurveLength(String index) | 
|  mxLine | getCurveParallel(String index,
                 double distance)Returns a unit vector parallel to the curve at the specified distance along the curve. | 
|  mxPoint[] | getCurvePoints(String index)Obtains the points that make up the curve for the specified curve index. | 
|  mxPoint[] | getCurveSection(String index,
                double start,
                double end)Returns a section of the curve as an array of points | 
|  List<mxPoint> | getGuidePoints() | 
|  double[] | getIntervals(String index) | 
| protected  int | getLowerIndexOfSegment(String index,
                       double distance)Calculates the index of the lower point on the segment that contains the point distance along the | 
|  mxRectangle | getRelativeFromAbsPoint(mxPoint absPoint,
                        String index)Calculates the position of an absolute in terms relative to this curve. | 
| protected  mxPoint | intersectRectPerimeterPoint(String curveIndex,
                            mxRectangle rect,
                            int indexSeg)Returns the point at which this curve segment intersects the boundary of the given rectangle, if it does so. | 
| protected  int | intersectRectPerimeterSeg(String index,
                          mxRectangle rect)Utility method to determine within which segment the specified rectangle intersects the specified curve | 
|  boolean | intersectsRect(mxRectangle rect)Returns whether or not the rectangle passed in hits any part of this curve. | 
|  mxPoint | intersectsRectPerimeter(String index,
                        mxRectangle rect)Returns the point at which this curve intersects the boundary of the given rectangle, if it does so. | 
|  double | intersectsRectPerimeterDist(String index,
                            mxRectangle rect)Returns the distance from the start of the curve at which this curve intersects the boundary of the given rectangle, if it does so. | 
|  boolean | isLabelReversed()Whether or not the label curve starts from the end target and traces to the start of the branch | 
| protected  void | populateIntervals(String index) | 
|  void | setLabelBuffer(double buffer) | 
| protected  void | updateBounds(double pointX,
             double pointY)Updates the total bounds of this curve, increasing any dimensions, if necessary, to fit in the specified point | 
|  void | updateCurve(List<mxPoint> newPoints)Updates the existing curve using the points passed in. | 
| protected  boolean | validateCurve()Method must be called before any attempt to access curve information | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected Map<String,mxPoint[]> points
protected double minXBounds
protected double maxXBounds
protected double minYBounds
protected double maxYBounds
protected Map<String,double[]> intervals
protected Map<String,Double> curveLengths
public static String CORE_CURVE
public static String LABEL_CURVE
protected double labelBuffer
public List<mxPoint> guidePoints
protected boolean valid
| Constructor Detail | 
|---|
public mxCurve()
public mxCurve(List<mxPoint> points)
| Method Detail | 
|---|
public void setLabelBuffer(double buffer)
public mxRectangle getBounds()
protected int getLowerIndexOfSegment(String index,
                                     double distance)
public mxLine getCurveParallel(String index,
                               double distance)
index - the curve index specifying the curve to analysedistance - the distance from start to end of curve (0.0...1.0)
public mxPoint[] getCurveSection(String index,
                                 double start,
                                 double end)
index - the curve index specifying the curve to analysestart - the start position of the curve segment (0.0...1.0)end - the end position of the curve segment (0.0...1.0)
public boolean intersectsRect(mxRectangle rect)
rect - the rectangle to detect for a hit
public mxPoint intersectsRectPerimeter(String index,
                                       mxRectangle rect)
index - the curve index specifying the curve to analyserect - the whose boundary is to be tested for intersection
 with this curve
public double intersectsRectPerimeterDist(String index,
                                          mxRectangle rect)
index - the curve index specifying the curve to analyserect - the whose boundary is to be tested for intersection
 with this curve
protected int intersectRectPerimeterSeg(String index,
                                        mxRectangle rect)
index - the curve index specifying the curve to analyserect - the whose boundary is to be tested for intersection
 with this curve
protected mxPoint intersectRectPerimeterPoint(String curveIndex,
                                              mxRectangle rect,
                                              int indexSeg)
curveIndex - the curve index specifying the curve to analyserect - the whose boundary is to be tested for intersection
 with this curveindexSeg - the segments on this curve being checked
public mxRectangle getRelativeFromAbsPoint(mxPoint absPoint,
                                           String index)
absPoint - the point whose relative point is to calculatedindex - the index of the curve whom the relative position is to be 
 calculated from
protected void createCoreCurve()
public void configureLabelCurve()
public boolean isLabelReversed()
protected void createLabelCurve()
protected mxPoint[] getBaseLabelCurve()
protected void populateIntervals(String index)
public void updateCurve(List<mxPoint> newPoints)
newPoints - the new guide pointspublic mxPoint[] getCurvePoints(String index)
index - the key specifying the curve
public double[] getIntervals(String index)
public double getCurveLength(String index)
protected boolean validateCurve()
protected void updateBounds(double pointX,
                            double pointY)
public List<mxPoint> getGuidePoints()
| 
 | JGraph X 1.4.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||