org.micropainter.map.layer
Class AbstractMapLayer

java.lang.Object
  extended by org.micropainter.map.layer.AbstractMapLayer
All Implemented Interfaces:
Clearable, Projectable2D
Direct Known Subclasses:
BackgroundLayer, HighwayLayer, LanduseLayer, LeisureLayer, ManMadeLayer, NaturalLayer, RailwayLayer, WaterwayLayer

public abstract class AbstractMapLayer
extends java.lang.Object
implements Projectable2D, Clearable


Nested Class Summary
static class AbstractMapLayer.Antialiasing
           
static class AbstractMapLayer.Fractional
           
static class AbstractMapLayer.Interpolation
           
 
Field Summary
private  AbstractMapLayer.Antialiasing antialiasing
          aliasing
private  AbstractMapLayer.Fractional fractional
          fractional
private  GeoBound geoBound
           
private  AbstractMapLayer.Interpolation interpolation
          interpolation
private  boolean lock
           
private  java.util.List<Primitive> primitives
           
private  Projection2D projection2D
           
 
Constructor Summary
AbstractMapLayer()
           
 
Method Summary
 void clearLayer()
           
 void clearPrimitives()
           
abstract  void doPaintLayer(Map2D map2D)
           
 AbstractMapLayer.Antialiasing getAntialiasing()
          return true if anti alias is required, false otherwise
 AbstractMapLayer.Fractional getFractional()
          return Fractional
 GeoBound getGeoBound()
           
 AbstractMapLayer.Interpolation getInterpolation()
          get the interpolation
 Projection2D getProjection2D()
           
 boolean isLock()
           
 void lock()
           
 void paint()
           
 void project()
           
 void registerPrimitive(Primitive primitive)
           
 void setAntialiasing(AbstractMapLayer.Antialiasing antialiasing)
          set the antialiasing
 void setFractionalMetrics(AbstractMapLayer.Fractional fractional)
          set the fractional
 void setGeoBound(GeoBound geoBound)
          set the GeoBound
 void setInterpolation(AbstractMapLayer.Interpolation interpolation)
          set the interpolation
 void setProjection2D(Projection2D projection)
           
private  void setQuality(java.awt.Graphics2D g2d)
          set the rendering quality for painting this layout
 void unlock()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lock

private boolean lock

projection2D

private Projection2D projection2D

geoBound

private GeoBound geoBound

primitives

private java.util.List<Primitive> primitives

interpolation

private AbstractMapLayer.Interpolation interpolation
interpolation


antialiasing

private AbstractMapLayer.Antialiasing antialiasing
aliasing


fractional

private AbstractMapLayer.Fractional fractional
fractional

Constructor Detail

AbstractMapLayer

public AbstractMapLayer()
Method Detail

registerPrimitive

public void registerPrimitive(Primitive primitive)

getProjection2D

public Projection2D getProjection2D()

setProjection2D

public void setProjection2D(Projection2D projection)

project

public void project()
Specified by:
project in interface Projectable2D

clearLayer

public void clearLayer()
Specified by:
clearLayer in interface Clearable

clearPrimitives

public void clearPrimitives()

lock

public void lock()

unlock

public void unlock()

isLock

public boolean isLock()

getGeoBound

public GeoBound getGeoBound()

setGeoBound

public void setGeoBound(GeoBound geoBound)
set the GeoBound

Parameters:
geoBound -

getInterpolation

public AbstractMapLayer.Interpolation getInterpolation()
get the interpolation

Returns:

setInterpolation

public void setInterpolation(AbstractMapLayer.Interpolation interpolation)
set the interpolation

Parameters:
value -

getAntialiasing

public AbstractMapLayer.Antialiasing getAntialiasing()
return true if anti alias is required, false otherwise

Returns:
antialiasing

setAntialiasing

public void setAntialiasing(AbstractMapLayer.Antialiasing antialiasing)
set the antialiasing

Parameters:
antialias -

setFractionalMetrics

public void setFractionalMetrics(AbstractMapLayer.Fractional fractional)
set the fractional

Parameters:
fractional -

getFractional

public AbstractMapLayer.Fractional getFractional()
return Fractional

Returns:
fractional

setQuality

private void setQuality(java.awt.Graphics2D g2d)
set the rendering quality for painting this layout

Parameters:
g2d -

doPaintLayer

public abstract void doPaintLayer(Map2D map2D)

paint

public void paint()