org.deegree.graphics.displayelements
Interface Label

All Known Implementing Classes:
HorizontalLabel, RotatedLabel

public interface Label

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

Version:
$Revision: 1.3 $ $Date: 2004/03/12 15:56:46 $
Author:
Markus Schneider

Method Summary
 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(java.awt.Graphics2D g)
          Renders the label (including halo and other style information) to the submitted Graphics2D context.
 void paintBoundaries(java.awt.Graphics2D g)
          Renders the label's boundaries to the submitted Graphics2D context.
 

Method Detail

paint

public void paint(java.awt.Graphics2D g)
Renders the label (including halo and other style information) to the submitted Graphics2D context.

Parameters:
g - Graphics2D context to be used

paintBoundaries

public void paintBoundaries(java.awt.Graphics2D g)
Renders the label's boundaries to the submitted Graphics2D context. Immensely useful for testing.

Parameters:
g - Graphics2D context to be used

intersects

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

Parameters:
that - label to test
Returns:
true if the labels intersect

getX

public int getX()
Returns the x-coordinate of the label.

Returns:

getY

public int getY()
Returns the y-coordinate of the label.

Returns:

getMaxX

public int getMaxX()
Returns the rightmost x-coordinate of the label's bounding box.

Returns:

getMaxY

public int getMaxY()
Returns the lowermost y-coordinate of the label's bounding box.

Returns:

getMinX

public int getMinX()
Returns the leftmost x-coordinate of the label's bounding box.

Returns:

getMinY

public int getMinY()
Returns the uppermost x-coordinate of the label's bounding box.

Returns: