Class PreviewLabel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants

public class PreviewLabel extends JLabel
The icon ("label") that represents a styled mark in the GIS style editors.
Author:
Nick Collier, Eric Tatara
See Also:
  • Field Details

    • SMALL_MARK_SIZE

      protected static final int SMALL_MARK_SIZE
      See Also:
    • PREVIEW_SIZE

      protected static final int PREVIEW_SIZE
      See Also:
    • polygonShape

      protected GeneralPath polygonShape
    • shape

      protected Shape shape
    • mark

      protected String mark
    • fillColor

      protected Color fillColor
    • fillOpacity

      protected double fillOpacity
    • outlineColor

      protected Color outlineColor
    • outlineOpacity

      protected double outlineOpacity
    • outlineThickness

      protected double outlineThickness
    • markSize

      protected double markSize
    • markRotation

      protected double markRotation
    • image

      protected BufferedImage image
    • markFac

      protected static SimpleMarkFactory markFac
  • Constructor Details

    • PreviewLabel

      public PreviewLabel()
  • Method Details

    • updatePreview

      public void updatePreview()
      Updates the PreviewLabel icon based on the current values for fill, opacity, etc.
    • getSmallIcon

      public ImageIcon getSmallIcon()
      Provide a small icon for table cells or other locations where just the small icon is needed.
      Returns:
      the small icon
    • setMark

      public void setMark(String mark)
      Set the mark based on the well-known text string (ie "circle").
      Parameters:
      mark - the well-known text string
    • setShapeToPolygon

      public void setShapeToPolygon()
      Set the Shape instance to a polygon shape.
    • setShapeToLine

      public void setShapeToLine()
      Set the Shape instance to a line shape.
    • updateShape

      public void updateShape()
    • setFillColor

      public void setFillColor(Color fillColor)
    • setFillOpacity

      public void setFillOpacity(double fillOpacity)
    • setOutlineColor

      public void setOutlineColor(Color outlineColor)
    • setOutlineOpacity

      public void setOutlineOpacity(double outlineOpacity)
    • setMarkSize

      public void setMarkSize(double markSize)
    • setMarkRotation

      public void setMarkRotation(double markRotation)
    • setOutlineThickness

      public void setOutlineThickness(double outlineThickness)