Package curve.area
Class Layer
java.lang.Object
curve.area.Layer
See curve.area.Board for comments on the dot backing array.
Layer holds the descriptive collections of points and lines.
x+ is up, so x is mirrored from the dots array
dots 0, 0 maps to top left cornerof user screen
The user screen shadows the layers with a scaling factor
so x = horPixels/2, y = 0 will start to show in the middle lhs
The y axis is shared by both
May need an index from id to line
Layer holds the descriptive collections of points and lines.
x+ is up, so x is mirrored from the dots array
dots 0, 0 maps to top left cornerof user screen
The user screen shadows the layers with a scaling factor
so x = horPixels/2, y = 0 will start to show in the middle lhs
The y axis is shared by both
May need an index from id to line
-
Field Summary
Modifier and TypeFieldDescriptionareaPointsareasboardColour[]
colour objects - line, area or ??control pointsdcprivate static boolean
debugprivate static boolean
debug drawprivate static boolean
debug lineend pointsstatic Layer
layerCurrentA list of layerslinesmoverprivate static int
reserve id = 1 for grid, 2 for hoop(package private) Tr
tprivate static String
zz -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add areavoid
addBoardLink
(Board board, Grid grid) add board linkvoid
addEndPoint
(EndPoint ep) add End Pointvoid
called by mover ???void
add mover linkvoid
clear()
clear all arraylistsboolean
deleteColourObject
(Colour colour) delete Colour Objectboolean
deleteColourObjectByID
(int id) delete Colour Object By IDboolean
delete Selected Colour Objectsvoid
handle deselect all colour objectsvoid
entry point from DotsCanvas paintComponentfind Point With Exact PositiongetColourObject
(int n) get colour objectget control pointstatic Layer
get current layerget end pointstatic int
get id and increment nextID for next callstatic int
get next id but does not increment itprivate void
logging linked to Log.mesvoid
logAreas()
log areasvoid
log colour objectsvoid
logLines()
log linesvoid
saveAllData
(PrintStream out, File file) save all datavoid
saveCtlPoint
(CtlPoint cp, PrintStream out) save control pointvoid
saveEndPoint
(EndPoint ep, PrintStream out1) save end pointvoid
setColourObject
(Colour colour) set colour objectvoid
Show All Areasvoid
showAllAreas
(boolean show) Show All Areas
-
Field Details
-
zz
zz -
layerCurrent
layerCurrent -
debug
private static boolean debugdebug -
debugDraw
private static boolean debugDrawdebug draw -
debugLine
private static boolean debugLinedebug line -
layers
-
nextID
private static int nextIDreserve id = 1 for grid, 2 for hoop -
dc
dc -
t
Tr tt -
mover
mover -
board
board -
endPoints
-
ctlPoints
-
lines1
-
areas
-
areaPoints
-
colourObjects
colour objects - line, area or ??
-
-
Constructor Details
-
Layer
-
-
Method Details
-
log
-
addBoardLink
-
getIDPlus
public static int getIDPlus()get id and increment nextID for next call- Returns:
- id and leaves nextID incremented for next call
-
getNextID
public static int getNextID()get next id but does not increment it- Returns:
- next id
-
getCurrentLayer
-
addMoverLink
-
getEP
-
addEndPoint
-
getCP
-
addLine
-
addArea
-
showAllAreas
public void showAllAreas()Show All Areas -
showAllAreas
public void showAllAreas(boolean show) Show All Areas- Parameters:
show
- - true to show, false to hide
-
draw
-
saveAllData
-
logLines
public void logLines()log lines -
logAreas
public void logAreas()log areas -
deselectAllColours
public void deselectAllColours()handle deselect all colour objects -
deleteSelectedColourObjects
public boolean deleteSelectedColourObjects()delete Selected Colour Objects- Returns:
- success
-
deleteColourObject
delete Colour Object- Parameters:
colour
- -- Returns:
- success
-
deleteColourObjectByID
public boolean deleteColourObjectByID(int id) delete Colour Object By ID- Parameters:
id
- -- Returns:
- status of delete
-
saveEndPoint
-
saveCtlPoint
save control point- Parameters:
cp
- -out
- -
-
clear
public void clear()clear all arraylists -
findPointWithExactPosition
-
logCLookup
public void logCLookup()log colour objects -
setColourObject
set colour object- Parameters:
colour
- - any object to draw
-
getColourObject
-