Package curve.line
Class Line
java.lang.Object
curve.line.Line
-
Field Summary
Modifier and TypeFieldDescriptionA list of the areas this line is adjacent tothe board this line is drawn onthis line's colourprivate int
colour indexstatic boolean
debugstatic boolean
debug1static boolean
debug constructorstatic boolean
debug drawingstatic boolean
debug Overprotected boolean
The dirty flag is set to show requirement to redrawprotected int
line id - connected to colourobject array????DPoint[]
the control points for this curve????????boolean
Show this line is selectedprotected String
line sid - from file(package private) Tr
tint
line width - todo(package private) static String
zz -
Constructor Summary
ConstructorDescriptionconstruct a lineconstructorconstruct a straight linefrom new Straight line from interpreter construct a line with given id to add curves -
Method Summary
Modifier and TypeMethodDescriptionvoid
add areavoid
remove areavoid
clear areasvoid
clear selectedstatic Line
clone line -void
delete()
already done in interpreter need to look at the two points and delete them if this is the only link back todoabstract void
Drawprotected void
drawLineSegment
(int fx0, int fy0, int fx1, int fy1, Board board) draw line segmentboolean
flip selectedgetAreas()
get areasint
get colour indexboolean
getDirty()
get the dirty statusint
getID()
get numeric id (position in table)getSID()
get name referenceboolean
is selected?(package private) static void
logging link(package private) void
Log pointsprivate int
max
(int a, int b) maxprivate int
min
(int a, int b) minabstract String
out()
out to xxx file to be overriddenint
return point indexvoid
setColourIndex
(int colourIndex) set colour indexvoid
setDirty
(boolean dirty) set the dirty statusvoid
set selectedabstract String
toString()
to stringvoid
update()
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:
isSelected
in interfaceColour
- Returns:
- selected
-
flipSelected
public boolean flipSelected()Description copied from interface:Colour
flip selected- Specified by:
flipSelected
in interfaceColour
- Returns:
- final value
-
clearSelected
-
setSelected
-
clearAreas
public void clearAreas()clear areas -
clearArea
-
getColourIndex
public int getColourIndex()get colour index- Specified by:
getColourIndex
in interfaceColour
- Returns:
- colour index
-
setColourIndex
public void setColourIndex(int colourIndex) set colour index- Specified by:
setColourIndex
in 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
-