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()
          This specifies the level of translucency to use when rendering the graphic.
 Expression getRotation()
          This parameter defines the rotation of a graphic in the clockwise direction about its centre point in decimal degrees.
 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)
          Graphic opacity.
 void setRotation(Expression rotation)
          This parameter defines the rotation of a graphic in the clockwise direction about its centre point in decimal degrees.
 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()
This specifies the level of translucency to use when rendering the graphic.
The value is encoded as a floating-point value between 0.0 and 1.0 with 0.0 representing totally transparent and 1.0 representing totally opaque, with a linear scale of translucency for intermediate values.
For example, "0.65" would represent 65% opacity. The default value is 1.0 (opaque).

Specified by:
getOpacity in interface Graphic
Returns:
The opacity of the Graphic, where 0.0 is completely transparent and 1.0 is completely opaque.

setOpacity

void setOpacity(Expression opacity)
Graphic opacity.

Parameters:
opacity - New value of property opacity.

getRotation

Expression getRotation()
This parameter defines the rotation of a graphic in the clockwise direction about its centre point in decimal degrees. The value encoded as a floating point number.

Specified by:
getRotation in interface Graphic
Returns:
The angle of rotation in decimal degrees. Negative values represent counter-clockwise rotation. The default is 0.0 (no rotation).

setRotation

void setRotation(Expression rotation)
This parameter defines the rotation of a graphic in the clockwise direction about its centre point in decimal degrees. The value encoded as a floating point number.

Parameters:
rotation - in decimal degrees

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.