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(java.awt.Color color)
Sets the color that is used to draw the objects that don't
have a symbol.
|
void |
setGraphics(java.awt.Graphics graphics)
This method sets the
Graphics where the
Drawer has to draw all the objects. |
void |
startDrawing(java.lang.Object obj)
This method is used to start a drawing process that needs to
be synchronized.
|
void |
stopDrawing(java.lang.Object obj)
This method is used to finish a drawing process that needs to
be synchronized.
|
void startDrawing(java.lang.Object obj) throws java.lang.InterruptedException
obj
- The object that locks the resource.java.lang.InterruptedException
void stopDrawing(java.lang.Object obj)
obj
- The object that has locked the resource.void setGraphics(java.awt.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(java.awt.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)