com.partnersoft.maps.model
Class Legend

java.lang.Object
  extended by com.partnersoft.maps.model.Legend
All Implemented Interfaces:
Coggable

public class Legend
extends java.lang.Object
implements Coggable

A Legend represents one way of viewing a MapSpace. It consists of a set of predefined scales, called "zooms", and color settings.

Copyright 2003-2009 Partner Software, Inc.

Version:
$Id: Legend.java 2114 2009-09-21 20:57:28Z paul $
Author:
Paul Reavis

Field Summary
 java.lang.String name
           
 java.util.List<LegendScaleRegion> scaleRegions
           
 
Constructor Summary
Legend()
           
Legend(Cog state)
           
 
Method Summary
 void addScaleRegion(int lod, double scaleThreshold)
           
 java.lang.String getFullDescription()
           
 double getMinimumScaleForLOD(MapSpaceLegend legend, int LOD)
           
 java.lang.String getName()
           
 int getScaleRegionIndex(double scale)
           
 java.util.List<LegendScaleRegion> getScaleRegions()
           
 java.util.List<java.lang.String> listGraphicTypes()
          Returns a list of all graphic types referenced in this legend.
 void removeGraphicType(java.lang.String graphicType)
           
 LegendScaleRegion scaleRegionFor(double scale)
           
 void setName(java.lang.String name)
           
 void setScaleRegions(java.util.List<LegendScaleRegion> scaleRegions)
           
 Cog toCog()
          Returns the complete internal state of this object in the form of a Cog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public java.lang.String name

scaleRegions

public java.util.List<LegendScaleRegion> scaleRegions
Constructor Detail

Legend

public Legend()

Legend

public Legend(Cog state)
Method Detail

addScaleRegion

public void addScaleRegion(int lod,
                           double scaleThreshold)

removeGraphicType

public void removeGraphicType(java.lang.String graphicType)

toCog

public Cog toCog()
Description copied from interface: Coggable
Returns the complete internal state of this object in the form of a Cog.

Specified by:
toCog in interface Coggable
Returns:
Cog representing the internal state of this object

scaleRegionFor

public LegendScaleRegion scaleRegionFor(double scale)

getFullDescription

public java.lang.String getFullDescription()

getScaleRegionIndex

public int getScaleRegionIndex(double scale)

getMinimumScaleForLOD

public double getMinimumScaleForLOD(MapSpaceLegend legend,
                                    int LOD)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getScaleRegions

public java.util.List<LegendScaleRegion> getScaleRegions()

setScaleRegions

public void setScaleRegions(java.util.List<LegendScaleRegion> scaleRegions)

listGraphicTypes

public java.util.List<java.lang.String> listGraphicTypes()
Returns a list of all graphic types referenced in this legend.

Returns: