Package gov.nih.mipav.model.algorithms
Class ContourPlot.SegmentDetails
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.ContourPlot.SegmentDetails
-
- All Implemented Interfaces:
java.lang.Cloneable
- Enclosing class:
- ContourPlot
public class ContourPlot.SegmentDetails extends java.lang.Object implements java.lang.CloneableSpecification of a line segment which comprises vertex locations, colors, picking color, and thicknesses.- Author:
- hageldave
-
-
Field Summary
Fields Modifier and Type Field Description java.util.function.IntSuppliercolor0java.util.function.IntSuppliercolor1java.awt.geom.Point2Dp0java.awt.geom.Point2Dp1intpickColorprotected java.util.function.DoubleSupplier[]PREDEFINED_THICKNESSESjava.util.function.DoubleSupplierthickness0java.util.function.DoubleSupplierthickness1
-
Constructor Summary
Constructors Constructor Description SegmentDetails(java.awt.geom.Point2D p0, java.awt.geom.Point2D p1)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContourPlot.SegmentDetailsclone()ContourPlot.SegmentDetailscopy()ContourPlot.SegmentDetailssetColor(int color)Sets the color of the segment (start and end point)ContourPlot.SegmentDetailssetColor(java.awt.Color color)Sets the color of the segment (start and end point)ContourPlot.SegmentDetailssetColor(java.util.function.IntSupplier color)Sets the color of the segment (start and end point)ContourPlot.SegmentDetailssetColor0(int color)Sets the color at the starting point of the segmentContourPlot.SegmentDetailssetColor0(java.awt.Color color)Sets the color at the starting point of the segmentContourPlot.SegmentDetailssetColor0(java.util.function.IntSupplier color)Sets the color at the starting point of the segmentContourPlot.SegmentDetailssetColor1(int color)Sets the color at the starting point of the segmentContourPlot.SegmentDetailssetColor1(java.awt.Color color)Sets the color at the end point of the segmentContourPlot.SegmentDetailssetColor1(java.util.function.IntSupplier color)Sets the color at the end point of the segmentContourPlot.SegmentDetailssetPickColor(int pickID)Sets the picking color.ContourPlot.SegmentDetailssetThickness(double t)ContourPlot.SegmentDetailssetThickness(double t0, double t1)ContourPlot.SegmentDetailssetThickness(java.util.function.DoubleSupplier t)ContourPlot.SegmentDetailssetThickness(java.util.function.DoubleSupplier t0, java.util.function.DoubleSupplier t1)protected java.util.function.DoubleSuppliersup4thick(double t)
-
-
-
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
-
-
Method Detail
-
copy
public ContourPlot.SegmentDetails copy()
- Returns:
- copy of this segment
-
clone
public ContourPlot.SegmentDetails clone()
- Overrides:
clonein classjava.lang.Object
-
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 (seeContourPlot.Linesfor 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(double t)
-
setThickness
public ContourPlot.SegmentDetails setThickness(java.util.function.DoubleSupplier t)
-
setThickness
public ContourPlot.SegmentDetails setThickness(double t0, double t1)
-
setThickness
public ContourPlot.SegmentDetails setThickness(java.util.function.DoubleSupplier t0, java.util.function.DoubleSupplier t1)
-
sup4thick
protected java.util.function.DoubleSupplier sup4thick(double t)
-
-