| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| public static enum | LayoutPathImpl.
Indicate how positions past the start and limit of the path are treated. |
| public static class | LayoutPathImpl.
Represents a path built from segments. |
| public static class | LayoutPathImpl.
Use to build a SegmentPath. |
| Modifier and Type | Field and Description |
|---|---|
| private static final Formatter | |
| private static final boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract double | |
| public static LayoutPathImpl | getPath(LayoutPathImpl.
Return a path representing the path from the origin through the points in order. |
| public abstract double | |
| public abstract Shape | |
| public Point2D | |
| public void | |
| public Point2D | |
| public void | |
| public abstract double |
| LOG | back to summary |
|---|---|
| private static final Formatter LOG | |
| LOGMAP | back to summary |
|---|---|
| private static final boolean LOGMAP | |
| LayoutPathImpl | back to summary |
|---|---|
| public LayoutPathImpl() | |
| end | back to summary |
|---|---|
| public abstract double end() | |
| getPath | back to summary |
|---|---|
| public static LayoutPathImpl getPath(LayoutPathImpl. Return a path representing the path from the origin through the points in order. | |
| length | back to summary |
|---|---|
| public abstract double length() | |
| mapShape | back to summary |
|---|---|
| public abstract Shape mapShape(Shape s) | |
| pathToPoint | back to summary |
|---|---|
| public Point2D pathToPoint(double a, double o, boolean preceding) | |
| pathToPoint | back to summary |
|---|---|
| public void pathToPoint(double a, double o, boolean preceding, Point2D pt) | |
| pointToPath | back to summary |
|---|---|
| public Point2D pointToPath(double x, double y) | |
| pointToPath | back to summary |
|---|---|
| public void pointToPath(double x, double y, Point2D pt) | |
| start | back to summary |
|---|---|
| public abstract double start() | |
| Modifier and Type | Field and Description |
|---|---|
| private AffineTransform |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public double | |
| public double | |
| public Shape | |
| public void | pathToPoint(Point2D location, boolean preceding, Point2D point)
Implements abstract java. Convert a location relative to the path to a point in user coordinates. |
| public boolean | pointToPath(Point2D pt, Point2D result)
Implements abstract java. Convert a point in user space to a location relative to the path. |
| public double |
| tx | back to summary |
|---|---|
| private AffineTransform tx | |
| EmptyPath | back to summary |
|---|---|
| public EmptyPath(AffineTransform tx) | |
| end | back to summary |
|---|---|
| public double end() Implements abstract sun. | |
| length | back to summary |
|---|---|
| public double length() Implements abstract sun. | |
| mapShape | back to summary |
|---|---|
| public Shape mapShape(Shape s) Implements abstract sun. | |
| pathToPoint | back to summary |
|---|---|
| public void pathToPoint(Point2D location, boolean preceding, Point2D point) Implements abstract java. Doc from java. Convert a location relative to the path to a point in user coordinates. The path might bend abruptly or be disjoint at the location's advance. If this is the case, the value of 'preceding' is used to disambiguate the portion of the path whose location and slope is to be used to interpret the offset. | |
| pointToPath | back to summary |
|---|---|
| public boolean pointToPath(Point2D pt, Point2D result) Implements abstract java. Doc from java. Convert a point in user space to a location relative to the path. The location is chosen so as to minimize the distance from the point to the path (e.g., the magnitude of the offset will be smallest). If there is more than one such location, the location with the smallest advance is chosen. | |
| start | back to summary |
|---|---|
| public double start() Implements abstract sun. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final LayoutPathImpl. | |
| public static final LayoutPathImpl. | |
| public static final LayoutPathImpl. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public boolean | |
| public boolean | |
| public static LayoutPathImpl. | |
| public static LayoutPathImpl. |
| CLOSED | back to summary |
|---|---|
| public static final LayoutPathImpl. | |
| EXTENDED | back to summary |
|---|---|
| public static final LayoutPathImpl. | |
| PINNED | back to summary |
|---|---|
| public static final LayoutPathImpl. | |
| EndType | back to summary |
|---|---|
| private EndType() | |
| isClosed | back to summary |
|---|---|
| public boolean isClosed() | |
| isExtended | back to summary |
|---|---|
| public boolean isExtended() | |
| isPinned | back to summary |
|---|---|
| public boolean isPinned() | |
| valueOf | back to summary |
|---|---|
| public static LayoutPathImpl. | |
| values | back to summary |
|---|---|
| public static LayoutPathImpl. | |
Note
We might want to cache more auxiliary data than the advance, but this seems adequate for now.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class | LayoutPathImpl.
This represents a line segment from the iterator. |
| pack-priv class | |
| pack-priv class | LayoutPathImpl.
Each segment will construct its own general path, mapping the provided lines into its own simple space. |
| Modifier and Type | Field and Description |
|---|---|
| private double[] | |
| pack-priv LayoutPathImpl. |
| Access | Constructor and Description |
|---|---|
| pack-priv | SegmentPath(double[] data, LayoutPathImpl.
Internal, use SegmentPathBuilder or one of the static helper functions to construct a SegmentPath. |
| Modifier and Type | Method and Description |
|---|---|
| private void | calcoffset(int index, boolean doExtend, Point2D result)
Return the location of the point passed in result as mapped to the line indicated by index. |
| public double | |
| public static LayoutPathImpl. | |
| private double | |
| private int | getSegmentIndexForAdvance(double a, boolean preceding)
Return the index of the segment associated with advance. |
| public double | |
| private int | locateAndGetIndex(Point2D loc, boolean preceding, Point2D result)
Map the point, and return the segment index. |
| private void | |
| public Shape | |
| public void | pathToPoint(Point2D location, boolean preceding, Point2D point)
Implements abstract java. Convert a location relative to the path to a point in user coordinates. |
| public boolean | pointToPath(Point2D pt, Point2D result)
Implements abstract java. Convert a point in user space to a location relative to the path. |
| public double | |
| public String |
| data | back to summary |
|---|---|
| private double[] data | |
| etype | back to summary |
|---|---|
| pack-priv LayoutPathImpl. | |
| SegmentPath | back to summary |
|---|---|
| pack-priv SegmentPath(double[] data, LayoutPathImpl. Internal, use SegmentPathBuilder or one of the static helper functions to construct a SegmentPath. | |
| calcoffset | back to summary |
|---|---|
| private void calcoffset(int index, boolean doExtend, Point2D result) Return the location of the point passed in result as mapped to the line indicated by index. If doExtend is true, extend the x value without pinning to the ends of the line. this assumes that index is valid and references a line that has non-zero length. | |
| end | back to summary |
|---|---|
| public double end() Implements abstract sun. | |
| get | back to summary |
|---|---|
| public static LayoutPathImpl. | |
| getClosedAdvance | back to summary |
|---|---|
| private double getClosedAdvance(double a, boolean preceding) Get the 'modulus' of an advance on a closed path. | |
| getSegmentIndexForAdvance | back to summary |
|---|---|
| private int getSegmentIndexForAdvance(double a, boolean preceding) Return the index of the segment associated with advance. This points to the start of the triple and is a multiple of 3 between 3 and data.length-3 inclusive. It never points to a 'moveto' triple. If the path is closed, 'a' is mapped to a value between the start and end of the path, inclusive. If preceding is true, and 'a' lies on a segment boundary, return the index of the preceding segment, else return the index of the current segment (if it is not a moveto segment) otherwise the following segment (which is never a moveto segment). Note if the path is not closed, the advance might not actually lie on the returned segment-- it might be before the first, or after the last. The first or last segment (as appropriate) will be returned in this case. | |
| length | back to summary |
|---|---|
| public double length() Implements abstract sun. | |
| locateAndGetIndex | back to summary |
|---|---|
| private int locateAndGetIndex(Point2D loc, boolean preceding, Point2D result) Map the point, and return the segment index. | |
| map | back to summary |
|---|---|
| private void map(int seg, double a, double o, Point2D pt) Map a location based on the provided segment, returning in pt. Seg must be a valid 'lineto' segment. Note if the path is closed, x must be within the start and end of the path. | |
| mapShape | back to summary |
|---|---|
| public Shape mapShape(Shape s) Implements abstract sun. | |
| pathToPoint | back to summary |
|---|---|
| public void pathToPoint(Point2D location, boolean preceding, Point2D point) Implements abstract java. Doc from java. Convert a location relative to the path to a point in user coordinates. The path might bend abruptly or be disjoint at the location's advance. If this is the case, the value of 'preceding' is used to disambiguate the portion of the path whose location and slope is to be used to interpret the offset. | |
| pointToPath | back to summary |
|---|---|
| public boolean pointToPath(Point2D pt, Point2D result) Implements abstract java. Doc from java. Convert a point in user space to a location relative to the path. The location is chosen so as to minimize the distance from the point to the path (e.g., the magnitude of the offset will be smallest). If there is more than one such location, the location with the smallest advance is chosen. | |
| start | back to summary |
|---|---|
| public double start() Implements abstract sun. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv double | |
| pack-priv double | |
| pack-priv double | |
| pack-priv double | |
| pack-priv double |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean | pin(double lo, double hi, LayoutPathImpl.
Return true if we intersect the infinitely tall rectangle with lo <= x < hi. |
| pack-priv boolean | pin(int ix, LayoutPathImpl.
Return true if we intersect the segment at ix. |
| pack-priv void | |
| pack-priv void |
| lx | back to summary |
|---|---|
| pack-priv double lx | |
| ly | back to summary |
|---|---|
| pack-priv double ly | |
| m | back to summary |
|---|---|
| pack-priv double m | |
| sx | back to summary |
|---|---|
| pack-priv double sx | |
| sy | back to summary |
|---|---|
| pack-priv double sy | |
| LineInfo | back to summary |
|---|---|
| pack-priv LineInfo() | |
| pin | back to summary |
|---|---|
| pack-priv boolean pin(double lo, double hi, LayoutPathImpl. Return true if we intersect the infinitely tall rectangle with lo <= x < hi. If we do, also return the pinned portion of ourselves in result. | |
| pin | back to summary |
|---|---|
| pack-priv boolean pin(int ix, LayoutPathImpl. Return true if we intersect the segment at ix. This takes the path end type into account and computes the relevant parameters to pass to pin(double, double, LineInfo). | |
| set | back to summary |
|---|---|
| pack-priv void set(double sx, double sy, double lx, double ly) Set the lineinfo to this line | |
| set | back to summary |
|---|---|
| pack-priv void set(LayoutPathImpl. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Point2D. | |
| pack-priv boolean | |
| pack-priv final LayoutPathImpl. | |
| pack-priv final Point2D. | |
| pack-priv final ArrayList |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public Shape | |
| pack-priv void |
| cpt | back to summary |
|---|---|
| pack-priv final Point2D. | |
| haveMT | back to summary |
|---|---|
| pack-priv boolean haveMT | |
| li | back to summary |
|---|---|
| pack-priv final LayoutPathImpl. | |
| mpt | back to summary |
|---|---|
| pack-priv final Point2D. | |
| segments | back to summary |
|---|---|
| pack-priv final ArrayList<LayoutPathImpl. | |
| Mapper | back to summary |
|---|---|
| pack-priv Mapper() | |
| close | back to summary |
|---|---|
| pack-priv void close() | |
| init | back to summary |
|---|---|
| pack-priv void init() | |
| lineTo | back to summary |
|---|---|
| pack-priv void lineTo(double x, double y) | |
| mapShape | back to summary |
|---|---|
| public Shape mapShape(Shape s) | |
| moveTo | back to summary |
|---|---|
| pack-priv void moveTo(double x, double y) | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv boolean | |
| pack-priv double | |
| pack-priv double | |
| pack-priv GeneralPath | |
| pack-priv final int | |
| pack-priv final LayoutPathImpl. | |
| pack-priv final double | |
| pack-priv final double |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void |
| broken | back to summary |
|---|---|
| pack-priv boolean broken | |
| cx | back to summary |
|---|---|
| pack-priv double cx | |
| cy | back to summary |
|---|---|
| pack-priv double cy | |
| gp | back to summary |
|---|---|
| pack-priv GeneralPath gp | |
| ix | back to summary |
|---|---|
| pack-priv final int ix | |
| temp | back to summary |
|---|---|
| pack-priv final LayoutPathImpl. | |
| ux | back to summary |
|---|---|
| pack-priv final double ux | |
| uy | back to summary |
|---|---|
| pack-priv final double uy | |
| Segment | back to summary |
|---|---|
| pack-priv Segment(int ix) | |
| close | back to summary |
|---|---|
| pack-priv void close() | |
| init | back to summary |
|---|---|
| pack-priv void init() | |
| line | back to summary |
|---|---|
| pack-priv void line(LayoutPathImpl. | |
| move | back to summary |
|---|---|
| pack-priv void move() | |
| Modifier and Type | Field and Description |
|---|---|
| private double | |
| private double[] | |
| private boolean | |
| private double | |
| private double | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public LayoutPathImpl. | build(LayoutPathImpl.
Automatically build from a list of points represented by pairs of doubles. |
| public LayoutPathImpl. | |
| public LayoutPathImpl. | |
| public void | |
| public void | |
| private void | nextPoint(double x, double y, boolean connect)
Add a new point, and increment advance if connect is true. |
| public void |
| a | back to summary |
|---|---|
| private double a | |
| data | back to summary |
|---|---|
| private double[] data | |
| pconnect | back to summary |
|---|---|
| private boolean pconnect | |
| px | back to summary |
|---|---|
| private double px | |
| py | back to summary |
|---|---|
| private double py | |
| w | back to summary |
|---|---|
| private int w | |
| SegmentPathBuilder | back to summary |
|---|---|
| public SegmentPathBuilder() Construct a SegmentPathBuilder. | |
| build | back to summary |
|---|---|
| public LayoutPathImpl. Automatically build from a list of points represented by pairs of doubles. Initial advance is zero. | |
| complete | back to summary |
|---|---|
| public LayoutPathImpl. | |
| complete | back to summary |
|---|---|
| public LayoutPathImpl. Complete building a SegmentPath. Once this is called, the builder is restored to its initial state and information about the previous path is released. The end type indicates whether to treat the path as closed, extended, or pinned. | |
| lineTo | back to summary |
|---|---|
| public void lineTo(double x, double y) Connect to a new point. If there is no data, the previous point is presumed to be 0, 0. This point is checked against the previous point, and if different, this point is added to the path and the advance extended. If this point is the same as the previous point, the path remains unchanged. | |
| moveTo | back to summary |
|---|---|
| public void moveTo(double x, double y) Move to a new point. If there is no data, this will become the first point. If there is data, and the previous call was a lineTo, this point is checked against the previous point, and if different, this starts a new segment at the same advance as the end of the last segment. If there is data, and the previous call was a moveTo, this replaces the point used for that previous call. Calling this is optional, lineTo will suffice and the initial point will be set to 0, 0. | |
| nextPoint | back to summary |
|---|---|
| private void nextPoint(double x, double y, boolean connect) Add a new point, and increment advance if connect is true. This automatically rejects duplicate points and multiple disconnected points. | |
| reset | back to summary |
|---|---|
| public void reset(int datalen) Reset the builder for a new path. Datalen is a hint of how many points will be in the path, and the working buffer will be sized to accommodate at least this number of points. If datalen is zero, the working buffer is freed (it will be allocated on first use). | |