deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.graphics.displayelements
Class HorizontalLabel

java.lang.Object
  extended by org.deegree.graphics.displayelements.HorizontalLabel
All Implemented Interfaces:
Label

 class HorizontalLabel
extends Object
implements Label

This is a horizontal label with style information and screen coordinates, ready to be rendered to the view.

Version:
$Revision: 18195 $ $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
Markus Schneider

Constructor Summary
HorizontalLabel(String caption, Font font, Color color, LineMetrics metrics, Feature feature, Halo halo, int x, int y, int w, int h, double[] anchorPoint, double[] displacement, double opacity)
           
 
Method Summary
 String getCaption()
           
 int getMaxX()
          Returns the rightmost x-coordinate of the label's bounding box.
 int getMaxY()
          Returns the lowermost y-coordinate of the label's bounding box.
 int getMinX()
          Returns the leftmost x-coordinate of the label's bounding box.
 int getMinY()
          Returns the uppermost x-coordinate of the label's bounding box.
 int getX()
          Returns the x-coordinate of the label.
 int getY()
          Returns the y-coordinate of the label.
 boolean intersects(Label that)
          Determines if the label intersects with another label.
 void paint(Graphics2D g)
          Renders the label (including halo) to the submitted Graphics2D context.
 void paintBoundaries(Graphics2D g)
          Renders the label's boundaries to the submitted Graphics2D context.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HorizontalLabel

HorizontalLabel(String caption,
                Font font,
                Color color,
                LineMetrics metrics,
                Feature feature,
                Halo halo,
                int x,
                int y,
                int w,
                int h,
                double[] anchorPoint,
                double[] displacement,
                double opacity)
Parameters:
caption -
font -
color -
metrics -
feature -
halo -
x -
y -
w -
h -
anchorPoint -
displacement -
Method Detail

getCaption

public String getCaption()
Returns:
the text

paintBoundaries

public void paintBoundaries(Graphics2D g)
Description copied from interface: Label
Renders the label's boundaries to the submitted Graphics2D context. Immensely useful for testing.

Specified by:
paintBoundaries in interface Label
Parameters:
g - Graphics2D context to be used

paint

public void paint(Graphics2D g)
Renders the label (including halo) to the submitted Graphics2D context.

Specified by:
paint in interface Label
Parameters:
g - Graphics2D context to be used

getX

public int getX()
Description copied from interface: Label
Returns the x-coordinate of the label.

Specified by:
getX in interface Label
Returns:
the x-coordinate of the label.

getY

public int getY()
Description copied from interface: Label
Returns the y-coordinate of the label.

Specified by:
getY in interface Label
Returns:
the y-coordinate of the label.

getMaxX

public int getMaxX()
Description copied from interface: Label
Returns the rightmost x-coordinate of the label's bounding box.

Specified by:
getMaxX in interface Label
Returns:
the rightmost x-coordinate of the label's bounding box.

getMaxY

public int getMaxY()
Description copied from interface: Label
Returns the lowermost y-coordinate of the label's bounding box.

Specified by:
getMaxY in interface Label
Returns:
the lowermost y-coordinate of the label's bounding box.

getMinX

public int getMinX()
Description copied from interface: Label
Returns the leftmost x-coordinate of the label's bounding box.

Specified by:
getMinX in interface Label
Returns:
the leftmost x-coordinate of the label's bounding box.

getMinY

public int getMinY()
Description copied from interface: Label
Returns the uppermost x-coordinate of the label's bounding box.

Specified by:
getMinY in interface Label
Returns:
the uppermost x-coordinate of the label's bounding box.

intersects

public boolean intersects(Label that)
Determines if the label intersects with another label.

Specified by:
intersects in interface Label
Parameters:
that - label to test
Returns:
true if the labels intersect

toString

public String toString()
Overrides:
toString in class Object

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org