|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IScaleBar
Provides access to members that control the scalebar map surrounds.
The IScaleBar interface manages most of the properties of a scale bar.
Other interfaces relevant to the scale bar's format are IScaleMarks, IScaleLine, ISingleFillScaleBar and IDoubleFillScaleBar. See the Carto Library Overview to find out how these interfaces work together to create various types of scale bars.
BarHeight defines the height of the scale bar and is always expressed in points and BarColor is an IColor defining its color.
ResizeHint is an esriScaleBarResizeHint constant defining what happens when the scale bar is resized. The choices are a fixed scale bar, increasing the space between the division marks or the number of divisions.
Divisions and Subdvisions
The Divisions property controls the total number of divisions on the scale bar including divisions before zero which of course, are defined by the DivisionsBeforeZero property. Unsurprisingly, Subdivisions controls the number of subdivisions. Use IScaleMarks::MarkFrequency to set which divisions and subdivisions will be shown.
Division is expressed in the units the scale bar will show and defines the spacing of the divisions.
Units and Unit Labels
Units is of type esriUnits and defines the units the scale bar will show.
UnitLabel is a string that will be displayed to show this unit. For instance "Km".
The UnitLabelPosition is an esriVertPosEnum constant that defines the position of the label relatively to the line. UnitLabelGap defines the space in points between the label and the scale bar and UnitLabelSymbol is a text symbol used to display the label.
UseMapSettings will restore Units and UnitLabel in accordance with map units.
Division Labels
The LabelFrequency is an esriScaleBarFrequency constant that defines on which divisions and subdivisions labels will be shown.
NumberFormat is an INumberFormat that allows you for instance to modify the number of decimals used to display the labels.
The LabelPosition is an esriVertPosEnum constant that defines the position of the labels relatively to the line. LabelGap defines the space in points between the labels and the scale bar and LabelSymbol is a text symbol used to display the labels.
Method Summary | |
---|---|
IColor |
getBarColor()
Color used to draw the bar. |
double |
getBarHeight()
Height of the bar in points (1/72 inch). |
double |
getDivision()
Number of units in one major division. |
short |
getDivisions()
Total number of divisions (including those before zero). |
short |
getDivisionsBeforeZero()
Number of divisions to the left of zero. |
int |
getLabelFrequency()
The label style indicating which marks are labeled. |
double |
getLabelGap()
Vertical gap between the bar and the labels in points (1/72 inch). |
int |
getLabelPosition()
Vertical positioning of the mark labels. |
ITextSymbol |
getLabelSymbol()
Symbol used to draw the labels. |
INumberFormat |
getNumberFormat()
Number format. |
int |
getResizeHint()
Indicates what happens when scale bar is resized. |
short |
getSubdivisions()
Number of subdivisions per major division. |
String |
getUnitLabel()
The unit label. |
double |
getUnitLabelGap()
Gap between the scale bar and the unit label in points (1/72 inch). |
int |
getUnitLabelPosition()
Vertical positioning of the unit label. |
ITextSymbol |
getUnitLabelSymbol()
Unit label symbol. |
int |
getUnits()
The units reported. |
void |
setBarColor(IColor color)
Color used to draw the bar. |
void |
setBarHeight(double points)
Height of the bar in points (1/72 inch). |
void |
setDivision(double units)
Number of units in one major division. |
void |
setDivisions(short count)
Total number of divisions (including those before zero). |
void |
setDivisionsBeforeZero(short count)
Number of divisions to the left of zero. |
void |
setLabelFrequency(int labelFrequency)
The label style indicating which marks are labeled. |
void |
setLabelGap(double points)
Vertical gap between the bar and the labels in points (1/72 inch). |
void |
setLabelPosition(int position)
Vertical positioning of the mark labels. |
void |
setLabelSymbol(ITextSymbol symbol)
Symbol used to draw the labels. |
void |
setNumberFormat(INumberFormat format)
Number format. |
void |
setResizeHint(int hint)
Indicates what happens when scale bar is resized. |
void |
setSubdivisions(short units)
Number of subdivisions per major division. |
void |
setUnitLabel(String unitLabel)
The unit label. |
void |
setUnitLabelGap(double points)
Gap between the scale bar and the unit label in points (1/72 inch). |
void |
setUnitLabelPosition(int position)
Vertical positioning of the unit label. |
void |
setUnitLabelSymbol(ITextSymbol symbol)
Unit label symbol. |
void |
setUnits(int units)
The units reported. |
void |
useMapSettings()
Sets division and units based on map. |
Methods inherited from interface com.esri.arcgis.carto.IMapSurround |
---|
delayEvents, draw, fitToBounds, getIcon, getMap, getName, queryBounds, refresh, setMapByRef, setName |
Method Detail |
---|
double getDivision() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setDivision(double units) throws IOException, AutomationException
units
- The units (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.short getDivisions() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setDivisions(short count) throws IOException, AutomationException
count
- The count (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.short getDivisionsBeforeZero() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setDivisionsBeforeZero(short count) throws IOException, AutomationException
count
- The count (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.short getSubdivisions() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setSubdivisions(short units) throws IOException, AutomationException
units
- The units (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getUnits() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setUnits(int units) throws IOException, AutomationException
units
- A com.esri.arcgis.system.esriUnits constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.String getUnitLabel() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setUnitLabel(String unitLabel) throws IOException, AutomationException
unitLabel
- The unitLabel (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getUnitLabelPosition() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setUnitLabelPosition(int position) throws IOException, AutomationException
position
- A com.esri.arcgis.carto.esriScaleBarPos constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.double getUnitLabelGap() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setUnitLabelGap(double points) throws IOException, AutomationException
points
- The points (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ITextSymbol getUnitLabelSymbol() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setUnitLabelSymbol(ITextSymbol symbol) throws IOException, AutomationException
symbol
- A reference to a com.esri.arcgis.display.ITextSymbol (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getLabelFrequency() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setLabelFrequency(int labelFrequency) throws IOException, AutomationException
labelFrequency
- A com.esri.arcgis.carto.esriScaleBarFrequency constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.INumberFormat getNumberFormat() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setNumberFormat(INumberFormat format) throws IOException, AutomationException
format
- A reference to a com.esri.arcgis.system.INumberFormat (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getLabelPosition() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setLabelPosition(int position) throws IOException, AutomationException
position
- A com.esri.arcgis.carto.esriVertPosEnum constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.double getLabelGap() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setLabelGap(double points) throws IOException, AutomationException
points
- The points (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ITextSymbol getLabelSymbol() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setLabelSymbol(ITextSymbol symbol) throws IOException, AutomationException
symbol
- A reference to a com.esri.arcgis.display.ITextSymbol (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IColor getBarColor() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setBarColor(IColor color) throws IOException, AutomationException
color
- A reference to a com.esri.arcgis.display.IColor (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.double getBarHeight() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setBarHeight(double points) throws IOException, AutomationException
points
- The points (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getResizeHint() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setResizeHint(int hint) throws IOException, AutomationException
hint
- A com.esri.arcgis.carto.esriScaleBarResizeHint constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void useMapSettings() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |