Package org.gvsig.fmap.mapcontrol.impl
Class DefaultPrimitivesDrawer
java.lang.Object
org.gvsig.fmap.mapcontrol.impl.DefaultPrimitivesDrawer
- All Implemented Interfaces:
PrimitivesDrawer
- Direct Known Subclasses:
MapControlDrawer2D
- Author:
- Jorge Piera
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanCanvas(MapControl mapCtrl) voiddrawLine(int x1, int y1, int x2, int y2) voiddrawOval(int x, int y, int width, int height) voiddrawRect(int x, int y, int width, int height) It draws a rectangle on the map using the color specified using thePrimitivesDrawer.setColor(Color)method.voidfillRect(int x, int y, int width, int height) It fills a rectangle on the map using the color specified using thePrimitivesDrawer.setColor(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.voidsetRenderingHints(RenderingHints hints) voidvoidstartDrawing(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.
-
Field Details
-
graphics
-
color
-
xorColor
-
-
Constructor Details
-
DefaultPrimitivesDrawer
public DefaultPrimitivesDrawer() -
DefaultPrimitivesDrawer
-
-
Method Details
-
drawLine
public void drawLine(int x1, int y1, int x2, int y2) - Specified by:
drawLinein interfacePrimitivesDrawer
-
drawOval
public void drawOval(int x, int y, int width, int height) - Specified by:
drawOvalin interfacePrimitivesDrawer
-
drawRect
public void drawRect(int x, int y, int width, int height) Description copied from interface:PrimitivesDrawerIt draws a rectangle on the map using the color specified using thePrimitivesDrawer.setColor(Color)method.- Specified by:
drawRectin interfacePrimitivesDrawer- Parameters:
x- The minimum X coordinate.y- The minimum Y coordinate.width- The rectangle width.height- The rectangle height.
-
fillRect
public void fillRect(int x, int y, int width, int height) Description copied from interface:PrimitivesDrawerIt fills a rectangle on the map using the color specified using thePrimitivesDrawer.setColor(Color)method.- Specified by:
fillRectin interfacePrimitivesDrawer- Parameters:
x- The minimum X coordinate.y- The minimum Y coordinate.width- The rectangle width.height- The rectangle height.
-
setColor
Description copied from interface:PrimitivesDrawerSets the color that is used to draw the objects that don't have a symbol.- Specified by:
setColorin interfacePrimitivesDrawer- Parameters:
color- The color to use on the drawing operations.
-
setGraphics
Description copied from interface:PrimitivesDrawerThis method sets theGraphicswhere theDrawerhas to draw all the objects.- Specified by:
setGraphicsin interfacePrimitivesDrawer- Parameters:
graphics- The component where the new objects has to be drawn.
-
stopDrawing
Description copied from interface:PrimitivesDrawerThis method is used to finish a drawing process that needs to be synchronized.- Specified by:
stopDrawingin interfacePrimitivesDrawer- Parameters:
obj- The object that has locked the resource.
-
startDrawing
Description copied from interface:PrimitivesDrawerThis method is used to start a drawing process that needs to be synchronized.- Specified by:
startDrawingin interfacePrimitivesDrawer- Parameters:
obj- The object that locks the resource.- Throws:
InterruptedException
-
setRenderingHints
-
setStroke
-
cleanCanvas
-