Class PictureElement

java.lang.Object
noaa.coastwatch.render.AnnotationElement
noaa.coastwatch.render.PictureElement
Direct Known Subclasses:
EarthContextElement, IconElement

public abstract class PictureElement extends AnnotationElement
A picture element is an annotation element the renders graphics and shapes. The element specifies various picture properties such as the position and size.
Since:
3.1.1
Author:
Peter Hollemans
  • Field Details

    • position

      protected Point2D position
      The top-left corner position.
    • preferred

      protected Dimension preferred
      The preferred dimensions.
  • Constructor Details

    • PictureElement

      protected PictureElement(Point2D position, Dimension size)
      Creates a new picture element with the specified properties. The actual picture size may be different than the preferred size. The picture aspect ratio is kept the same, so that the actual picture fits into the preferred size rectangle.
      Parameters:
      position - the top-left corner position of the picture.
      size - the preferred picture size, or null if the picture size should be determined by the element.
  • Method Details

    • setPosition

      public void setPosition(Point2D position)
      Sets the picture position.
      Parameters:
      position - the top-left corner position of the picture.
    • setPreferredSize

      public void setPreferredSize(Dimension size)
      Sets the preferred size of the picture. The actual picture size may be different than the preferred size. The picture aspect ratio is kept the same, so that the actual picture fits into the preferred size rectangle.
      Parameters:
      size - the preferred picture size, or null if the picture size should be determined by the element.