org.squigle.layers
Class LayerComposite

java.lang.Object
  |
  +--org.squigle.layers.LayerComposite

public class LayerComposite
extends java.lang.Object

LayerComposite represents a stack of layers for a set geographic bounds. It unifies the paint functionality for the child layers, provides an import from maptree function (useful for the map client), and export functionality (useful for the map compiler)


Field Summary
 int height
           
 java.lang.String id
           
 float screenDiag
           
 double vp_lat_1
           
 double vp_lat_2
           
 double vp_lon_1
           
 double vp_lon_2
           
 int width
           
 
Constructor Summary
LayerComposite(java.awt.Component c, java.lang.String id)
          LayerComposite constructor
 
Method Summary
 void addLayer(org.squigle.layers.Layer l)
          adds a layer into the layer composite
 void export(java.lang.String filename)
          exports a writable LayerComposite out into a maptree (a .gro and .meta file)
 void handlers(java.awt.Graphics g)
          loops through the layers assciated with the composite, calling the layer's metaData handler processor.
 void load(java.lang.String filename)
          loads a maptree into the LayerComposite from a file.
 void paint(java.awt.Graphics g)
          the loops through all layers associated with this composite, passing the current viewport dimensions, and calling their paint function
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

width

public int width

height

public int height

vp_lon_1

public double vp_lon_1

vp_lat_1

public double vp_lat_1

vp_lon_2

public double vp_lon_2

vp_lat_2

public double vp_lat_2

screenDiag

public float screenDiag

id

public java.lang.String id
Constructor Detail

LayerComposite

public LayerComposite(java.awt.Component c,
                      java.lang.String id)
LayerComposite constructor

Method Detail

paint

public void paint(java.awt.Graphics g)
the loops through all layers associated with this composite, passing the current viewport dimensions, and calling their paint function


handlers

public void handlers(java.awt.Graphics g)
loops through the layers assciated with the composite, calling the layer's metaData handler processor.


addLayer

public void addLayer(org.squigle.layers.Layer l)
adds a layer into the layer composite


load

public void load(java.lang.String filename)
          throws java.io.IOException
loads a maptree into the LayerComposite from a file. loading = memory mapping the .geo and .meta files that correspond to the filename passed, decoding each layer in the file and construction and adding those layers to the LayerComposite

java.io.IOException

export

public void export(java.lang.String filename)
exports a writable LayerComposite out into a maptree (a .gro and .meta file)