Interface ILcdGXYLabelPainter
- All Superinterfaces:
Cloneable
,Serializable
- All Known Subinterfaces:
ILcdGXYLabelPainter2
,ILcdGXYMultiLabelPainter
- All Known Implementing Classes:
ALcdGXYLabelPainter
,ALcdSLDFeatureTypeStylePainter
,ALcdSLDRulePainter
,TLcdAIXM51AirspaceLabelPainter
,TLcdAIXM51NavaidLabelPainter
,TLcdAIXM51XPathLabelPainter
,TLcdGXYCompositeLabelPainter
,TLcdGXYCurvedPathLabelPainter
,TLcdGXYDataObjectLabelPainter
,TLcdGXYDataObjectPolygonLabelPainter
,TLcdGXYDataObjectPolylineLabelPainter
,TLcdGXYEditableLabelPainter
,TLcdGXYFeaturedLabelPainter
,TLcdGXYFeaturedPolygonLabelPainter
,TLcdGXYFeaturedPolylineLabelPainter
,TLcdGXYHaloLabelPainter
,TLcdGXYHaloLabelPainter2
,TLcdGXYLabelPainter
,TLcdGXYLabelPainterAdapter
,TLcdGXYMultiFontLabelPainter
,TLcdGXYOffsetIconPainter
,TLcdGXYOutlinePolylineLabelPainter
,TLcdGXYPolygonLabelPainter
,TLcdGXYPolygonStampLabelPainter
,TLcdGXYPolylineLabelPainter
,TLcdGXYPolylineStampLabelPainter
,TLcdGXYProcedureTrajectoryLegLabelPainter
,TLcdGXYStampLabelPainter
,TLcdICAOAirspaceDetailedLabelPainter
,TLcdICAOAirspaceLabelPainter
,TLcdICAOAreaMinimumAltitudeLabelPainter
,TLcdICAODMELabelPainter
,TLcdICAONavaidLabelPainter
,TLcdICAONDBLabelPainter
,TLcdICAOTACANLabelPainter
,TLcdICAOVORLabelPainter
,TLcdMagneticNorthGXYLabelPainter
,TLcdSLDFeatureTypeStylePainter
,TLcdSLDRulePainter
,TLcdUTMZonePainter
possible locations
for the label.
Usage
This interface requires to set anobject
and a location
before the paintLabel(java.awt.Graphics, int, com.luciad.view.gxy.ILcdGXYContext)
and labelBoundsSFCT(java.awt.Graphics, int, com.luciad.view.gxy.ILcdGXYContext, java.awt.Rectangle)
methods can be used.
Note that, if you implement this interface, it is recommended to also implement
ILcdGXYLabelPainter2.- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
RedefinesObject.clone
to make it public.int
Gets the index of location where to paint the label(s) of the set Object.Gets the Object this ILcdGXYLabelPainter can label.int
getPossibleLocationCount
(Graphics aGraphics) Returns the number of possible locations where thisILcdGXYLabelPainter
can paint/draw the labels of the set domainObject
.double
labelBoundsSFCT
(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext, Rectangle aRectangleSFCT) Calculates the bounds of the label that can be painted.void
paintLabel
(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext) Paints the label of the set Object onaGraphics
.void
setLocationIndex
(int aLocationIndex) Sets the index of location where to paint the label(s) of the set Object.void
Sets the Object to be labeled by this ILcdGXYLabelPainter.
-
Field Details
-
Method Details
-
setObject
Sets the Object to be labeled by this ILcdGXYLabelPainter.- Parameters:
aObject
- The object to be labeled.- See Also:
-
getObject
Object getObject()Gets the Object this ILcdGXYLabelPainter can label.- Returns:
- the Object this ILcdGXYLabelPainter can label.
- See Also:
-
setLocationIndex
void setLocationIndex(int aLocationIndex) Sets the index of location where to paint the label(s) of the set Object.- Parameters:
aLocationIndex
- the index of the location. Must be between 0 and getPossibleLocationCount() - 1.- See Also:
-
getLocationIndex
int getLocationIndex()Gets the index of location where to paint the label(s) of the set Object.- Returns:
- the index of the position. Must be between 0 and getPossibleLocationCount() - 1.
- See Also:
-
paintLabel
Paints the label of the set Object on
aGraphics
.aGXYContext
should contain theILcdGXYView
for which the label is painted andILcdGXYLayer
to which the object belongsThe implementation of this method shall define how to paint the label of the set Object in the given mode, considering
aGXYContext
and the possible locationsaLocationIndex
(of multiple alternatives).The domain
Object
of the label to be painted and the location index should be set before calling this method using thesetObject
andsetLocationIndex
methods respectively.- Parameters:
aGraphics
- theGraphics
instance on which to paint.aMode
- a combination of ILcdGXYLabelPainter.DEFAULT and ILcdGXYLabelPainter.SELECTED.aGXYContext
- theILcdGXYContext
in which the label painting has to be performed.- See Also:
-
getPossibleLocationCount
Returns the number of possible locations where thisILcdGXYLabelPainter
can paint/draw the labels of the set domainObject
.The domain
Object
for which the location count is retrieved should be set before calling this method using thesetObject(java.lang.Object)
method.- Parameters:
aGraphics
- the Graphics the label will be painted on.- Returns:
- the number of possible locations where this
ILcdGXYLabelPainter
can paint/draw the labels of the set Object. - See Also:
-
labelBoundsSFCT
double labelBoundsSFCT(Graphics aGraphics, int aMode, ILcdGXYContext aGXYContext, Rectangle aRectangleSFCT) throws TLcdNoBoundsException Calculates the bounds of the label that can be painted. The bounds are set as a side effect in
aRectangleSFCT
, the orientation ofaRectangleSFCT
is returned as an angle.The bounds represent the upper left point of the label, and a width and a height. The rotation value represents the rotation of the label bounds around the upper left point.
The object for which the bounds are retrieved and the location index of the label should be set before calling this method using the
setObject(java.lang.Object)
andsetLocationIndex(int)
methods respectively.- Parameters:
aGraphics
- theaGraphics
to consider.aMode
- the representation mode of the label.aGXYContext
- theILcdGXYContext
the drawing depends on.aRectangleSFCT
- theRectangle
containing the bounds of the label in view / graphics coordinates as side effect.- Returns:
- the angle orientation of the rectangle around the labels in RADIANs, clockwise, 0 at 3 o'clock.
- Throws:
TLcdNoBoundsException
- if the Object doesn't have any valid bounds, e.g. if it is always invisible in the current projection.- See Also:
-
clone
Object clone()RedefinesObject.clone
to make it public.
-