Package curve.line
Class Line
java.lang.Object
curve.line.Line
-
Field Summary
FieldsModifier 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 Summary
ConstructorsConstructorDescriptionconstruct a lineconstructorconstruct a straight linefrom new Straight line from interpreter construct a line with given id to add curves -
Method Summary
Modifier 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
-
zz
zz -
debugDraw
public static boolean debugDrawdebug drawing -
debugConstruct
public static boolean debugConstructdebug constructor -
debug
public static boolean debugdebug -
debugOver
public static boolean debugOverdebug Over -
debug1
public static boolean debug1debug1 -
colourIndex
private int colourIndexcolour index -
board
the board this line is drawn on -
id
protected int idline id - connected to colourobject array???? -
t
Tr tt -
sid
line sid - from file -
width
public int widthline width - todo -
selected
public boolean selectedShow this line is selected -
colour
this line's colour -
points
the control points for this curve???????? -
dirty
protected 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
-
isSelected
public boolean isSelected()is selected?- Specified by:
isSelectedin interfaceColour- Returns:
- selected
-
flipSelected
public boolean flipSelected()Description copied from interface:Colourflip selected- Specified by:
flipSelectedin interfaceColour- Returns:
- final value
-
clearSelected
-
setSelected
-
clearAreas
public void clearAreas()clear areas -
clearArea
-
getColourIndex
public int getColourIndex()get colour index- Specified by:
getColourIndexin interfaceColour- Returns:
- colour index
-
setColourIndex
public void setColourIndex(int colourIndex) set colour index- Specified by:
setColourIndexin interfaceColour- Parameters:
colourIndex- -
-
addArea
-
getAreas
-
update
public void update()update -
draw
-
returnPointIndex
-
cloneLine
-
delete
public void delete()already done in interpreter need to look at the two points and delete them if this is the only link back todo -
min
private int min(int a, int b) min- Parameters:
a- -b- -- Returns:
- minimum
-
max
private int max(int a, int b) max- Parameters:
a- -b- -- Returns:
- maximum
-
drawLineSegment
draw line segment- Parameters:
fx0- -fy0- -fx1- -fy1- -board- -
-
toString
-
out
-
logPoints
-