|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.aims.mtier.model.map.layer.renderer.Renderer com.esri.aims.mtier.model.map.layer.renderer.SimpleLabelRenderer
public class SimpleLabelRenderer
This class contains symbols that represents map labeling. The SimpleLabelRenderer object extends the Renderer object.
Field Summary | |
---|---|
static String |
HIGH_WEIGHT
Defines that the feature has high importance and cannot be labeled over. |
static String |
MED_WEIGHT
Defines that the feature has medium importance. |
static String |
NO_WEIGHT
Defines that the feature has no importance and can be labeled over. |
static String |
ONE_LABEL_PER_NAME
Labels once per feature name. |
static String |
ONE_LABEL_PER_PART
Labels all parts of a feature in the case of multipart features. |
static String |
ONE_LABEL_PER_SHAPE
Labels once per feature even if there are multiple segments. |
static String |
PLACE_ABOVE
Determines the label be placed above the line. |
static String |
PLACE_ABOVE_BELOW
Determines the label be placed above or below the line. |
static String |
PLACE_BELOW
Determines the label be placed below the line. |
static String |
PLACE_IN_LINE
Determines the label be placed anywhere on the line. |
static String |
PLACE_LEFT
Determines the label be placed to the left of the line. |
static String |
PLACE_LEFT_RIGHT
Determines the label be placed to the right or left of the line. |
static String |
PLACE_ON_TOP
Determines the label be placed on top of the line. |
static String |
PLACE_ON_TOP_HORIZONTAL
Determines the label be placed on top of the line but always horizontal. |
static String |
PLACE_PARALLEL
Determines the label be placed parallel to the line. |
static String |
PLACE_RIGHT
Determines the label be placed to the right of the line. |
Constructor Summary | |
---|---|
SimpleLabelRenderer()
Constructs an instance of a SimpleLabelRenderer object. |
Method Summary | |
---|---|
String |
getFeatureWeight()
Returns the feature weight set for this SimpleLabelRenderer
object. |
String |
getField()
Returns the field property associated with this SimpleLabelRenderer . |
String |
getHowManyLabels()
Returns the value of HowManylabels property set for this
SimpleLabelRenderer . |
double |
getLabelBufferRatio()
Returns the label buffer ratio set for this SimpleLabelRenderer . |
String |
getLabelPriorities()
Returns the label priorities set for this SimpleLabelRenderer . |
String |
getLabelWeight()
Returns the label priority associated with this SimpleLabelRenderer . |
String |
getLineLabelPosition()
Returns the line label position set for this SimpleLabelRenderer . |
String |
getRotationalAngles()
Returns the rotational angle property. |
Symbol |
getSymbol()
Returns the Symbol associated with this SimpleLabelRenderer . |
String |
getType()
Returns the type of Renderer, "SimpleLabel". |
void |
setFeatureWeight(String fWeight)
Used to prioritize the importance of features. |
void |
setField(String field)
Sets the given field property for this SimpleLabelRenderer . |
void |
setHowManyLabels(String hmLabels)
When set, this property determines how often a feature is labeled. |
void |
setLabelBufferRatio(double value)
Sets the label buffer ratio for this SimpleLabelRenderer . |
void |
setLabelPriorities(String labelPriorities)
Sets the label priorities for this SimpleLabelRenderer . |
void |
setLabelWeight(String lWeight)
Used to prioritize the importance of labels. |
void |
setLineLabelPosition(String llPosition)
When set, this property determines where on the line to place the label. |
void |
setRotationalAngles(String angle)
Sets the given value as rotational angle. |
void |
setSymbol(Object symbol)
Sets the given Symbol object with this SimpleLabelRenderer . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String NO_WEIGHT
public static final String MED_WEIGHT
public static final String HIGH_WEIGHT
public static final String ONE_LABEL_PER_NAME
public static final String ONE_LABEL_PER_SHAPE
public static final String ONE_LABEL_PER_PART
public static final String PLACE_ABOVE
public static final String PLACE_BELOW
public static final String PLACE_ON_TOP
public static final String PLACE_LEFT
public static final String PLACE_RIGHT
public static final String PLACE_ABOVE_BELOW
public static final String PLACE_LEFT_RIGHT
public static final String PLACE_IN_LINE
public static final String PLACE_PARALLEL
public static final String PLACE_ON_TOP_HORIZONTAL
Constructor Detail |
---|
public SimpleLabelRenderer()
SimpleLabelRenderer
object.
Example: SimpleLabelRenderer simpleLabel = new SimpleLabelRenderer();
Method Detail |
---|
public String getType()
getType
in class Renderer
public void setSymbol(Object symbol)
SimpleLabelRenderer
.
Example:
TextSymbol text = new TextSymbol();
text.setFont("tahoma");
simpleLabel.setSymbol(text);
symbol
- the Symbol object.getSymbol()
public void setField(String field)
SimpleLabelRenderer
.
Example:
text.setField("Lakes");
field
- Field containing text for labeling features. The field
can be in the layer table or in the joined table.getField()
public String getField()
SimpleLabelRenderer
.
Example:
String field = text.getField();
setField(java.lang.String)
public void setFeatureWeight(String fWeight)
Note that giving importance to features increases the complexity of the labeling
problem and also the processing time.
Example:
simpleLabel.setFeatureWeight("NO_WEIGHT");
fWeight
- the feature weight - NO_WEIGHT, MED_WEIGHT, or HIGH_WEIGHT.getFeatureWeight()
public String getFeatureWeight()
SimpleLabelRenderer
object.
Example:
String fWeight = simpleLabel.getFeatureWeight();
setFeatureWeight(java.lang.String)
public void setLabelWeight(String lWeight)
simpleLabel.setLabelWeight("med_weight");
lWeight
- the label weight value.getLabelWeight()
public String getLabelWeight()
SimpleLabelRenderer
.
Example: String labelWeight = simpleLabel.getLabelWeight();
setLabelWeight(java.lang.String)
public void setLabelBufferRatio(double value)
SimpleLabelRenderer
. This property
sets the buffer around the label. when this is set, no labels overlap within the buffer range.
value
- the label buffer ratio value. The ratio is a fraction of the height or
width of the rectangle (whichever is smaller) compared to the width of the buffer. For example,
a ratio of 0.0 means no buffer, and a ratio of 1.0 means the buffer is twice the size of the
label (the label width equals the buffer width). A negative ratio causes the buffer to be smaller
than the label. This can be used to allow labels to overlap.
Example: simpleLabel.setLabelBufferRatio(25.0);
getLabelBufferRatio()
public double getLabelBufferRatio()
SimpleLabelRenderer
.
Example:
double labelBufferRatio = simpleLabel.getLabelBufferRatio();
setLabelBufferRatio(double)
public void setLabelPriorities(String labelPriorities)
SimpleLabelRenderer
.
When set, this property determines where to place the label around the point.
The attribute accepts different weights for each of eight positions
around the point. Each position corresponds to the positions as shown below:
1 2 3
8 X 4
7 6 5
In each position, the user can prioritize the importance of that position
from 0 upwards. 0 signifies that the label should not be placed in that
position. 1 means that this is an acceptable position for the label, and
all higher numbers represent lesser priorities for that position. For
example, "1,0,1,0,0,0,0,0" means that only the first and third label
positions will be taken into account when labeling. In another
example, "1,2,3,0,1,0,0,0" means try to label at the first and fifth
position; if not, then put the label at the second position; if not, then
put it at the third position; if this is not possible, then don't label it.simpleLabel.setLabelPriorities("0,0,0,0,0,0,0,0");
labelPriorities
- the label priorities value.getLabelPriorities()
public String getLabelPriorities()
SimpleLabelRenderer
.
Example: String labelPriorities = simpleLabel.getLabelPriorities();
setLabelPriorities(java.lang.String)
public void setRotationalAngles(String angle)
simpleLabel.setRotationalAngles(45,30);
angle
- the angle value.getRotationalAngles()
public String getRotationalAngles()
String rotationalAngles = simpleLabel.getRotationalAngles();
setRotationalAngles(java.lang.String)
public void setHowManyLabels(String hmLabels)
simpleLabel.setHowManyLabels(simpleLabel.ONE_LABEL_PER_NAME);
hmLabels
- defines the property as ONE_LABEL_PER_NAME/ONE_LABEL_PER_PART
/ONE_LABEL_PER_SHAPEgetHowManyLabels()
public String getHowManyLabels()
HowManylabels
property set for this
SimpleLabelRenderer
.
Example: String howmanylabels = simpleLabel.getHowManyLabels();
setHowManyLabels(java.lang.String)
public void setLineLabelPosition(String llPosition)
simpleLabel.setLineLabelPosition(simpleLabel.PLACE_ABOVE);
llPosition
- the line label value.getLineLabelPosition()
public String getLineLabelPosition()
SimpleLabelRenderer
.
Example: String lineLabel = simpleLabel.getLineLabelPosition();
setLineLabelPosition(java.lang.String)
public Symbol getSymbol()
Symbol
associated with this SimpleLabelRenderer
.
Example: Symbol symbol = SimpleLabelRenderer.getSymbol();
setSymbol(java.lang.Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |