|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree_impl.graphics.displayelements.LabelFactory
Does the labeling, i.e. creates (screen) Label representations from LabelDisplayElements.
Different geometry-types (of the LabelDisplayElement) imply different strategies concerning the way the Labels are generated.
Constructor Summary | |
LabelFactory()
|
Method Summary | |
static double[] |
calcDeviation(int[] start,
int[] end,
java.util.List points)
Calculates the maximum deviation that points on a linestring have to the ideal line between the starting point and the end point. |
static int[][] |
calcScreenCoordinates(GeoTransform projection,
GM_Curve curve)
Calculates the screen coordinates of the given GM_Curve. |
static int[] |
calcScreenCoordinates(GeoTransform projection,
GM_Object geometry)
Returns the physical (screen) coordinates. |
static Label |
createLabel(java.lang.String caption,
java.awt.Font font,
java.awt.Color color,
java.awt.font.LineMetrics metrics,
Feature feature,
Halo halo,
int x,
int y,
int w,
int h,
double rotation,
double[] anchorPoint,
double[] displacement)
|
static Label |
createLabel(java.lang.String caption,
java.awt.Font font,
java.awt.Color color,
java.awt.font.LineMetrics metrics,
Feature feature,
Halo halo,
int x,
int y,
int w,
int h,
double rotation,
double anchorPointX,
double anchorPointY,
double displacementX,
double displacementY)
|
static java.util.ArrayList |
createLabels(GM_Curve curve,
LabelDisplayElement element,
java.awt.Graphics2D g,
GeoTransform projection)
Determines positions on the given GM_Curve where a caption could be drawn. |
static java.util.List |
createLabels(GM_MultiCurve multiCurve,
LabelDisplayElement element,
java.awt.Graphics2D g,
GeoTransform projection)
Determines positions on the given GM_MultiCurve where a caption could be drawn. |
static Label[] |
createLabels(LabelDisplayElement element,
GeoTransform projection,
java.awt.Graphics2D g)
Generates Label-representations for a given LabelDisplayElement. |
static int[] |
findPointWithDistance(int[] p0,
int[] p1,
int[] p2,
int d)
Finds a point on the line between p1 and p2 that has a certain distance from point p0 (provided that there is such a point). |
static double |
getDistance(double x1,
double y1,
double x2,
double y2)
|
static double |
getDistance(int[] p1,
int[] p2)
|
static double |
getRotation(double x1,
double y1,
double x2,
double y2)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LabelFactory()
Method Detail |
public static Label createLabel(java.lang.String caption, java.awt.Font font, java.awt.Color color, java.awt.font.LineMetrics metrics, Feature feature, Halo halo, int x, int y, int w, int h, double rotation, double anchorPointX, double anchorPointY, double displacementX, double displacementY)
public static Label createLabel(java.lang.String caption, java.awt.Font font, java.awt.Color color, java.awt.font.LineMetrics metrics, Feature feature, Halo halo, int x, int y, int w, int h, double rotation, double[] anchorPoint, double[] displacement)
public static Label[] createLabels(LabelDisplayElement element, GeoTransform projection, java.awt.Graphics2D g) throws java.lang.Exception
element
- projection
- g
-
java.lang.Exception
public static java.util.List createLabels(GM_MultiCurve multiCurve, LabelDisplayElement element, java.awt.Graphics2D g, GeoTransform projection) throws FilterEvaluationException
multiCurve
- element
- g
- projection
-
FilterEvaluationException
public static java.util.ArrayList createLabels(GM_Curve curve, LabelDisplayElement element, java.awt.Graphics2D g, GeoTransform projection) throws FilterEvaluationException
curve
- element
- g
- projection
-
FilterEvaluationException
public static double[] calcDeviation(int[] start, int[] end, java.util.List points)
The ideal line is thought to be running from left to right, the left deviation value generally is above the line, the right value is below.
start
- starting point of the linestringend
- end point of the linestringpoints
- points in between
public static int[] findPointWithDistance(int[] p0, int[] p1, int[] p2, int d)
p0
- point that is used as reference point for the distancep1
- starting point of the linep2
- end point of the lined
- distance
public static double getRotation(double x1, double y1, double x2, double y2)
public static double getDistance(int[] p1, int[] p2)
public static double getDistance(double x1, double y1, double x2, double y2)
public static int[][] calcScreenCoordinates(GeoTransform projection, GM_Curve curve)
public static int[] calcScreenCoordinates(GeoTransform projection, GM_Object geometry)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |