Class LinesLayer

java.lang.Object
com.codename1.maps.layers.AbstractLayer
com.codename1.maps.layers.LinesLayer
All Implemented Interfaces:
Layer
Direct Known Subclasses:
ArrowLinesLayer

public class LinesLayer extends AbstractLayer
This is a Lines Layer
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
     

    Fields inherited from class AbstractLayer

    name, projection
    Modifier and Type
    Field
    Description
    protected final String
     
    protected Projection
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor with default projection Mercator.
    Constructor with custom projection and layer name.
    Constructor with default projection Mercator.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds a Line segment to the Layer
    The bounding box of this Layer
    void
    lineColor(int rgb)
    Sets the color of the Lines
    void
    paint(Graphics g, Tile screenTile)
    Paints the Layer on the given Graphics
    protected void
    paintSegment(Graphics g, Coord[] segment, Tile tile)
    Paint a segment.

    Methods inherited from class AbstractLayer

    getName, getProjection
    Modifier and Type
    Method
    Description
    Gets the name of this Layer
    The projection of this Layer

    Methods inherited from class Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    Modifier and Type
    Method
    Description
    protected Object
     
    boolean
    Indicates whether some other object is "equal to" this one.
    final Class
    Returns the runtime class of an object.
    int
    Returns a hash code value for the object.
    final void
    Wakes up a single thread that is waiting on this object's monitor.
    final void
    Wakes up all threads that are waiting on this object's monitor.
    Returns a string representation of the object.
    final void
    Causes current thread to wait until another thread invokes the method or the method for this object.
    final void
    wait(long timeout)
    Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.
    final void
    wait(long timeout, int nanos)
    Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
  • Field Details

    • _lineColor

      protected int _lineColor
  • Constructor Details

    • LinesLayer

      public LinesLayer()
      Constructor with default projection Mercator.
    • LinesLayer

      public LinesLayer(String name)
      Constructor with default projection Mercator.
    • LinesLayer

      public LinesLayer(Projection p, String name)
      Constructor with custom projection and layer name.
  • Method Details

    • paint

      public void paint(Graphics g, Tile screenTile)

      Paints the Layer on the given Graphics

      Parameters
      • g: a Graphics Object to paint on

      • screenTile: the screen tile

    • paintSegment

      protected void paintSegment(Graphics g, Coord[] segment, Tile tile)

      Paint a segment.

      Parameters
      • g: a Graphics Object to paint on

      • segment: array of Coord to draw a Line.

      • tile

    • addLineSegment

      public void addLineSegment(Coord[] coords)

      Adds a Line segment to the Layer

      Parameters
      • coords
    • lineColor

      public void lineColor(int rgb)

      Sets the color of the Lines

      Parameters
      • rgb
    • boundingBox

      public BoundingBox boundingBox()

      The bounding box of this Layer

      Returns

      the Layer bounding box

      Specified by:
      boundingBox in interface Layer
      Specified by:
      boundingBox in class AbstractLayer