deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.graphics.displayelements
Class RotatedLabel

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

 class RotatedLabel
extends java.lang.Object
implements Label

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

Version:
$Revision: 27114 $ $Date: 2010-09-30 16:04:40 +0200 (Do, 30 Sep 2010) $
Author:
Markus Schneider

Constructor Summary
RotatedLabel(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 opacity)
           
RotatedLabel(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)
           
 
Method Summary
 java.lang.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.
 double getRotation()
           
 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(java.awt.Graphics2D g)
          Renders the label (including halo) to the submitted Graphics2D context.
 void paintBoundaries(java.awt.Graphics2D g)
          Renders the label's boundaries to the submitted Graphics2D context.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RotatedLabel

RotatedLabel(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)

RotatedLabel

RotatedLabel(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 opacity)
Parameters:
caption -
font -
color -
metrics -
feature -
halo -
x -
y -
w -
h -
rotation -
anchorPoint -
opacity -
Method Detail

getCaption

public java.lang.String getCaption()
Returns:
caption

getRotation

public double getRotation()
Returns:
rotation

paintBoundaries

public void paintBoundaries(java.awt.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(java.awt.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 java.lang.String toString()
Overrides:
toString in class java.lang.Object

deegree 2.5 (2011/06/29 09:44 build-8-official)

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