public class LabelCacheItem extends Object implements Comparable<LabelCacheItem>
Modifier and Type | Class and Description |
---|---|
static class |
LabelCacheItem.GraphicResize |
Constructor and Description |
---|
LabelCacheItem(String layerId,
TextStyle2D textStyle,
LiteShape2 shape,
String label,
TextSymbolizer symbolizer)
Construct
LabelCacheItem . |
Modifier and Type | Method and Description |
---|---|
boolean |
allowOverruns()
Wheter labels are allowed to go past the start/end of the line
|
int |
compareTo(LabelCacheItem other) |
boolean |
equals(Object obj) |
int |
getAutoWrap()
Automatically wraps long labels when the label width, in pixels, exceeds the autowrap length
|
int[] |
getDisplacementAngles()
defines the actual angle towards which displacement of label will take place (applies only in
polygon or point features)
|
Geometry |
getGeometry()
Returns an example geometry from the list of geometries.
|
List<Geometry> |
getGeoms()
The list of geometries this item maintains
|
double |
getGoodnessOfFit() |
int[] |
getGraphicMargin() |
LabelCacheItem.GraphicResize |
getGraphicsResize() |
String |
getLabel() |
Set<String> |
getLayerIds()
Return a modifiable set of ids
|
double |
getMaxAngleDelta()
Max angle between two subsequence characters in a curved label, in degrees.
|
int |
getMaxDisplacement()
Max amount of pixels the label will be moved around trying to find a non conflicting location
(how and if the moving will be done is geometry type dependent)
|
int |
getMinGroupDistance() |
double |
getPriority() |
int |
getRepeat()
When enabled, repeats labels every "repeat" pixels (works on lines only atm)
|
int |
getSpaceAround()
space around - "dont put any label near me by this # of pixels"
|
TextStyle2D |
getTextStyle()
The textstyle that is used to label the shape.
|
double |
getWordSpacing() |
int |
hashCode() |
boolean |
isConflictResolutionEnabled()
Checks if conflict resolution has been enabled for this label
|
boolean |
isFollowLineEnabled()
Enables curved labels on linear features
|
boolean |
isForceLeftToRightEnabled()
If enabled, text will be forced to follow a left to right alignement (that makes it readable)
no matter what the natural orientation of the line is
|
boolean |
isPartialsEnabled() |
boolean |
isTextStrikethrough() |
boolean |
isTextUnderlined() |
boolean |
labelAllGroup()
When grouping, wheter we should label only the biggest geometry, or the others as well
|
boolean |
removeGroupOverlaps() |
void |
setAllowOverruns(boolean allowOverruns) |
void |
setAutoWrap(int autoWrap) |
void |
setConflictResolutionEnabled(boolean conflictResolutionEnabled)
Sets conflict resolution for this label.
|
void |
setDisplacementAngles(int[] displacementAngles) |
void |
setFollowLineEnabled(boolean followLineEnabled) |
void |
setForceLeftToRightEnabled(boolean forceLeftToRight) |
void |
setGoodnessOfFit(double goodnessOfFit)
A value between 0 and 1 representing the portion of the label that overlaps with the geometry
(atm used only for polygons)
|
void |
setGraphicMargin(int[] graphicMargin) |
void |
setGraphicsResize(LabelCacheItem.GraphicResize graphicsResize) |
void |
setLabel(String l) |
void |
setLabelAllGroup(boolean labelAllGroup) |
void |
setMaxAngleDelta(double maxAngleDelta) |
void |
setMaxDisplacement(int maxDisplacement) |
void |
setMinGroupDistance(int minGroupDistance)
Minimum cartesian distance between two labels in the same group, in pixels
|
void |
setPartialsEnabled(boolean partialsEnabled) |
void |
setPriority(double d) |
void |
setRemoveGroupOverlaps(boolean removeGroupOverlaps) |
void |
setRepeat(int repeat) |
void |
setSpaceAround(int space)
space around - "dont put any label near me by this # of pixels"
|
void |
setTextStrikethrough(boolean textStrikethrough) |
void |
setTextUnderlined(boolean textUnderlined) |
void |
setWordSpacing(double wordSpacing) |
public LabelCacheItem(String layerId, TextStyle2D textStyle, LiteShape2 shape, String label, TextSymbolizer symbolizer)
LabelCacheItem
.public double getGoodnessOfFit()
public void setGoodnessOfFit(double goodnessOfFit)
goodnessOfFit
- public String getLabel()
public void setLabel(String l)
public int getSpaceAround()
public void setSpaceAround(int space)
public double getPriority()
public void setPriority(double d)
public List<Geometry> getGeoms()
public TextStyle2D getTextStyle()
public Geometry getGeometry()
public int getMaxDisplacement()
public void setMaxDisplacement(int maxDisplacement)
public int[] getDisplacementAngles()
public void setDisplacementAngles(int[] displacementAngles)
public int getRepeat()
public void setRepeat(int repeat)
public boolean labelAllGroup()
public void setLabelAllGroup(boolean labelAllGroup)
public boolean removeGroupOverlaps()
public void setRemoveGroupOverlaps(boolean removeGroupOverlaps)
public boolean allowOverruns()
public void setAllowOverruns(boolean allowOverruns)
public int getMinGroupDistance()
public void setMinGroupDistance(int minGroupDistance)
minGroupDistance
- public boolean isFollowLineEnabled()
public void setFollowLineEnabled(boolean followLineEnabled)
public double getMaxAngleDelta()
public void setMaxAngleDelta(double maxAngleDelta)
public int getAutoWrap()
public void setAutoWrap(int autoWrap)
public int compareTo(LabelCacheItem other)
compareTo
in interface Comparable<LabelCacheItem>
public boolean isForceLeftToRightEnabled()
public void setForceLeftToRightEnabled(boolean forceLeftToRight)
public boolean isConflictResolutionEnabled()
public void setConflictResolutionEnabled(boolean conflictResolutionEnabled)
conflictResolutionEnabled
- public LabelCacheItem.GraphicResize getGraphicsResize()
public void setGraphicsResize(LabelCacheItem.GraphicResize graphicsResize)
public int[] getGraphicMargin()
public void setGraphicMargin(int[] graphicMargin)
public boolean isPartialsEnabled()
public void setPartialsEnabled(boolean partialsEnabled)
public boolean isTextUnderlined()
public void setTextUnderlined(boolean textUnderlined)
public boolean isTextStrikethrough()
public void setTextStrikethrough(boolean textStrikethrough)
public double getWordSpacing()
public void setWordSpacing(double wordSpacing)
Copyright © 1996–2019 Geotools. All rights reserved.