public interface PrimitivesDrawer
Modifier and Type | Method and Description |
---|---|
void |
drawLine(int x1,
int y1,
int x3,
int y12) |
void |
drawOval(int i,
int j,
int sizePixels,
int sizePixels2) |
void |
drawRect(int x,
int y,
int width,
int height)
It draws a rectangle on the map using the color
specified using the
setColor(Color) method. |
void |
fillRect(int x,
int y,
int width,
int height)
It fills a rectangle on the map using the color
specified using the
setColor(Color) method. |
void |
setColor(Color color)
Sets the color that is used to draw the objects that don't
have a symbol.
|
void |
setGraphics(Graphics graphics)
This method sets the
Graphics where the
Drawer has to draw all the objects. |
void |
startDrawing(Object obj)
This method is used to start a drawing process that needs to
be synchronized.
|
void |
stopDrawing(Object obj)
This method is used to finish a drawing process that needs to
be synchronized.
|
void startDrawing(Object obj) throws InterruptedException
obj
- The object that locks the resource.InterruptedException
void stopDrawing(Object obj)
obj
- The object that has locked the resource.void setGraphics(Graphics graphics)
Graphics
where the
Drawer
has to draw all the objects.graphics
- The component where the new objects has to be drawn.void setColor(Color color)
color
- The color to use on the drawing operations.void drawRect(int x, int y, int width, int height)
setColor(Color)
method.x
- The minimum X coordinate.y
- The minimum Y coordinate.width
- The rectangle width.height
- The rectangle height.void fillRect(int x, int y, int width, int height)
setColor(Color)
method.x
- The minimum X coordinate.y
- The minimum Y coordinate.width
- The rectangle width.height
- The rectangle height.void drawOval(int i, int j, int sizePixels, int sizePixels2)
void drawLine(int x1, int y1, int x3, int y12)