|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.graphics.displayelements.LabelFactory
public class 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<int[]> 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,
Curve curve)
Calculates the screen coordinates of the given Curve. physical screen coordinates |
static int[] |
calcScreenCoordinates(GeoTransform projection,
Geometry 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)
Deprecated. use the one with opacity instead |
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,
double opacity)
|
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)
Deprecated. use the one with opacity instead |
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,
double opacity)
|
static HorizontalLabel |
createLabelInABox(java.lang.String text,
java.awt.Font font,
java.awt.Color color,
Halo halo,
double x,
double y,
double w,
double h,
Feature feature,
GeoTransform projection)
Deprecated. use the one with opacity instead |
static HorizontalLabel |
createLabelInABox(java.lang.String text,
java.awt.Font font,
java.awt.Color color,
Halo halo,
double x,
double y,
double w,
double h,
Feature feature,
GeoTransform projection,
double opacity)
|
static java.util.ArrayList<Label> |
createLabels(Curve curve,
LabelDisplayElement element,
java.awt.Graphics2D g,
GeoTransform projection)
Determines positions on the given Curve 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 java.util.List<Label> |
createLabels(MultiCurve multiCurve,
LabelDisplayElement element,
java.awt.Graphics2D g,
GeoTransform projection)
Determines positions on the given MultiCurve where a caption could be drawn. |
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 |
---|
@Deprecated 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)
caption
- font
- color
- metrics
- feature
- halo
- x
- y
- w
- h
- rotation
- anchorPointX
- anchorPointY
- displacementX
- 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 anchorPointX, double anchorPointY, double displacementX, double displacementY, double opacity)
caption
- font
- color
- metrics
- feature
- halo
- x
- y
- w
- h
- rotation
- anchorPointX
- anchorPointY
- displacementX
- displacementY
- opacity
-
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, double opacity)
caption
- font
- color
- metrics
- feature
- halo
- x
- y
- w
- h
- rotation
- anchorPoint
- displacement
- opacity
-
@Deprecated 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)
caption
- font
- color
- metrics
- feature
- halo
- x
- y
- w
- h
- rotation
- anchorPoint
- 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<Label> createLabels(MultiCurve multiCurve, LabelDisplayElement element, java.awt.Graphics2D g, GeoTransform projection) throws FilterEvaluationException
multiCurve
- element
- g
- projection
-
FilterEvaluationException
public static java.util.ArrayList<Label> createLabels(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<int[]> 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
@Deprecated public static HorizontalLabel createLabelInABox(java.lang.String text, java.awt.Font font, java.awt.Color color, Halo halo, double x, double y, double w, double h, Feature feature, GeoTransform projection)
text
- font
- color
- halo
- x
- y
- w
- h
- feature
- projection
-
public static HorizontalLabel createLabelInABox(java.lang.String text, java.awt.Font font, java.awt.Color color, Halo halo, double x, double y, double w, double h, Feature feature, GeoTransform projection, double opacity)
text
- font
- color
- halo
- x
- y
- w
- h
- feature
- projection
- opacity
-
public static double getRotation(double x1, double y1, double x2, double y2)
x1
- y1
- x2
- y2
-
public static double getDistance(int[] p1, int[] p2)
p1
- p2
-
public static double getDistance(double x1, double y1, double x2, double y2)
x1
- y1
- x2
- y2
-
public static int[][] calcScreenCoordinates(GeoTransform projection, Curve curve)
projection
- curve
-
public static int[] calcScreenCoordinates(GeoTransform projection, Geometry geometry)
projection
- geometry
-
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org