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 |
NAMEPAPER, 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, toCartographicUnitsequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcopyCartographicContext, copyCartographicContext, getCartographicContext, getReferenceSystem, getUnit, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setCartographicContext, setReferenceSystem, setUnit, toCartographicUnitspublic 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 ILabelingStrategypublic ILabelingMethod getLabelingMethod()
ILabelingStrategygetLabelingMethod in interface ILabelingStrategyILabelingMethodpublic void setLabelingMethod(ILabelingMethod method)
ILabelingStrategysetLabelingMethod in interface ILabelingStrategypublic void draw(java.awt.image.BufferedImage mapImage,
java.awt.Graphics2D mapGraphics,
double scale,
ViewPort viewPort,
Cancellable cancel,
double dpi)
throws ReadException
ILabelingStrategydraw in interface ILabelingStrategydpi - TODOReadExceptionpublic boolean isAllowingOverlap()
isAllowingOverlap in interface IGeneralLabelingStrategypublic void setAllowOverlapping(boolean allowOverlapping)
setAllowOverlapping in interface IGeneralLabelingStrategypublic IPlacementConstraints getPlacementConstraints()
ILabelingStrategygetPlacementConstraints in interface ILabelingStrategypublic void setPlacementConstraints(IPlacementConstraints constraints)
ILabelingStrategysetPlacementConstraints in interface ILabelingStrategypublic IZoomConstraints getZoomConstraints()
ILabelingStrategygetZoomConstraints in interface ILabelingStrategypublic void setZoomConstraints(IZoomConstraints constraints)
ILabelingStrategysetZoomConstraints in interface ILabelingStrategypublic void print(java.awt.Graphics2D g,
double scale,
ViewPort viewPort,
Cancellable cancel,
PrintAttributes properties)
throws ReadException
ILabelingStrategyprint in interface ILabelingStrategyReadExceptionpublic java.lang.String[] getUsedFields()
ILabelingStrategygetUsedFields in interface ILabelingStrategypublic boolean shouldDrawLabels(double scale)
shouldDrawLabels in interface ILabelingStrategypublic static void registerPersistent()
public void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentPersistenceExceptionpublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentPersistenceExceptionpublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException