Class Style

Object
Style
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
Style2D

public abstract class Style extends Object implements Cloneable
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.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected double
    Maximum scale at which the geometry has to be painted with this style
    protected double
    Minimum scale at which the geometry has to be painted with this style
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    double
    Gets the maximum scale at which the geometry has to be painted with this style (inclusive)
    double
    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 Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • 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 Details

    • Style

      public Style()
  • Method Details

    • 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)
    • 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)
    • clone

      public Style clone()
      Overrides:
      clone in class Object