Class ContourPlot.SegmentDetails

  • All Implemented Interfaces:
    java.lang.Cloneable
    Enclosing class:
    ContourPlot

    public class ContourPlot.SegmentDetails
    extends java.lang.Object
    implements java.lang.Cloneable
    Specification of a line segment which comprises vertex locations, colors, picking color, and thicknesses.
    Author:
    hageldave
    • Field Detail

      • PREDEFINED_THICKNESSES

        protected final java.util.function.DoubleSupplier[] PREDEFINED_THICKNESSES
      • p0

        public java.awt.geom.Point2D p0
      • p1

        public java.awt.geom.Point2D p1
      • color0

        public java.util.function.IntSupplier color0
      • color1

        public java.util.function.IntSupplier color1
      • thickness0

        public java.util.function.DoubleSupplier thickness0
      • thickness1

        public java.util.function.DoubleSupplier thickness1
      • pickColor

        public int pickColor
    • Constructor Detail

      • SegmentDetails

        public SegmentDetails​(java.awt.geom.Point2D p0,
                              java.awt.geom.Point2D p1)
    • Method Detail

      • copy

        public ContourPlot.SegmentDetails copy()
        Returns a shallow copy of this segment with deep copied positions p0 and p1.
        Returns:
        copy of this segment
      • setPickColor

        public ContourPlot.SegmentDetails setPickColor​(int pickID)
        Sets the picking color. When a non 0 transparent color is specified its alpha channel will be set to 0xff to make it opaque.
        Parameters:
        pickID - picking color of the segment (see ContourPlot.Lines for details)
        Returns:
        this for chaining
      • setColor0

        public ContourPlot.SegmentDetails setColor0​(java.util.function.IntSupplier color)
        Sets the color at the starting point of the segment
        Parameters:
        color - integer packed ARGB color value (e.g. 0xff00ff00 = opaque green)
        Returns:
        this for chaining
      • setColor1

        public ContourPlot.SegmentDetails setColor1​(java.util.function.IntSupplier color)
        Sets the color at the end point of the segment
        Parameters:
        color - integer packed ARGB color value (e.g. 0xff00ff00 = opaque green)
        Returns:
        this for chaining
      • setColor

        public ContourPlot.SegmentDetails setColor​(java.util.function.IntSupplier color)
        Sets the color of the segment (start and end point)
        Parameters:
        color - integer packed ARGB color value (e.g. 0xff00ff00 = opaque green)
        Returns:
        this for chaining
      • setColor0

        public ContourPlot.SegmentDetails setColor0​(int color)
        Sets the color at the starting point of the segment
        Parameters:
        color - integer packed ARGB color value (e.g. 0xff00ff00 = opaque green)
        Returns:
        this for chaining
      • setColor1

        public ContourPlot.SegmentDetails setColor1​(int color)
        Sets the color at the starting point of the segment
        Parameters:
        color - integer packed ARGB color value (e.g. 0xff00ff00 = opaque green)
        Returns:
        this for chaining
      • setColor

        public ContourPlot.SegmentDetails setColor​(int color)
        Sets the color of the segment (start and end point)
        Parameters:
        color - integer packed ARGB color value (e.g. 0xff00ff00 = opaque green)
        Returns:
        this for chaining
      • setColor0

        public ContourPlot.SegmentDetails setColor0​(java.awt.Color color)
        Sets the color at the starting point of the segment
        Parameters:
        color - for starting point
        Returns:
        this for chaining
      • setColor1

        public ContourPlot.SegmentDetails setColor1​(java.awt.Color color)
        Sets the color at the end point of the segment
        Parameters:
        color - for end point
        Returns:
        this for chaining
      • setColor

        public ContourPlot.SegmentDetails setColor​(java.awt.Color color)
        Sets the color of the segment (start and end point)
        Parameters:
        color - of the segment
        Returns:
        this for chaining
      • setThickness

        public ContourPlot.SegmentDetails setThickness​(java.util.function.DoubleSupplier t0,
                                                       java.util.function.DoubleSupplier t1)
      • sup4thick

        protected java.util.function.DoubleSupplier sup4thick​(double t)