active
private Color active
activeLength
protected int activeLength
activeStart
protected int activeStart
border
protected int border
fm
protected FontMetrics fm
gap
private static int gap
green
(package private) static Color green
marginT
protected int marginT
originX
protected int originX
originY
protected int originY
red
(package private) static Color red
roundedValues
private double[] roundedValues
signalRed
(package private) static Color signalRed
values
private double[] values
drawGrid
public void drawGrid(Graphics g,
int x,
int y,
Color fill)
draws a grid at (x,y)
g
- Graphics object for graphical contextx
- upper left x-position of the grid (see originX)y
- upper left y-position of the grid (see originY)fill
- background color of the grid
drawSingleActiveRegion
public void drawSingleActiveRegion(Graphics g,
int x,
int pos,
Color active,
Color valueColor)
draws the active region containing of only one square
g
- Graphics object for graphical contextx
- upper left x-position of the active squareactive
- background color of the squarevalueColor
- color of the value
drawSingleGrid
public void drawSingleGrid(Graphics g,
int x,
int y,
Color fill,
boolean firstSquare)
draws a grid consisting of a single square.
g
- Graphics object for graphical contextx
- upper left x-position of the squarey
- upper left y-position of the squarefill
- background color of the grid
drawValue
public void drawValue(Graphics g,
int pos)
draws a colored single value into a yet painted grid.
g
- Graphics object for the graphics contextpos
- adds values[pos] at position pos in the grid
drawValue(Graphics, int, Color )
drawValue
public void drawValue(Graphics g,
int pos,
Color color)
draws a single value in to a yet painted grid.
g
- Graphics object for the graphics contextpos
- adds values[pos] at position pos in the gridcolor
- of the writing
drawValue
public void drawValue(Graphics g,
int pos,
int x,
int y)
draws a single, white value in to a yet painted grid.
g
- Graphics object for the graphics contextpos
- value values[pos] is paintedx
- X-Position of the value to be paintedy
- Y-Position of the value to be painted
get
public double get(int pos)
getArrowStart
public Point getArrowStart(int pos)
returns the point where to attach the starting point of an
arrow
pos
- position of the grid where to attach the arrow
- starting position of an arrow
getArrowStop
public Point getArrowStop(int pos)
returns the point where to attach the ending point of an
arrow
pos
- position of the grid where to attach the arrow
- ending position of an arrow
getBorder
public int getBorder()
getGap
public static int getGap()
getLength
public int getLength()
getRounded
public double getRounded(int pos)
getRoundedValues
public double[] getRoundedValues()
getValues
public double[] getValues()
getWritingPosition
public int getWritingPosition()
returns the y-WritingPosition of the values
origin
public Point origin()
originY
public int originY()
roundValues
public void roundValues()
set
public void set(int pos,
double x)
setActive
public void setActive(int start,
int length,
Color color)
sets the active region of the grid to the
active-background-color color
start
- starting position of the active regionlength
- length of the active region
setBorder
public void setBorder(int b)
setColors
public static void setColors(Color gridRed,
Color gridGreen,
Color signal)
setGap
public void setGap(int gap)
setOriginX
public void setOriginX(int x)
setValues
public void setValues(double[] values)