|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.geometry.xy.XyPolylineBuilder
public class XyPolylineBuilder
Builder class for XyPolylines.
This class gives you a straightforward method of accumulating vertices for a polyline. It has a few extra conveniences over a raw XyDynamicPointArray. For example, you can set a minimum segment length, and it will discard points given if they are not at least that far away from the previous point.
Copyright 2007 Partner Software, Inc.
| Constructor Summary | |
|---|---|
XyPolylineBuilder()
|
|
| Method Summary | |
|---|---|
void |
append(double... coords)
Appends coordinates, which must be in the order x1, y1, x2, y2, etc. |
void |
append(double[] coords,
int start,
int size)
Appends coordinates, which must be in the order x1, y1, x2, y2, etc. |
void |
append(XyPoint point)
Adds a new point, if it is different from the current last point. |
void |
append(XyPolyline polyline)
Appends all the points in the given polyline. |
void |
clear()
Clears the current points, so that we start fresh. |
double |
getMinimumSegmentLength()
Get the current minimum segment length setting. |
int |
getPointCount()
|
XyPolyline |
getPolyline()
Returns the constructed XyPolyline, or null if there were not enough points to build one. |
boolean |
isEmpty()
Returns true if there are no points appended to this builder. |
void |
setMinimumSegmentLength(double newLength)
Sets the current minimum segment length. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XyPolylineBuilder()
| Method Detail |
|---|
public void append(XyPoint point)
public void append(XyPolyline polyline)
public void append(double... coords)
public void append(double[] coords,
int start,
int size)
public XyPolyline getPolyline()
public void clear()
public boolean isEmpty()
public int getPointCount()
public double getMinimumSegmentLength()
public void setMinimumSegmentLength(double newLength)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||