long overrideDefaultPlacement(int vertEnum, int horzEnum)
This method changes the current default vertical and horizontal placement enumerations help by the TextAPI object to vertEnum and horzEnum, repsectively. Valid values for vertEnum are: 0, 1, or 2, corresponding to above, centered, and below, respectively. Valid values for horzEnum are: 0, 1, or 2, corresponding to left, centered, and right, respectively. Based on these assignments, the text is placed in any of nine possible positions, relative to the target. These nine positions are:
- Above and to the left
- Above and horizontal centered
- Above and to the right
- Vertically centered and to the left
- Vertically centered and horizontally centered
- Vertically centered and to the right
- Below and to the left
- Below and horizontally centered
- Below and to the right
The target position to which these offsets apply depends upon how the label is created. This depends on the method used, as follows:
- addLabelToFeature creates a label for an existing feature. If this feature is a point, the offsets are relative to point's location. If this feature is a line, the offsets are relative to the center of the line.
- addLabelToFeatureSegment creates a label at one segment of a line feature. Here the offset are relative to the center of that segment.
- createLabelAtLocation creates a label at a client-specified location. The offsets are relative to the specified location.
- createLabelBetweenLocations creates a label between two client specified locations. The offsets are relative to the mid-point between the specified locations.
- createLabelAlongCurve creates a label along a specified curve (poly-line). The offsets are relative to the center of the curve.
This method returns zero upon success, and returns an error code if either of the arguments are invalid.