Interface Shape

All Superinterfaces:
Serializable
All Known Subinterfaces:
Polygon, Rect
All Known Implementing Classes:
PolygonImpl, RectImpl, ShapeImpl

public interface Shape extends Serializable

Base interface for the rect and polygon xml type.

Base interface for the rect and polygon xml type.
Implemented in ShapeImpl.

  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the fill color of this shape.
    double
    Gets the opacity of this shape.
    Gets the stroke color of this shape.
    double
    Gets the stroke width of this shape.
    void
    Sets the fill color of this shape.
    void
    setOpacity(double opacity)
    Sets the opacity of this shape.
    void
    setStroke(String stroke)
    Sets the stroke color of this shape.
    void
    setStrokeWidth(double strokeWidth)
    Sets the stroke width of this shape.
  • Method Details

    • getFill

      String getFill()

      Gets the fill color of this shape.

      Gets the fill color of this shape as a triple of hexadecimal values (RGB).

      Returns:
      the fill color of this shape.
    • setFill

      void setFill(String fill)

      Sets the fill color of this shape.

      Sets the fill color of this shape as a triple of hexadecimal values (RGB).

      Parameters:
      fill - the fill color of this shape.
    • getStroke

      String getStroke()

      Gets the stroke color of this shape.

      Gets the stroke color of this shape as a triple of hexadecimal values (RGB).

      Returns:
      the stroke color of this shape.
    • setStroke

      void setStroke(String stroke)

      Sets the stroke color of this shape.

      Sets the stroke color of this shape as a triple of hexadecimal values (RGB).

      Parameters:
      stroke - the stroke color of this shape.
    • getStrokeWidth

      double getStrokeWidth()

      Gets the stroke width of this shape.

      Gets the stroke width of this shape in points.

      Returns:
      stroke width of this shape
    • setStrokeWidth

      void setStrokeWidth(double strokeWidth)

      Sets the stroke width of this shape.

      Sets the stroke width of this shape in points.

      Parameters:
      strokeWidth - stroke width of this shape
    • getOpacity

      double getOpacity()

      Gets the opacity of this shape.

      Gets the opacity of this shape in percent.

      Returns:
      opacity of this shape
    • setOpacity

      void setOpacity(double opacity)

      Sets the opacity of this shape.

      Sets the opacity of this shape in percent.

      Parameters:
      opacity - opacity of this shape