Package curve.area
Class MyArea
java.lang.Object
curve.area.MyArea
- All Implemented Interfaces:
Colour
an area to hold stitches // could also be line of zigzag stitches // defined
by a set of lines or points ??????? // lines would be unique, points would be
shared by lines // areas would be separated by jump stitches
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanabortprivate AreaPointareaPointprivate Boardboardprivate Colorcolorprivate intcolourIndex(package private) static booleandebugDrawprivate booleandirtyprivate intidarray of boundary linesprivate intlimitprivate intlimitStartpaprivate ArrayDeque<PltPoint> plot pointprivate booleanselectedprivate booleanshow - true to show, false to not sow this area.private Stringsid(package private) Trt(package private) Stringzz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd areaprivate voidadd pointvoidclear selectedvoiddraw(package private) voidfix Central Point ensures area point stays in centre of areabooleanflip selectedbooleanflipShow()flip show valueget area pointintget colourIndexbooleangetDirty()get dirty bitprivate intgetDownSwing(int bx1, int by1) get down swingintgetID()get IDprivate intgetLeftSwing(int bx1, int by1) get Left Swingprivate intgetRightSwing(int bx1, int by1) get Right SwingbooleangetShow()get show valuegetSID()get sidprivate intgetUpSwing(int bx1, int by1) get Up Swingbooleanis selected??private voidlog is link to Log.mesprivate voidmeanderout()out to xxx fileprivate voidrecalcvoidsetColourIndex(int colourIndex) set colour indexvoidsetDirty()set DirtyvoidsetDirty(boolean dirty) set dirtyvoidset selectedvoidsetShow(boolean show) set show valuetoString()get string rep
-
Field Details
-
zz
String zzzz -
debugDraw
static boolean debugDrawdebugDraw -
id
private int idid -
sid
sid -
areaPoint
areaPoint -
color
color -
board
board -
colourIndex
private int colourIndexcolourIndex -
dirty
private boolean dirtydirty -
selected
private boolean selectedselected -
pa
-
t
Tr tt -
la
-
show
private boolean showshow - true to show, false to not sow this area. -
abort
private boolean abortabort -
limit
private int limitlimit -
limitStart
private int limitStartlimitStart -
pa1
plot point
-
-
Constructor Details
-
MyArea
-
MyArea
-
-
Method Details
-
getShow
public boolean getShow()get show value- Returns:
- show
-
setShow
public void setShow(boolean show) set show value- Parameters:
show- -
-
flipShow
public boolean flipShow()flip show value- Returns:
- new show value
-
clearSelected
public void clearSelected()Description copied from interface:Colourclear selected- Specified by:
clearSelectedin interfaceColour
-
setSelected
public void setSelected()Description copied from interface:Colourset selected- Specified by:
setSelectedin interfaceColour
-
isSelected
public boolean isSelected()Description copied from interface:Colouris selected??- Specified by:
isSelectedin interfaceColour- Returns:
- selected
-
flipSelected
public boolean flipSelected()Description copied from interface:Colourflip selected- Specified by:
flipSelectedin interfaceColour- Returns:
- final value
-
getAreaPoint
-
getSID
-
getColourIndex
public int getColourIndex()get colourIndex- Specified by:
getColourIndexin interfaceColour- Returns:
- colourIndex
-
setDirty
-
getDirty
-
getID
-
setColourIndex
public void setColourIndex(int colourIndex) set colour index- Specified by:
setColourIndexin interfaceColour- Parameters:
colourIndex- -
-
setDirty
public void setDirty()set Dirty -
addArea
-
log
-
meander
-
addPoint
-
recalc
-
fixCentralPoint
fix Central Point ensures area point stays in centre of area- Parameters:
t- -
-
getRightSwing
private int getRightSwing(int bx1, int by1) get Right Swing- Parameters:
bx1- -by1- -- Returns:
- new bx1
-
getLeftSwing
private int getLeftSwing(int bx1, int by1) get Left Swing- Parameters:
bx1- -by1- -- Returns:
- left swing
-
getUpSwing
private int getUpSwing(int bx1, int by1) get Up Swing- Parameters:
bx1- -by1- -- Returns:
- new by1
-
getDownSwing
private int getDownSwing(int bx1, int by1) get down swing- Parameters:
bx1- -by1- -- Returns:
- down swing
-
draw
-
out
-
toString
-