public class GeneralLabelingStrategy extends AbstractCartographicSupport implements IGeneralLabelingStrategy
CartographicSupport.CartographicContext
Modifier and Type | Field and Description |
---|---|
static LinePlacementConstraints |
DefaultLinePlacementConstraints |
static PointPlacementConstraints |
DefaultPointPlacementConstraints |
static PolygonPlacementConstraints |
DefaultPolygonPlacementConstraints |
static java.lang.String |
GENERAL_LABEL_STRATEGY_PERSISTENCE_NAME |
protected FLyrVect |
layer |
NAME
PAPER, WORLD
Constructor and Description |
---|
GeneralLabelingStrategy() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
void |
draw(java.awt.image.BufferedImage mapImage,
java.awt.Graphics2D mapGraphics,
double scale,
ViewPort viewPort,
Cancellable cancel,
double dpi)
Causes the labels to be drawn.
|
ILabelingMethod |
getLabelingMethod()
Returns the labeling method currently in use.
|
IPlacementConstraints |
getPlacementConstraints()
Returns the current placement constraints that determine the position
where the label is placed.
|
java.lang.String[] |
getUsedFields()
Returns a non-null String[] containing the names of the fields involved in the
labeling.
|
IZoomConstraints |
getZoomConstraints()
Returns the current placement constraints that determine the position
where the label is placed.
|
boolean |
isAllowingOverlap() |
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
print(java.awt.Graphics2D g,
double scale,
ViewPort viewPort,
Cancellable cancel,
PrintAttributes properties)
Applies the printer properties to the rendering process to match its attributes.
|
static void |
registerPersistent() |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setAllowOverlapping(boolean allowOverlapping) |
void |
setLabelingMethod(ILabelingMethod method)
Sets the labeling method that will be used the next time the the draw is invoked.
|
void |
setLayer(FLayer layer) |
void |
setPlacementConstraints(IPlacementConstraints constraints)
Sets the PlacementConstraints that will determine where to place the labels.
|
void |
setZoomConstraints(IZoomConstraints constraints)
Sets the PlacementConstraints that will determine where to place the labels.
|
boolean |
shouldDrawLabels(double scale) |
copyCartographicContext, getCartographicContext, getReferenceSystem, getUnit, isInPixels, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setReferenceSystem, setUnit, toCartographicUnits
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
copyCartographicContext, copyCartographicContext, getCartographicContext, getReferenceSystem, getUnit, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setReferenceSystem, setUnit, toCartographicUnits
public static final java.lang.String GENERAL_LABEL_STRATEGY_PERSISTENCE_NAME
public static PointPlacementConstraints DefaultPointPlacementConstraints
public static LinePlacementConstraints DefaultLinePlacementConstraints
public static PolygonPlacementConstraints DefaultPolygonPlacementConstraints
protected FLyrVect layer
public void setLayer(FLayer layer)
setLayer
in interface ILabelingStrategy
public ILabelingMethod getLabelingMethod()
ILabelingStrategy
getLabelingMethod
in interface ILabelingStrategy
ILabelingMethod
public void setLabelingMethod(ILabelingMethod method)
ILabelingStrategy
setLabelingMethod
in interface ILabelingStrategy
public void draw(java.awt.image.BufferedImage mapImage, java.awt.Graphics2D mapGraphics, double scale, ViewPort viewPort, Cancellable cancel, double dpi) throws ReadException
ILabelingStrategy
draw
in interface ILabelingStrategy
dpi
- TODOReadException
public boolean isAllowingOverlap()
isAllowingOverlap
in interface IGeneralLabelingStrategy
public void setAllowOverlapping(boolean allowOverlapping)
setAllowOverlapping
in interface IGeneralLabelingStrategy
public IPlacementConstraints getPlacementConstraints()
ILabelingStrategy
getPlacementConstraints
in interface ILabelingStrategy
public void setPlacementConstraints(IPlacementConstraints constraints)
ILabelingStrategy
setPlacementConstraints
in interface ILabelingStrategy
public IZoomConstraints getZoomConstraints()
ILabelingStrategy
getZoomConstraints
in interface ILabelingStrategy
public void setZoomConstraints(IZoomConstraints constraints)
ILabelingStrategy
setZoomConstraints
in interface ILabelingStrategy
public void print(java.awt.Graphics2D g, double scale, ViewPort viewPort, Cancellable cancel, PrintAttributes properties) throws ReadException
ILabelingStrategy
print
in interface ILabelingStrategy
ReadException
public java.lang.String[] getUsedFields()
ILabelingStrategy
getUsedFields
in interface ILabelingStrategy
public boolean shouldDrawLabels(double scale)
shouldDrawLabels
in interface ILabelingStrategy
public static void registerPersistent()
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException