org.geotools.styling
Interface GraphicLegend

All Superinterfaces:
Graphic, GraphicLegend
All Known Subinterfaces:
Graphic

public interface GraphicLegend
extends GraphicLegend

Used to represent a Rule (or other construct) in a user interface or legend.

Author:
Jody

Method Summary
 AnchorPoint getAnchorPoint()
          The AnchorPoint element of a PointSymbolizer gives the location inside of a Graphic (or label - see 11.4.4) to use for anchoring the graphic to the main-geometry point.
 Displacement getDisplacement()
          The Displacement gives the X and Y displacements from the "hot-spot" point.
 Expression getOpacity()
          Indicates the level of translucency as a floating point number whose value is between 0.0 and 1.0 (inclusive).
 Expression getRotation()
          Returns the expression that will be used to calculate the rotation of the graphic when it is drawn.
 Expression getSize()
          The size of the mark if specified.
 List<GraphicalSymbol> graphicalSymbols()
          The items in this list are either a Mark or a ExternalGraphic.
 void setAnchorPoint(AnchorPoint anchor)
           
 void setDisplacement(Displacement displacement)
           
 void setOpacity(Expression opacity)
           
 void setSize(Expression size)
          Indicates the size at which the graphic should be displayed.
 
Methods inherited from interface GraphicLegend
accept
 

Method Detail

getAnchorPoint

AnchorPoint getAnchorPoint()
Description copied from interface: Graphic
The AnchorPoint element of a PointSymbolizer gives the location inside of a Graphic (or label - see 11.4.4) to use for anchoring the graphic to the main-geometry point. The coordinates are given as two floating-point numbers in the AnchorPointX and AnchorPointY elements each with values between 0.0 and 1.0 inclusive. The bounding box of the graphic/label to be rendered is considered to be in a coordinate space from 0.0 (lower-left corner) to 1.0 (upper-right corner), and the anchor position is specified as a point in this space. The default point is X=0.5, Y=0.5, which is at the middle height and middle length of the graphic/label text. A system may choose different anchor points to de-conflict graphics/labels.

Specified by:
getAnchorPoint in interface Graphic
Returns:
AnchorPoint , if null should use a default point X=0.5 Y=0.5

setAnchorPoint

void setAnchorPoint(AnchorPoint anchor)

getDisplacement

Displacement getDisplacement()
Description copied from interface: Graphic
The Displacement gives the X and Y displacements from the "hot-spot" point. This element may be used to avoid over-plotting of multiple graphic symbols used as part of the same point symbol. The displacements are in units of measure above and to the right of the point. The default displacement is X=0, Y=0. If Displacement is used in conjunction with Size and/or Rotation then the graphic symbol shall be scaled and/or rotated before it is displaced.s

Specified by:
getDisplacement in interface Graphic
Returns:
Displacement

setDisplacement

void setDisplacement(Displacement displacement)

getOpacity

Expression getOpacity()
Description copied from interface: Graphic
Indicates the level of translucency as a floating point number whose value is between 0.0 and 1.0 (inclusive). A value of zero means completely transparent. A value of 1.0 means completely opaque. If null, the default value is 1.0, totally opaque.

Specified by:
getOpacity in interface Graphic
Returns:
expression

setOpacity

void setOpacity(Expression opacity)

getRotation

Expression getRotation()
Description copied from interface: Graphic
Returns the expression that will be used to calculate the rotation of the graphic when it is drawn. The Rotation element gives the rotation of a graphic in the clockwise direction about its center point in decimal degrees, encoded as a floating-point number. Negative values mean counter-clockwise rotation. The default value is 0.0 (no rotation). Note that there is no connection between source geometry types and rotations; the point used for plotting has no inherent direction. Also, the point within the graphic about which it is rotated is format dependent. If a format does not include an inherent rotation point, then the point of rotation should be the centroid.

Specified by:
getRotation in interface Graphic
Returns:
Expression

getSize

Expression getSize()
The size of the mark if specified.

If unspecified:

Specified by:
getSize in interface Graphic
Returns:
Expression

setSize

void setSize(Expression size)
Indicates the size at which the graphic should be displayed.

If this value is null the natural size of the graphic will be used; or for graphics without a natural size like SVG files 16x16 will be used.

Parameters:
size -

graphicalSymbols

List<GraphicalSymbol> graphicalSymbols()
The items in this list are either a Mark or a ExternalGraphic.

This list may be directly edited; the items are considered in order from most preferred (say an SVG file) to least preferred (a simple shape) with the intension that the system will make use of the first entry which it is capabile of displaying.

Specified by:
graphicalSymbols in interface Graphic
Returns:
List of Marks or ExternalGraphics; if empty it is to be treated a single default Mark.


Copyright © 1996-2014 Geotools. All Rights Reserved.