com.esri.aims.mtier.model.acetate
Class ScaleBar

java.lang.Object
  extended by com.esri.aims.mtier.model.acetate.Object
      extended by com.esri.aims.mtier.model.acetate.ScaleBar
All Implemented Interfaces:
AcetateElement, MapSurroundings, Serializable

public class ScaleBar
extends Object
implements MapSurroundings, Serializable

Defines a ScaleBar object to be drawn as an acetate layer. The ScaleBarObject extends the Object class from the acetate package.

See Also:
Serialized Form

Field Summary
static String BOLD
           
static String BOLDITALIC
           
static String CARTESIAN
           
static String DEGREES
           
static String FEET
           
static String GEODESIC
           
static String ITALIC
           
static String KILOMETERS
           
static String METERS
           
static String MILES
           
static String OUTLINE
           
static String REGULAR
           
static String UNDERLINE
           
 
Constructor Summary
ScaleBar()
          Constructs a new ScaleBar object.
 
Method Summary
 String getBarColor()
          Returns the bar color value for this ScaleBar object.
 double getBarTransparency()
          Returns the transparency value for this ScaleBar object..
 int getBarWidth()
          Returns the width of this ScaleBar object.
 double getDistance()
          Returns the distance value associated with this ScaleBar object.
 String getFont()
          Returns the font value for the ScaleBar object.
 String getFontColor()
          Returns the font color value for this ScaleBar object.
 int getFontSize()
          Returns the font size of this ScaleBar object.
 String getFontStyle()
          Returns the font style associated with this Scalebar object.
 String getID()
          Returns the value of the ScaleBar identifier.
 String getMapUnits()
          Returns the map units associated with this ScaleBar object.
 String getMode()
          Returns the mode value.
 String getOutline()
          Returns the outline color for this ScaleBar object.
 int getPrecision()
          Returns the precision value associated with this ScaleBar object.
 double getRound()
          Returns the round value associated with this ScaleBar object.
 String getScaleUnits()
          Returns the scale units for this ScaleBar object.
 int getScreenLength()
          Returns the screen length value for this ScaleBar object.
 double getTextTransparency()
          Returns the text transparency value associated with this ScaleBar object.
 String getType()
          Returns the type of acetate object.
 double getX()
          Returns the X- coordinate value for this ScaleBar object.
 double getY()
          Returns the Y- coordinate value of this ScaleBar object.
 boolean isAntialiasing()
          Returns true if the antialiasing value is set to true.
 boolean isOverlap()
          Returns true if the ScaleBar object's overlap value is set to true.
 void setAntialiasing(boolean value)
          Sets the antialiasing value for this ScaleBar object.
 void setBarColor(String value)
          Sets the bar color value for this ScaleBar object.
 void setBarTransparency(double value)
          Sets the value of transparency for this ScaleBar object.
 void setBarWidth(int value)
          Sets the given value as width of this ScaleBar object.
 void setDistance(double value)
          Sets the distance value for this ScaleBar object.
 void setFont(String value)
          Sets the font value for this ScaleBar object.
 void setFontColor(String value)
          Sets the font color for this ScaleBar object.
 void setFontSize(int value)
          Sets the font size of this ScaleBar object.
 void setFontStyle(String value)
          Sets the given font style for this Scalebar object.
 void setID(String value)
          Sets the value of the ScaleBar identifier with given string.
 void setMapUnits(String value)
          Sets the map units value for this ScaleBar object.
 void setMode(String value)
          Sets the mode value when the map units are in decimal degrees.
 void setOutline(String value)
          Sets the outline color for this ScaleBar object.
 void setOverlap(boolean value)
          Sets the overlap value for this Scalebar object.
 void setPrecision(int value)
          Sets precision value for this ScaleBar object.
 void setRound(double value)
          Sets the number of digits to round.
 void setScaleUnits(String value)
          Sets the scale units for this ScaleBar object.
 void setScreenLength(int value)
          Sets the screen length value for this ScaleBar object.
 void setTextTransparency(double value)
          Sets the text transparency value for this ScaleBar object.
 void setX(double value)
          Sets the X- coordinate value of this ScaleBar object.
 void setY(double value)
          Sets the Y- coordinate value for this ScaleBar object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MILES

public static final String MILES
See Also:
Constant Field Values

FEET

public static final String FEET
See Also:
Constant Field Values

METERS

public static final String METERS
See Also:
Constant Field Values

KILOMETERS

public static final String KILOMETERS
See Also:
Constant Field Values

DEGREES

public static final String DEGREES
See Also:
Constant Field Values

CARTESIAN

public static final String CARTESIAN
See Also:
Constant Field Values

GEODESIC

public static final String GEODESIC
See Also:
Constant Field Values

REGULAR

public static final String REGULAR
See Also:
Constant Field Values

BOLD

public static final String BOLD
See Also:
Constant Field Values

ITALIC

public static final String ITALIC
See Also:
Constant Field Values

UNDERLINE

public static final String UNDERLINE
See Also:
Constant Field Values

OUTLINE

public static final String OUTLINE
See Also:
Constant Field Values

BOLDITALIC

public static final String BOLDITALIC
See Also:
Constant Field Values
Constructor Detail

ScaleBar

public ScaleBar()
Constructs a new ScaleBar object.

Example:

 ScaleBar scalebar = new ScaleBar();
 

Method Detail

getType

public String getType()
Returns the type of acetate object.

Specified by:
getType in interface MapSurroundings
Specified by:
getType in class Object
Returns:
String

setID

public void setID(String value)
Sets the value of the ScaleBar identifier with given string.

Example:

scalebar.setID("ScaleBar-1");

Parameters:
value - the value of the identifier
See Also:
getID()

getID

public String getID()
Returns the value of the ScaleBar identifier.

Example:

String id = scalebar.getID();

Returns:
String
See Also:
setID(java.lang.String)

setX

public void setX(double value)
Sets the X- coordinate value of this ScaleBar object.

scalebar.setX(-125.0);

Parameters:
value - the x coordinate value.
See Also:
getX()

getX

public double getX()
Returns the X- coordinate value for this ScaleBar object.

Example:

 double x = scalebar.getX();
 

Returns:
double
See Also:
setX(double)

setY

public void setY(double value)
Sets the Y- coordinate value for this ScaleBar object.

Example:

 scalebar.setY(45.0);
 

Parameters:
value - they Y coordinate value.
See Also:
getY()

getY

public double getY()
Returns the Y- coordinate value of this ScaleBar object.

Example:

 int y = scalebar.getY();
 

Returns:
double
See Also:
setY(double)

setBarWidth

public void setBarWidth(int value)
Sets the given value as width of this ScaleBar object.

Example:

 scalebar.setBarWidth(15);
 

Parameters:
value - the width value.
See Also:
getBarWidth()

getBarWidth

public int getBarWidth()
Returns the width of this ScaleBar object.

Example:

 int barwidth = scalebar.getBarWidth();
 

Returns:
int
See Also:
setBarWidth(int)

setFontSize

public void setFontSize(int value)
Sets the font size of this ScaleBar object.

Example:

scalebar.setFontSize(15);

Parameters:
value - the font size value.
See Also:
getFontSize()

getFontSize

public int getFontSize()
Returns the font size of this ScaleBar object.

int fontSize = scalebar.getFontSize();

Returns:
int
See Also:
setFontSize(int)

setBarTransparency

public void setBarTransparency(double value)
Sets the value of transparency for this ScaleBar object. 1.0 indicates 0 percent transparent and 0.0 is 100 percent transparent.

Example:

scalebar.setBarTransparency(1.0);

Parameters:
value - the transparency value.
See Also:
getBarTransparency()

getBarTransparency

public double getBarTransparency()
Returns the transparency value for this ScaleBar object..

Example:

double barTransparency = scalebar.getBarTransparency();

Returns:
double
See Also:
setBarTransparency(double)

setTextTransparency

public void setTextTransparency(double value)
Sets the text transparency value for this ScaleBar object.

Example:

scalebar.setTextTransparency(1.0);

Parameters:
value - the text transparency value.
See Also:
getTextTransparency()

getTextTransparency

public double getTextTransparency()
Returns the text transparency value associated with this ScaleBar object.

Example:

double textTransparency = scalebar.getTextTransparency();

Returns:
double
See Also:
setTextTransparency(double)

setAntialiasing

public void setAntialiasing(boolean value)
Sets the antialiasing value for this ScaleBar object. This property is used to make edges of labels and symbols smoother. When set to true, antialiasing is active. Note that the time to generate a map may significantly increase when antialiasing is turned on.

Example:

scalebar.setAntialiasing(true)

Parameters:
value - the antialiasing value.
See Also:
isAntialiasing()

isAntialiasing

public boolean isAntialiasing()
Returns true if the antialiasing value is set to true.

Example:

 if(scalebar.isAntialiasing() == true){
  scalebar.setAntialiasing(false);
 }
 

Returns:
boolean
See Also:
setAntialiasing(boolean)

setFontColor

public void setFontColor(String value)
Sets the font color for this ScaleBar object.

Example:

 scalebar.setFontColor("255,0,0");
 

Parameters:
value - the font color value.
See Also:
getFontColor()

getFontColor

public String getFontColor()
Returns the font color value for this ScaleBar object.

Example:

 String fontColor = scalebar.getFontColor();
 

Returns:
String
See Also:
setFontColor(java.lang.String)

setBarColor

public void setBarColor(String value)
Sets the bar color value for this ScaleBar object.

Example:

 scalebar.setBarColor("255,0,0");
 

Parameters:
value - the bar color value.
See Also:
getBarColor()

getBarColor

public String getBarColor()
Returns the bar color value for this ScaleBar object.

Example:

 String barColor = scalebar.getBarColor();
 

Returns:
String
See Also:
setBarColor(java.lang.String)

setFont

public void setFont(String value)
Sets the font value for this ScaleBar object.

Example:

 scalebar.setFont("Tahoma");
 

Parameters:
value - the font value.
See Also:
getFont()

getFont

public String getFont()
Returns the font value for the ScaleBar object.

Example:

 String font = scalebar.getFont();
 

Returns:
String
See Also:
setFont(java.lang.String)

setDistance

public void setDistance(double value)
Sets the distance value for this ScaleBar object.

Example:

 scalebar.setDistance(25.0);
 

Parameters:
value - the distance value.
See Also:
getDistance()

getDistance

public double getDistance()
Returns the distance value associated with this ScaleBar object.

Example:

 double distance = scalebar.getDistance();
 

Returns:
double
See Also:
setDistance(double)

setScreenLength

public void setScreenLength(int value)
Sets the screen length value for this ScaleBar object.

Example:

 scalebar.setScreenLength(15);
 

Parameters:
value - the screen length value.
See Also:
getScreenLength()

getScreenLength

public int getScreenLength()
Returns the screen length value for this ScaleBar object.

Example:

 int screenLength = scalebar.getScreenLength();
 

Returns:
int
See Also:
setScreenLength(int)

setPrecision

public void setPrecision(int value)
Sets precision value for this ScaleBar object.

Example:

 scalebar.setPrecision(2);
 

Parameters:
value - the precision value.
See Also:
getPrecision()

getPrecision

public int getPrecision()
Returns the precision value associated with this ScaleBar object.

Example:

 int precision = scalebar.getPrecision();
 

Returns:
int
See Also:
setPrecision(int)

setMapUnits

public void setMapUnits(String value)
Sets the map units value for this ScaleBar object.

Example:

 scalebar.setMapUnits(scalebar.FEET);
 

Parameters:
value - the mapUnits value.
See Also:
getMapUnits()

getMapUnits

public String getMapUnits()
Returns the map units associated with this ScaleBar object.

Example:

 String mapunits = scalebar.getMapUnits();
 

Returns:
String
See Also:
setMapUnits(java.lang.String)

setScaleUnits

public void setScaleUnits(String value)
Sets the scale units for this ScaleBar object.

Example:

 scalebar.setScaleUnits(scalebar.KILOMETERS);
 

Parameters:
value - the scale units value.
See Also:
getScaleUnits()

getScaleUnits

public String getScaleUnits()
Returns the scale units for this ScaleBar object.

Example:

 String scaleUnits = scalebar.getScaleUnits();
 

Returns:
String
See Also:
setScaleUnits(java.lang.String)

setRound

public void setRound(double value)
Sets the number of digits to round.

Example:

 scalebar.setRound(25.0);
 

Parameters:
value - the round value.
See Also:
getRound()

getRound

public double getRound()
Returns the round value associated with this ScaleBar object.

Example:

 double round = scalebar.getRound();
 

Returns:
double
See Also:
setRound(double)

setMode

public void setMode(String value)
Sets the mode value when the map units are in decimal degrees. When the mode is "GEODESIC", the Image Server takes into account the position on the globe when calculating the size of the scale bar symbol. When the mode is "CARTESIAN", the Image Server uses the same calculation for the scale bar for all points on the globe. The calculation is made at the equator.

Example:

 scalebar.setMode(scalebar.GEODESIC);
 

Parameters:
value - the mode value.
See Also:
getMode()

getMode

public String getMode()
Returns the mode value.

Example:

 String mode = scalebar.getMode();
 

Returns:
String
See Also:
setMode(java.lang.String)

setFontStyle

public void setFontStyle(String value)
Sets the given font style for this Scalebar object.

Example:

 scalebar.setFontStyle(scalebar.BOLD);
 

Parameters:
value - the font style value.
See Also:
getFontStyle()

getFontStyle

public String getFontStyle()
Returns the font style associated with this Scalebar object.

Example:

 String fontstyle = scalebar.getFontStyle();
 

Returns:
String
See Also:
setFontStyle(java.lang.String)

setOverlap

public void setOverlap(boolean value)
Sets the overlap value for this Scalebar object. When true, labels can overlap. When false, labels will not overlap the symbol. If labels are not drawing as expected, check if overlap is set to false for this symbol or any other symbol in the service.

Example:

 scalebar.setOverlap(true);
 

Parameters:
value - the overlap value.
See Also:
isOverlap()

isOverlap

public boolean isOverlap()
Returns true if the ScaleBar object's overlap value is set to true.

Example:

 if(scalebar.isOverlap() == true){
  scalebar.setOverlap(false);
 }
 

Returns:
boolean
See Also:
setOverlap(boolean)

setOutline

public void setOutline(String value)
Sets the outline color for this ScaleBar object.

Example:

 scalebar.setOutline("125,0,0");
 

Parameters:
value - the outline color value.
See Also:
getOutline()

getOutline

public String getOutline()
Returns the outline color for this ScaleBar object.

Example:

 String outline = scalebar.getOutline();
 

Returns:
String
See Also:
setOutline(java.lang.String)