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
Modifier and TypeFieldDescriptionprivate boolean
abortprivate AreaPoint
areaPointprivate Board
boardprivate Color
colorprivate int
colourIndex(package private) static boolean
debugDrawprivate boolean
dirtyprivate int
idarray of boundary linesprivate int
limitprivate int
limitStartpaprivate ArrayDeque
<PltPoint> plot pointprivate boolean
selectedprivate boolean
show - true to show, false to not sow this area.private String
sid(package private) Tr
t(package private) String
zz -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add areaprivate void
add pointvoid
clear selectedvoid
draw(package private) void
fix Central Point ensures area point stays in centre of areaboolean
flip selectedboolean
flipShow()
flip show valueget area pointint
get colourIndexboolean
getDirty()
get dirty bitprivate int
getDownSwing
(int bx1, int by1) get down swingint
getID()
get IDprivate int
getLeftSwing
(int bx1, int by1) get Left Swingprivate int
getRightSwing
(int bx1, int by1) get Right Swingboolean
getShow()
get show valuegetSID()
get sidprivate int
getUpSwing
(int bx1, int by1) get Up Swingboolean
is selected??private void
log is link to Log.mesprivate void
meanderout()
out to xxx fileprivate void
recalcvoid
setColourIndex
(int colourIndex) set colour indexvoid
setDirty()
set Dirtyvoid
setDirty
(boolean dirty) set dirtyvoid
set selectedvoid
setShow
(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:Colour
clear selected- Specified by:
clearSelected
in interfaceColour
-
setSelected
public void setSelected()Description copied from interface:Colour
set selected- Specified by:
setSelected
in interfaceColour
-
isSelected
public boolean isSelected()Description copied from interface:Colour
is selected??- Specified by:
isSelected
in interfaceColour
- Returns:
- selected
-
flipSelected
public boolean flipSelected()Description copied from interface:Colour
flip selected- Specified by:
flipSelected
in interfaceColour
- Returns:
- final value
-
getAreaPoint
-
getSID
-
getColourIndex
public int getColourIndex()get colourIndex- Specified by:
getColourIndex
in interfaceColour
- Returns:
- colourIndex
-
setDirty
-
getDirty
-
getID
-
setColourIndex
public void setColourIndex(int colourIndex) set colour index- Specified by:
setColourIndex
in 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
-