Package org.gvsig.fmap.mapcontrol
Interface PrimitivesDrawer
- All Known Subinterfaces:
MapControlDrawer
- All Known Implementing Classes:
DefaultPrimitivesDrawer,MapControlDrawer2D
public interface PrimitivesDrawer
- Author:
- Jorge Piera
-
Method Summary
Modifier and TypeMethodDescriptionvoiddrawLine(int x1, int y1, int x3, int y12) voiddrawOval(int i, int j, int sizePixels, int sizePixels2) voiddrawRect(int x, int y, int width, int height) It draws a rectangle on the map using the color specified using thesetColor(Color)method.voidfillRect(int x, int y, int width, int height) It fills a rectangle on the map using the color specified using thesetColor(Color)method.voidSets the color that is used to draw the objects that don't have a symbol.voidsetGraphics(Graphics graphics) This method sets theGraphicswhere theDrawerhas to draw all the objects.voidstartDrawing(Object obj) This method is used to start a drawing process that needs to be synchronized.voidstopDrawing(Object obj) This method is used to finish a drawing process that needs to be synchronized.
-
Method Details
-
startDrawing
This method is used to start a drawing process that needs to be synchronized.- Parameters:
obj- The object that locks the resource.- Throws:
InterruptedException
-
stopDrawing
This method is used to finish a drawing process that needs to be synchronized.- Parameters:
obj- The object that has locked the resource.
-
setGraphics
This method sets theGraphicswhere theDrawerhas to draw all the objects.- Parameters:
graphics- The component where the new objects has to be drawn.
-
setColor
Sets the color that is used to draw the objects that don't have a symbol.- Parameters:
color- The color to use on the drawing operations.
-
drawRect
void drawRect(int x, int y, int width, int height) It draws a rectangle on the map using the color specified using thesetColor(Color)method.- Parameters:
x- The minimum X coordinate.y- The minimum Y coordinate.width- The rectangle width.height- The rectangle height.
-
fillRect
void fillRect(int x, int y, int width, int height) It fills a rectangle on the map using the color specified using thesetColor(Color)method.- Parameters:
x- The minimum X coordinate.y- The minimum Y coordinate.width- The rectangle width.height- The rectangle height.
-
drawOval
void drawOval(int i, int j, int sizePixels, int sizePixels2) -
drawLine
void drawLine(int x1, int y1, int x3, int y12)
-