Class ControlCurve
- java.lang.Object
-
- net.adoptopenjdk.icedteaweb.client.parts.splashscreen.impls.defaultsplashscreen2012.ControlCurve
-
- Direct Known Subclasses:
NatCubic
public class ControlCurve extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ControlCurve()ControlCurve(java.awt.Polygon p)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intaddPoint(int x, int y)add a control point, return index of new control pointvoidcalculateAndSaveResult()java.awt.PolygoncalculateResult()to be overwrittenjava.awt.PolygongetResult()java.awt.PolygongetSourcePolygon()booleanisWithPoints()voidpaint(java.awt.Graphics g)paint this curve into g.voidremovePoint()remove selected control pointvoidremovePoint(int index)remove selected control pointvoidresetResult()intselectPoint(int x, int y)return index of control point near to (x,y) or -1 if nothing nearvoidsetPoint(int x, int y)set selected control pointvoidsetPoint(int index, int x, int y)set selected control point(package private) voidsetSelection(int selection)for testing purposesvoidsetSourcePolygon(java.awt.Polygon pts)voidsetWithPoints(boolean withPoints)(package private) static intsqr(int x)java.lang.StringtoString()
-
-
-
Field Detail
-
pts
protected java.awt.Polygon pts
-
result
protected java.awt.Polygon result
-
withPoints
protected boolean withPoints
-
selection
protected int selection
-
f
static java.awt.Font f
-
EPSILON
static final int EPSILON
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSourcePolygon
public java.awt.Polygon getSourcePolygon()
-
setSourcePolygon
public void setSourcePolygon(java.awt.Polygon pts)
-
calculateResult
public java.awt.Polygon calculateResult()
to be overwritten
-
calculateAndSaveResult
public void calculateAndSaveResult()
-
paint
public void paint(java.awt.Graphics g)
paint this curve into g.
-
selectPoint
public int selectPoint(int x, int y)return index of control point near to (x,y) or -1 if nothing near
-
sqr
static int sqr(int x)
-
getResult
public java.awt.Polygon getResult()
-
resetResult
public void resetResult()
-
addPoint
public int addPoint(int x, int y)add a control point, return index of new control point
-
setPoint
public void setPoint(int x, int y)set selected control point
-
setPoint
public void setPoint(int index, int x, int y)set selected control point
-
removePoint
public void removePoint(int index)
remove selected control point
-
removePoint
public void removePoint()
remove selected control point
-
isWithPoints
public boolean isWithPoints()
-
setWithPoints
public void setWithPoints(boolean withPoints)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
setSelection
void setSelection(int selection)
for testing purposes- Parameters:
selection-
-
-