com.partnersoft.maps.model
Class Decoration

java.lang.Object
  extended by com.partnersoft.maps.model.Decoration
All Implemented Interfaces:
Coggable
Direct Known Subclasses:
LineDecoration, LineStyleSection

public abstract class Decoration
extends java.lang.Object
implements Coggable


Field Summary
protected  double interval
           
static int UNIT_INCHES
           
static int UNIT_MAP
           
static int UNIT_PERCENT
           
static int UNIT_PIXELS
           
protected  int unitType
           
 
Constructor Summary
Decoration()
           
Decoration(Cog state)
           
 
Method Summary
 double createInterval(double scale, double lineLength)
           
 double getInterval()
           
 int getUnitType()
           
 void setInterval(double interval)
           
 void setUnitType(int unitType)
           
 Cog toCog()
          Returns the complete internal state of this object in the form of a Cog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNIT_MAP

public static final int UNIT_MAP
See Also:
Constant Field Values

UNIT_PIXELS

public static final int UNIT_PIXELS
See Also:
Constant Field Values

UNIT_PERCENT

public static final int UNIT_PERCENT
See Also:
Constant Field Values

UNIT_INCHES

public static final int UNIT_INCHES
See Also:
Constant Field Values

unitType

protected int unitType

interval

protected double interval
Constructor Detail

Decoration

public Decoration()

Decoration

public Decoration(Cog state)
Method Detail

toCog

public Cog toCog()
Description copied from interface: Coggable
Returns the complete internal state of this object in the form of a Cog.

Specified by:
toCog in interface Coggable
Returns:
Cog representing the internal state of this object

createInterval

public double createInterval(double scale,
                             double lineLength)
Parameters:
scale - of map
lineLength - of entire polyline.
Returns:
the correct interval in map units based on the stored interval and unitType

getUnitType

public int getUnitType()
Returns:
the integer flag for UNIT_MAP, UNIT_PIXELS, UNIT_PERCENT, or UNIT_INCHES.

getInterval

public double getInterval()

setInterval

public void setInterval(double interval)

setUnitType

public void setUnitType(int unitType)