de.caff.maze
Class ComputerizedNumericalControlMazePainter

java.lang.Object
  extended by de.caff.maze.ComputerizedNumericalControlMazePainter
All Implemented Interfaces:
MazePainter

public class ComputerizedNumericalControlMazePainter
extends java.lang.Object
implements MazePainter

 

Nested Class Summary
 
Nested classes/interfaces inherited from interface de.caff.maze.MazePainter
MazePainter.PaintObjectType
 
Constructor Summary
ComputerizedNumericalControlMazePainter(double toolBitSize, double minimalAisleSize, double wallSize, boolean withOuterWall)
           
 
Method Summary
 void draw(java.awt.Shape shape)
          Draw a shape with current paint and stroke.
 void drawArc(float x, float y, float w, float h, float start, float extent)
          Draw an open arc with current paint and stroke.
 void drawLine(float startX, float startY, float endX, float endY)
          Draw a line with current paint and stroke..
 void endPainting(MazePainter.PaintObjectType type)
          End painting the given type of paint objects.
 void endPaintingMaze()
          End painting the maze.
 void fill(java.awt.Shape shape)
          Fill a shape with the current paint.
 void setPaint(java.awt.Paint paint)
          Set a paint.
 void setStroke(java.awt.Stroke stroke)
          Set a stroke.
 void startPainting(MazePainter.PaintObjectType type)
          Start painting the given type of paint objects.
 void startPaintingMaze(Maze maze)
          Start painting the maze.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComputerizedNumericalControlMazePainter

public ComputerizedNumericalControlMazePainter(double toolBitSize,
                                               double minimalAisleSize,
                                               double wallSize,
                                               boolean withOuterWall)
Method Detail

startPaintingMaze

public void startPaintingMaze(Maze maze)
Start painting the maze.

Specified by:
startPaintingMaze in interface MazePainter
Parameters:
maze - painted maze

endPaintingMaze

public void endPaintingMaze()
End painting the maze.

Specified by:
endPaintingMaze in interface MazePainter

startPainting

public void startPainting(MazePainter.PaintObjectType type)
Start painting the given type of paint objects.

Specified by:
startPainting in interface MazePainter
Parameters:
type - object type which painting starts

endPainting

public void endPainting(MazePainter.PaintObjectType type)
End painting the given type of paint objects.

Specified by:
endPainting in interface MazePainter
Parameters:
type - object type which painting has ended

setStroke

public void setStroke(java.awt.Stroke stroke)
Set a stroke.

Specified by:
setStroke in interface MazePainter
Parameters:
stroke - new stroke to use in upcoming drawing commands

setPaint

public void setPaint(java.awt.Paint paint)
Set a paint.

Specified by:
setPaint in interface MazePainter
Parameters:
paint - paint to use in upcoming drawing commands.

drawLine

public void drawLine(float startX,
                     float startY,
                     float endX,
                     float endY)
Draw a line with current paint and stroke..

Specified by:
drawLine in interface MazePainter
Parameters:
startX - starting point X coordinate
startY - starting point Y coordinate
endX - ending point X coordinate
endY - ending point Y coordinate

drawArc

public void drawArc(float x,
                    float y,
                    float w,
                    float h,
                    float start,
                    float extent)
Draw an open arc with current paint and stroke.

Specified by:
drawArc in interface MazePainter
Parameters:
x - x of rectangle enclosing ellipse
y - y of rectangle enclosing ellipse
w - width of rectangle enclosing ellipse
h - height of rectangle enclosing ellipse
start - start of angle in degrees, from x axis,
extent - extent of angle in degrees

draw

public void draw(java.awt.Shape shape)
Draw a shape with current paint and stroke.

Specified by:
draw in interface MazePainter
Parameters:
shape - shape to draw

fill

public void fill(java.awt.Shape shape)
Fill a shape with the current paint.

Specified by:
fill in interface MazePainter
Parameters:
shape - shape to fill