com.mapquest
Class DTStyle

java.lang.Object
  extended bycom.mapquest.MQObject
      extended bycom.mapquest.BaseDTStyle
          extended bycom.mapquest.DTStyle
All Implemented Interfaces:
java.lang.Cloneable

public class DTStyle
extends BaseDTStyle

Contains the appearance characteristics of all features for a given display type. These characteristics include the icon name, icon type (Raster or Metafile), icon visible, label visible, low scale index, and high scale index. The scale indexes indicate the range of map scales at which the display type style applies. If the user desires to create his own icon, it must be a .BMP, which is a raster image. DTStyle objects override the most common style attributes for point features. Use DTStyle objects with line features and polygon features to set visibility (the Visible property) on or off, but no other line or polygon modifications are possible with DTStyle. In order to modify less common style attributes or line/polygon styles, use DTStyleEx or DTFeatureStyleEx instead.

See Also:
ColorStyle, FontStyle, SymbolType

Field Summary
static int CLASS_ID
           
static java.lang.String CLASS_NAME
           
 
Fields inherited from class com.mapquest.BaseDTStyle
DT_NULL
 
Fields inherited from class com.mapquest.MQObject
DEFAULT_ID, DEFAULT_NAME, DEFAULT_VERSION, FORMAT_NUMERIC_ID, FORMAT_TEXT_NAME, INVALID_ID, INVALID_NAME, INVALID_VERSION
 
Constructor Summary
DTStyle()
          Default constructor.
DTStyle(DTStyle copy)
          Copy constructor.
 
Method Summary
 boolean equals(java.lang.Object otherObject)
          Compares this object to the specified object.
 int getClassId()
          Returns the numeric id of this class.
 java.lang.String getClassName()
          Returns the text name of this class.
 ColorStyle getFontBoxBkgdColor()
          Get the font box background color within a DTStyle.
 long getFontBoxMargin()
          Get the margin between the font and the box surrounding the font within a DTStyle of type mqFontBoxed.
 ColorStyle getFontBoxOutlineColor()
          Get the font box outline color within a DTStyle.
 ColorStyle getFontColor()
          Get the font color within a DTStyle.
 java.lang.String getFontName()
          Gets the Font name within a DTStyle.
 ColorStyle getFontOutlineColor()
          Get the font outline color within a DTStyle.
 int getFontSize()
          Gets the font size within a DTStyle.
 FontStyle getFontStyle()
          Get the font style within a DTStyle.
 boolean getLabelVisible()
          Determines if the label is visible within a DTStyle.
 java.lang.String getSymbolName()
          Returns the Symbol name.
 SymbolType getSymbolType()
          Returns the Symbol type.
 boolean getVisible()
          Determines if the icon is visible within a DTStyle.
 int hashCode()
          Returns a hash code for this DTStyle.
 void init()
          Initializes a DTStyle object.
 void setFontBoxBkgdColor(ColorStyle lColor)
          Set the font box background color within a DTStyle.
 void setFontBoxMargin(long lMargin)
          Set the margin between the font and the box surrounding the font within a DTStyle of type mqFontBoxed.
 void setFontBoxOutlineColor(ColorStyle lColor)
          Set the font box outline color within a DTStyle.
 void setFontColor(ColorStyle lColor)
          Set the font color within a DTStyle.
 void setFontName(java.lang.String szFontName)
          Sets the Font Name within a DTStyle.
 void setFontOutlineColor(ColorStyle lColor)
          Set the font outline color within a DTStyle.
 void setFontSize(int nSize)
          Sets the FontSize within a DTStyle.
 void setFontStyle(FontStyle lStyle)
          Set the font style within a DTStyle.
 void setLabelVisible(boolean bLabelVisible)
          Sets the "label visible" flag, indicating whether or not this label is to be displayed.
 void setSymbolName(java.lang.String strSymbol)
          Sets the Symbol name.
 void setSymbolType(SymbolType sType)
          Sets the Symbol type.
 void setVisible(boolean bVisible)
          Sets the Visible flag, which indicates whether or not the icon is visible.
 
Methods inherited from class com.mapquest.BaseDTStyle
getDT, getHighScale, getLowScale, setDT, setHighScale, setLowScale
 
Methods inherited from class com.mapquest.MQObject
clone, getFormat, getIdWithVersion, getNameWithVersion, getObjectVersion, getTypeId, getTypeName, getVerboseConsoleOutput, setFormat, setObjectVersion, setVerboseConsoleOutput, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_ID

public static final int CLASS_ID
See Also:
Constant Field Values

CLASS_NAME

public static final java.lang.String CLASS_NAME
See Also:
Constant Field Values
Constructor Detail

DTStyle

public DTStyle()
Default constructor.


DTStyle

public DTStyle(DTStyle copy)
Copy constructor.

Parameters:
copy - The DTStyle object which will be copied into this DTStyle object.
Method Detail

init

public void init()
Initializes a DTStyle object.

Overrides:
init in class BaseDTStyle

getClassId

public int getClassId()
Returns the numeric id of this class.

Overrides:
getClassId in class MQObject
Returns:
the numeric id of this class.

getClassName

public java.lang.String getClassName()
Returns the text name of this class.

Overrides:
getClassName in class MQObject
Returns:
the text name of this class.

setSymbolName

public void setSymbolName(java.lang.String strSymbol)
Sets the Symbol name.

Parameters:
strSymbol - The name that this DTStyle symbol name is to be set to.

setSymbolType

public void setSymbolType(SymbolType sType)
Sets the Symbol type.

Parameters:
sType - The icon type that this DTStyle Symbol type is to be set to.

setLabelVisible

public void setLabelVisible(boolean bLabelVisible)
Sets the "label visible" flag, indicating whether or not this label is to be displayed.

Parameters:
bLabelVisible - true indicates that the label is to be visible, false indicates that it is not visible.

setVisible

public void setVisible(boolean bVisible)
Sets the Visible flag, which indicates whether or not the icon is visible.

Parameters:
bVisible - true indicates that the icon is to be visible, false indicates that it is not to be visible.

getSymbolName

public java.lang.String getSymbolName()
Returns the Symbol name.

Returns:
The Symbol name.

getSymbolType

public SymbolType getSymbolType()
Returns the Symbol type.

Returns:
The Symbol type, 0 for Raster, 1 for Vector.

getLabelVisible

public boolean getLabelVisible()
Determines if the label is visible within a DTStyle.

Returns:
The value of the m_bVisible field of this object.

getVisible

public boolean getVisible()
Determines if the icon is visible within a DTStyle.

Returns:
The value of the m_bVisible field of this object.

setFontSize

public void setFontSize(int nSize)
Sets the FontSize within a DTStyle.

Parameters:
nSize - New font size.

getFontSize

public int getFontSize()
Gets the font size within a DTStyle.

Returns:
The value of the m_nFontSize field of this object.

setFontName

public void setFontName(java.lang.String szFontName)
Sets the Font Name within a DTStyle.

Parameters:
szFontName - New font name.

getFontName

public java.lang.String getFontName()
Gets the Font name within a DTStyle.

Returns:
The value of the m_szFontName field of this object.

setFontColor

public void setFontColor(ColorStyle lColor)
Set the font color within a DTStyle.

Parameters:
lColor - New font color.

getFontColor

public ColorStyle getFontColor()
Get the font color within a DTStyle.

Returns:
The value of the m_lFontColor field of this object.

setFontOutlineColor

public void setFontOutlineColor(ColorStyle lColor)
Set the font outline color within a DTStyle.

Parameters:
lColor - New font outline color.

getFontOutlineColor

public ColorStyle getFontOutlineColor()
Get the font outline color within a DTStyle.

Returns:
The value of the m_lFontOutlineColor field of this object.

setFontBoxBkgdColor

public void setFontBoxBkgdColor(ColorStyle lColor)
Set the font box background color within a DTStyle.

Parameters:
lColor - New font box background color.

getFontBoxBkgdColor

public ColorStyle getFontBoxBkgdColor()
Get the font box background color within a DTStyle.

Returns:
The value of the m_lFontBoxBkgdColor field of this object.

setFontBoxOutlineColor

public void setFontBoxOutlineColor(ColorStyle lColor)
Set the font box outline color within a DTStyle.

Parameters:
lColor - New font box outline color.

getFontBoxOutlineColor

public ColorStyle getFontBoxOutlineColor()
Get the font box outline color within a DTStyle.

Returns:
The value of the m_lFontBoxOutlineColor field of this object.

setFontBoxMargin

public void setFontBoxMargin(long lMargin)
Set the margin between the font and the box surrounding the font within a DTStyle of type mqFontBoxed.

Parameters:
lMargin - New font margin.

getFontBoxMargin

public long getFontBoxMargin()
Get the margin between the font and the box surrounding the font within a DTStyle of type mqFontBoxed.


setFontStyle

public void setFontStyle(FontStyle lStyle)
Set the font style within a DTStyle.

Parameters:
lStyle - New font style.

getFontStyle

public FontStyle getFontStyle()
Get the font style within a DTStyle.

Returns:
The value of the m_lFontStyle field of this object.

equals

public boolean equals(java.lang.Object otherObject)
Compares this object to the specified object. The result is true if and only if the argument is not null and is a DTStyle object that has same attributes as this object.

Overrides:
equals in class BaseDTStyle
Parameters:
otherObject - the object to compare this DTStyle against.
Returns:
true if the DTStyle objects are equal; false otherwise.

hashCode

public int hashCode()
Returns a hash code for this DTStyle.

Overrides:
hashCode in class BaseDTStyle
Returns:
a hash code value for this DTStyle.