Interface PrimitivesDrawer

All Known Subinterfaces:
MapControlDrawer
All Known Implementing Classes:
DefaultPrimitivesDrawer, MapControlDrawer2D

public interface PrimitivesDrawer
Author:
Jorge Piera
  • Method Summary

    Modifier and Type
    Method
    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
    This method sets the Graphics where the Drawer has to draw all the objects.
    void
    This method is used to start a drawing process that needs to be synchronized.
    void
    This method is used to finish a drawing process that needs to be synchronized.
  • Method Details

    • startDrawing

      void startDrawing(Object obj) throws InterruptedException
      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

      void stopDrawing(Object obj)
      This method is used to finish a drawing process that needs to be synchronized.
      Parameters:
      obj - The object that has locked the resource.
    • setGraphics

      void setGraphics(Graphics graphics)
      This method sets the Graphics where the Drawer has to draw all the objects.
      Parameters:
      graphics - The component where the new objects has to be drawn.
    • setColor

      void setColor(Color color)
      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 the setColor(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 the setColor(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)