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
FieldsModifier and TypeFieldDescriptionareaPointsareasboardColour[]colour objects - line, area or ??control pointsdcprivate static booleandebugprivate static booleandebug drawprivate static booleandebug lineend pointsstatic LayerlayerCurrentA list of layerslinesmoverprivate static intreserve id = 1 for grid, 2 for hoop(package private) Trtprivate static Stringzz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd areavoidaddBoardLink(Board board, Grid grid) add board linkvoidaddEndPoint(EndPoint ep) add End Pointvoidcalled by mover ???voidadd mover linkvoidclear()clear all arraylistsbooleandeleteColourObject(Colour colour) delete Colour ObjectbooleandeleteColourObjectByID(int id) delete Colour Object By IDbooleandelete Selected Colour Objectsvoidhandle deselect all colour objectsvoidentry point from DotsCanvas paintComponentfind Point With Exact PositiongetColourObject(int n) get colour objectget control pointstatic Layerget current layerget end pointstatic intget id and increment nextID for next callstatic intget next id but does not increment itprivate voidlogging linked to Log.mesvoidlogAreas()log areasvoidlog colour objectsvoidlogLines()log linesvoidsaveAllData(PrintStream out, File file) save all datavoidsaveCtlPoint(CtlPoint cp, PrintStream out) save control pointvoidsaveEndPoint(EndPoint ep, PrintStream out1) save end pointvoidsetColourObject(Colour colour) set colour objectvoidShow All AreasvoidshowAllAreas(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
-