ilog.views.maps.theme
Class IlvMapDynamicStyle

java.lang.Object
  extended by ilog.views.maps.theme.IlvMapDynamicStyle
All Implemented Interfaces:
IlvPersistentObject, Comparable

public class IlvMapDynamicStyle
extends Object
implements IlvPersistentObject, Comparable

A dynamic style is a record containing an IlvMapStyle and a scale. This class is to be used with a IlvMapStyleController that manages the selection of styles at the given scale.

Since:
JViews 7.5

Constructor Summary
IlvMapDynamicStyle(double scale, IlvMapStyle style, String name)
          Creates a new IlvMapStyleAtScale instance for a given scale.
IlvMapDynamicStyle(IlvInputStream stream)
          Reads this dynamic style from an IlvInputStream.
 
Method Summary
 int compareTo(Object o)
          Compares the order of this object with the specified object.
 String getName()
          Returns the name of the style.
 double getScale()
          Returns the scale at which the theme will be applied.
 IlvMapStyle getStyle()
          Returns the style for this theme.
 void setName(String name)
          Sets the name of the style.
 void setScale(double scale)
          Sets the scale at which the theme will be applied.
 void setStyle(IlvMapStyle style)
          Sets the style for this theme.
 void write(IlvOutputStream stream)
          Writes the attributes of a persistent object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvMapDynamicStyle

public IlvMapDynamicStyle(IlvInputStream stream)
                   throws IlvReadFileException
Reads this dynamic style from an IlvInputStream.

Parameters:
stream - The stream to read from.
Throws:
IlvReadFileException - if there is a problem reading from stream.

IlvMapDynamicStyle

public IlvMapDynamicStyle(double scale,
                          IlvMapStyle style,
                          String name)
Creates a new IlvMapStyleAtScale instance for a given scale.

Parameters:
scale - The scale activating the style.
style - The style to be set when the scale is reached.
name - The name of the object.
Method Detail

write

public void write(IlvOutputStream stream)
           throws IOException
Writes the attributes of a persistent object.

Specified by:
write in interface IlvPersistentObject
Parameters:
stream - the output stream
Throws:
IOException - thrown when an exception occurs during the write operation for this object.
See Also:
IlvPersistentObject.write(ilog.views.io.IlvOutputStream)

setStyle

public void setStyle(IlvMapStyle style)
Sets the style for this theme.

Parameters:
style - The style for this theme.

getStyle

public IlvMapStyle getStyle()
Returns the style for this theme.

Returns:
The style for this theme.

getName

public String getName()
Returns the name of the style.

Returns:
The name of the style

setName

public void setName(String name)
Sets the name of the style.

Parameters:
name - The name of the style.

getScale

public double getScale()
Returns the scale at which the theme will be applied.

Returns:
The scale at which the theme will be applied.

setScale

public void setScale(double scale)
Sets the scale at which the theme will be applied.

Parameters:
scale - The scale at which the theme will be applied.

compareTo

public int compareTo(Object o)
Compares the order of this object with the specified object.

Specified by:
compareTo in interface Comparable
Parameters:
o - The object to compare with this IlvMapDynamicStyle instance.
Returns:
If the orders are the same, 0 is returned.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.