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.Cloneable
Specification 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.IntSupplier
color0
java.util.function.IntSupplier
color1
java.awt.geom.Point2D
p0
java.awt.geom.Point2D
p1
int
pickColor
protected java.util.function.DoubleSupplier[]
PREDEFINED_THICKNESSES
java.util.function.DoubleSupplier
thickness0
java.util.function.DoubleSupplier
thickness1
-
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.SegmentDetails
clone()
ContourPlot.SegmentDetails
copy()
ContourPlot.SegmentDetails
setColor(int color)
Sets the color of the segment (start and end point)ContourPlot.SegmentDetails
setColor(java.awt.Color color)
Sets the color of the segment (start and end point)ContourPlot.SegmentDetails
setColor(java.util.function.IntSupplier color)
Sets the color of the segment (start and end point)ContourPlot.SegmentDetails
setColor0(int color)
Sets the color at the starting point of the segmentContourPlot.SegmentDetails
setColor0(java.awt.Color color)
Sets the color at the starting point of the segmentContourPlot.SegmentDetails
setColor0(java.util.function.IntSupplier color)
Sets the color at the starting point of the segmentContourPlot.SegmentDetails
setColor1(int color)
Sets the color at the starting point of the segmentContourPlot.SegmentDetails
setColor1(java.awt.Color color)
Sets the color at the end point of the segmentContourPlot.SegmentDetails
setColor1(java.util.function.IntSupplier color)
Sets the color at the end point of the segmentContourPlot.SegmentDetails
setPickColor(int pickID)
Sets the picking color.ContourPlot.SegmentDetails
setThickness(double t)
ContourPlot.SegmentDetails
setThickness(double t0, double t1)
ContourPlot.SegmentDetails
setThickness(java.util.function.DoubleSupplier t)
ContourPlot.SegmentDetails
setThickness(java.util.function.DoubleSupplier t0, java.util.function.DoubleSupplier t1)
protected java.util.function.DoubleSupplier
sup4thick(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:
clone
in 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.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(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)
-
-