Package curve.area
Class Grid
java.lang.Object
curve.area.Grid
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear selectedvoid
drawboolean
flip selectedint
get colour indexboolean
getDirty()
get dirty flagint
getID()
get id return idprivate void
horGridLeft
(int px, int py) hor Grid Leftprivate void
horGridRight
(int px, int py) hor Grid Rightboolean
is selected??void
setColourIndex
(int colourIndex) set colour indexvoid
setDirty
(boolean dirty) set dirty flagvoid
Add a grid to the dotsvoid
set selectedtoString()
to Stringprivate void
verGridDown
(int px, int py) ver Grid Downprivate void
verGridUp
(int px, int py) verGridUp
-
Field Details
-
dirty
private boolean dirtydirty -
board
board -
id
private int idid -
t
Tr tt -
colourIndex
private final int colourIndexgrid colourIndex will always be 1- See Also:
-
dots
int[][] dotsdots todo check clash with dot array
-
-
Constructor Details
-
Grid
-
-
Method Details
-
getID
-
setDirty
-
getDirty
-
isSelected
public boolean isSelected()Description copied from interface:Colour
is selected??- Specified by:
isSelected
in interfaceColour
- Returns:
- selected
-
clearSelected
public void clearSelected()Description copied from interface:Colour
clear selected- Specified by:
clearSelected
in interfaceColour
-
setSelected
public void setSelected()Description copied from interface:Colour
set selected- Specified by:
setSelected
in interfaceColour
-
flipSelected
public boolean flipSelected()Description copied from interface:Colour
flip selected- Specified by:
flipSelected
in interfaceColour
- Returns:
- final value
-
draw
-
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
- -
-
setGrid
Add a grid to the dots
Add a grid to the dots but only where the dot is clear
Let the drawing be loaded after the grids
Need four loops to run from middle to edge
First lay down the middle
go one more negative than positive
Leave the centre blank
- Parameters:
dots
- -t
- -
-
verGridUp
private void verGridUp(int px, int py) verGridUp- Parameters:
px
- -py
- -
-
verGridDown
private void verGridDown(int px, int py) ver Grid Down- Parameters:
px
- -py
- -
-
horGridLeft
private void horGridLeft(int px, int py) hor Grid Left- Parameters:
px
- -py
- -
-
horGridRight
private void horGridRight(int px, int py) hor Grid Right- Parameters:
px
- -py
- -
-
toString
-