org.geotools.renderer.style
Class Style

java.lang.Object
  extended byorg.geotools.renderer.style.Style
Direct Known Subclasses:
Style2D

public abstract class Style
extends java.lang.Object

Base class for resolved styles. Styles are resolved according a particular rendering context. The base class make no assumption about the output device (AWT, SWT, etc.). However, a particular output device may need to be choosen for concrete subclasses, for example Style2D for targeting Java2D.

Version:
$Id: Style.java 17703 2006-01-23 00:12:44Z desruisseaux $

Field Summary
protected  double maxScale
          Maximum scale at which the geometry has to be painted with this style
protected  double minScale
          Minimum scale at which the geometry has to be painted with this style
 
Constructor Summary
Style()
           
 
Method Summary
 double getMaxScale()
          Gets the maximum scale at which the geometry has to be painted with this style (inclusive)
 double getMinScale()
          Gets the minimum scale at which the geometry has to be painted with this style (inclusive)
 boolean isScaleInRange(double scale)
          Checks whethere the style should be used for painting at scale scale
 void setMinMaxScale(double minScale, double maxScale)
          Sets minimum and maximum scale, and performs integrity checks on these value (will throw and IllegalArgumentException in minScale > maxScale)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxScale

protected double maxScale
Maximum scale at which the geometry has to be painted with this style


minScale

protected double minScale
Minimum scale at which the geometry has to be painted with this style

Constructor Detail

Style

public Style()
Method Detail

getMaxScale

public double getMaxScale()
Gets the maximum scale at which the geometry has to be painted with this style (inclusive)

Returns:
- the maximum painting scale

getMinScale

public double getMinScale()
Gets the minimum scale at which the geometry has to be painted with this style (inclusive)

Returns:
- the minimum painting scale

setMinMaxScale

public void setMinMaxScale(double minScale,
                           double maxScale)
Sets minimum and maximum scale, and performs integrity checks on these value (will throw and IllegalArgumentException in minScale > maxScale)

Parameters:
minScale -
maxScale -
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

isScaleInRange

public boolean isScaleInRange(double scale)
Checks whethere the style should be used for painting at scale scale

Parameters:
scale - The scale queried
Returns:
True if scale is whithin the scale range of this style (false otherwise)


Copyright © GeoTools. All Rights Reserved.