Interface Shape

  • All Superinterfaces:
    java.io.Serializable
    All Known Subinterfaces:
    Polygon, Rect
    All Known Implementing Classes:
    PolygonImpl, RectImpl, ShapeImpl

    public interface Shape
    extends java.io.Serializable

    Base interface for the rect and polygon xml type.

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

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getFill()
      Gets the fill color of this shape.
      double getOpacity()
      Gets the opacity of this shape.
      java.lang.String getStroke()
      Gets the stroke color of this shape.
      double getStrokeWidth()
      Gets the stroke width of this shape.
      void setFill​(java.lang.String fill)
      Sets the fill color of this shape.
      void setOpacity​(double opacity)
      Sets the opacity of this shape.
      void setStroke​(java.lang.String stroke)
      Sets the stroke color of this shape.
      void setStrokeWidth​(double strokeWidth)
      Sets the stroke width of this shape.
    • Method Detail

      • getFill

        java.lang.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​(java.lang.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

        java.lang.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​(java.lang.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