Package curve.line
Class Line
java.lang.Object
curve.line.Line
- 
Field SummaryFieldsModifier and TypeFieldDescriptionA list of the areas this line is adjacent tothe board this line is drawn onthis line's colourprivate intcolour indexstatic booleandebugstatic booleandebug1static booleandebug constructorstatic booleandebug drawingstatic booleandebug Overprotected booleanThe dirty flag is set to show requirement to redrawprotected intline id - connected to colourobject array????DPoint[]the control points for this curve????????booleanShow this line is selectedprotected Stringline sid - from file(package private) Trtintline width - todo(package private) static Stringzz
- 
Constructor SummaryConstructorsConstructorDescriptionconstruct a lineconstructorconstruct a straight linefrom new Straight line from interpreter construct a line with given id to add curves
- 
Method SummaryModifier and TypeMethodDescriptionvoidadd areavoidremove areavoidclear areasvoidclear selectedstatic Lineclone line -voiddelete()already done in interpreter need to look at the two points and delete them if this is the only link back todoabstract voidDrawprotected voiddrawLineSegment(int fx0, int fy0, int fx1, int fy1, Board board) draw line segmentbooleanflip selectedgetAreas()get areasintget colour indexbooleangetDirty()get the dirty statusintgetID()get numeric id (position in table)getSID()get name referencebooleanis selected?(package private) static voidlogging link(package private) voidLog pointsprivate intmax(int a, int b) maxprivate intmin(int a, int b) minabstract Stringout()out to xxx file to be overriddenintreturn point indexvoidsetColourIndex(int colourIndex) set colour indexvoidsetDirty(boolean dirty) set the dirty statusvoidset selectedabstract StringtoString()to stringvoidupdate()update
- 
Field Details- 
zzzz
- 
debugDrawpublic static boolean debugDrawdebug drawing
- 
debugConstructpublic static boolean debugConstructdebug constructor
- 
debugpublic static boolean debugdebug
- 
debugOverpublic static boolean debugOverdebug Over
- 
debug1public static boolean debug1debug1
- 
colourIndexprivate int colourIndexcolour index
- 
boardthe board this line is drawn on
- 
idprotected int idline id - connected to colourobject array????
- 
tTr tt
- 
sidline sid - from file
- 
widthpublic int widthline width - todo
- 
selectedpublic boolean selectedShow this line is selected
- 
colourthis line's colour
- 
pointsthe control points for this curve????????
- 
dirtyprotected boolean dirtyThe dirty flag is set to show requirement to redraw
- 
areas
 
- 
- 
Constructor Details- 
Line
- 
Line
- 
Line
- 
Line
 
- 
- 
Method Details- 
log
- 
getID
- 
getSID
- 
setDirty
- 
getDirty
- 
isSelectedpublic boolean isSelected()is selected?- Specified by:
- isSelectedin interface- Colour
- Returns:
- selected
 
- 
flipSelectedpublic boolean flipSelected()Description copied from interface:Colourflip selected- Specified by:
- flipSelectedin interface- Colour
- Returns:
- final value
 
- 
clearSelected
- 
setSelected
- 
clearAreaspublic void clearAreas()clear areas
- 
clearArea
- 
getColourIndexpublic int getColourIndex()get colour index- Specified by:
- getColourIndexin interface- Colour
- Returns:
- colour index
 
- 
setColourIndexpublic void setColourIndex(int colourIndex) set colour index- Specified by:
- setColourIndexin interface- Colour
- Parameters:
- colourIndex- -
 
- 
addArea
- 
getAreas
- 
updatepublic void update()update
- 
draw
- 
returnPointIndex
- 
cloneLine
- 
deletepublic void delete()already done in interpreter need to look at the two points and delete them if this is the only link back todo
- 
minprivate int min(int a, int b) min- Parameters:
- a- -
- b- -
- Returns:
- minimum
 
- 
maxprivate int max(int a, int b) max- Parameters:
- a- -
- b- -
- Returns:
- maximum
 
- 
drawLineSegmentdraw line segment- Parameters:
- fx0- -
- fy0- -
- fx1- -
- fy1- -
- board- -
 
- 
toString
- 
out
- 
logPoints
 
-