|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.layer.vpf.LayerGraphicWarehouseSupport
public abstract class LayerGraphicWarehouseSupport
Implement a graphic factory that builds OMGraphics.
OMGraphic
Field Summary | |
---|---|
protected static float |
antarcticaThreshold
HACK around antarctica display problem. |
protected OMGraphicList |
areaSubList
|
protected DrawingAttributes |
drawingAttributes
|
protected OMGraphicList |
edgeSubList
|
protected OMGraphicList |
graphics
hang on to the graphics that we build |
static java.util.logging.Logger |
logger
|
protected OMGraphicList |
pointSubList
|
protected OMGraphicList |
textSubList
|
Constructor Summary | |
---|---|
LayerGraphicWarehouseSupport()
Construct an object, initializes graphiclist |
Method Summary | |
---|---|
protected void |
addArea(OMGraphic area)
|
protected void |
addEdge(OMGraphic edge)
|
protected void |
addPoint(OMGraphic point)
|
protected void |
addText(OMGraphic text)
|
boolean |
checkLibraryForUsage(java.lang.String libName)
Utility method to check if the specified library name has been set by the configuration as one to use. |
void |
clear()
Clears the contained list of graphics. |
static OMPoly |
createAreaOMPoly(java.util.List<CoordFloatString> ipts,
int totalSize,
LatLonPoint ll1,
LatLonPoint ll2,
double dpplat,
double dpplon,
boolean doAntarcticaWorkaround)
create a filled polygon |
static OMPoly |
createEdgeOMPoly(CoordFloatString coords,
LatLonPoint ll1,
LatLonPoint ll2,
double dpplat,
double dpplon)
Create an OMPoly corresponding to a VPF edge feature |
static OMPoint |
createOMPoint(double latitude,
double longitude)
Create an OMPoint object corresponding to a VPF node feature |
static OMText |
createOMText(java.lang.String text,
double latitude,
double longitude)
Create an OMText object corresponding to a VPF text feature |
protected static int |
doThinning(java.util.List<java.lang.Object> ipts)
do fan compression of raw edge points |
boolean |
drawAreaFeatures()
Return true if we may draw some area features. |
boolean |
drawCPointFeatures()
Return true if we may draw some connected point features. |
boolean |
drawEdgeFeatures()
Return true if we may draw some edge features. |
boolean |
drawEPointFeatures()
Return true if we may draw some entity point features. |
boolean |
drawTextFeatures()
Return true if we may draw some text features. |
DrawingAttributes |
getDrawingAttributes()
Get the DrawingAttributes used for the coverage type. |
static double |
getFanEpsilon()
Get fan compression epsilon. |
java.lang.String |
getFeatureString()
|
OMGraphicList |
getGraphics()
Get the current graphics list. |
protected OMGraphicList |
getGraphics(OMGraphicList addToList)
Add the area, edge, text and point sublists to the provided list. |
java.awt.Component |
getGUI(LibrarySelectionTable lst)
Return the GUI for certain warehouse attributes. |
java.util.Properties |
getProperties(java.util.Properties props)
set drawing attribute properties |
java.util.List<java.lang.String> |
getUseLibraries()
Get the VPF library names to use. |
protected void |
initDrawingAttributes()
Called from super class constructor. |
static boolean |
isDoThinning()
Are we thinning?. |
void |
resetForCAT()
Lets the warehouse know that a different CoverageAttributeTable will be using it. |
void |
setAreaFeatures(boolean newvalue)
set if we draw area features |
void |
setCPointFeatures(boolean newvalue)
set if we draw connected point features |
static void |
setDoThinning(boolean value)
Set doThinning. |
void |
setDrawingAttributes(DrawingAttributes da)
Set the drawing attributes for the coverage type. |
void |
setEdgeFeatures(boolean newvalue)
set if we draw edge features |
void |
setEPointFeatures(boolean newvalue)
set if we draw entity point features |
static void |
setFanEpsilon(double value)
Set fan compression epsilon. |
void |
setFeatures(java.lang.String features)
Sets the features (lines, areas, text, points) that get displayed |
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
set drawing attribute properties |
void |
setTextFeatures(boolean newvalue)
set if we draw text features |
void |
setUseLibraries(java.util.List<java.lang.String> lib)
Set the VPF library names to use. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.bbn.openmap.layer.vpf.VPFGraphicWarehouse |
---|
createArea, createEdge, createNode, createText |
Methods inherited from interface com.bbn.openmap.layer.vpf.VPFWarehouse |
---|
getFeatures |
Field Detail |
---|
public static java.util.logging.Logger logger
protected DrawingAttributes drawingAttributes
protected static final transient float antarcticaThreshold
protected OMGraphicList graphics
protected OMGraphicList areaSubList
protected OMGraphicList edgeSubList
protected OMGraphicList textSubList
protected OMGraphicList pointSubList
Constructor Detail |
---|
public LayerGraphicWarehouseSupport()
Method Detail |
---|
protected void initDrawingAttributes()
public OMGraphicList getGraphics()
protected OMGraphicList getGraphics(OMGraphicList addToList)
public DrawingAttributes getDrawingAttributes()
public void setDrawingAttributes(DrawingAttributes da)
public void resetForCAT()
resetForCAT
in interface VPFWarehouse
public void setUseLibraries(java.util.List<java.lang.String> lib)
setUseLibraries
in interface VPFWarehouse
public java.util.List<java.lang.String> getUseLibraries()
getUseLibraries
in interface VPFWarehouse
public boolean checkLibraryForUsage(java.lang.String libName)
checkLibraryForUsage
in interface VPFWarehouse
libName
- the library name to test
public java.awt.Component getGUI(LibrarySelectionTable lst)
getGUI
in interface VPFWarehouse
lst
- LibrarySelectionTable to use to get information about the data,
if needed. Not needed here.public void clear()
protected void addArea(OMGraphic area)
protected void addEdge(OMGraphic edge)
protected void addText(OMGraphic text)
protected void addPoint(OMGraphic point)
public void setEdgeFeatures(boolean newvalue)
newvalue
- true
for drawing, false otherwisepublic boolean drawEdgeFeatures()
drawEdgeFeatures
in interface VPFWarehouse
public void setTextFeatures(boolean newvalue)
newvalue
- true
for drawing, false otherwisepublic boolean drawTextFeatures()
drawTextFeatures
in interface VPFWarehouse
public void setAreaFeatures(boolean newvalue)
newvalue
- true
for drawing, false otherwisepublic boolean drawAreaFeatures()
drawAreaFeatures
in interface VPFWarehouse
public void setEPointFeatures(boolean newvalue)
newvalue
- true
for drawing, false otherwisepublic boolean drawEPointFeatures()
drawEPointFeatures
in interface VPFWarehouse
public void setCPointFeatures(boolean newvalue)
newvalue
- true
for drawing, false otherwisepublic boolean drawCPointFeatures()
drawCPointFeatures
in interface VPFWarehouse
public void setFeatures(java.lang.String features)
features
- a whitespace-separated list of features to displaypublic java.lang.String getFeatureString()
public void setProperties(java.lang.String prefix, java.util.Properties props)
prefix
- the prefix for our propertiesprops
- the Properties object we use to look up valuespublic java.util.Properties getProperties(java.util.Properties props)
props
- the Properties object.public static OMPoly createAreaOMPoly(java.util.List<CoordFloatString> ipts, int totalSize, LatLonPoint ll1, LatLonPoint ll2, double dpplat, double dpplon, boolean doAntarcticaWorkaround)
ipts
- a list of CoordFloatString objectstotalSize
- the total number of pointsdpplat
- threshold for latitude thinning (passed to warehouse)dpplon
- threshold for longitude thinngin (passed to warehouse)ll1
- upperleft of selection region (passed to warehouse)ll2
- lowerright of selection region (passed to warehouse)doAntarcticaWorkaround
- hack for funny DCW antarctica data (passed
to warehouse)public static OMPoly createEdgeOMPoly(CoordFloatString coords, LatLonPoint ll1, LatLonPoint ll2, double dpplat, double dpplon)
coords
- the coordinates to use for the polyll1
- upper left, used for clippingll2
- lower right, used for clippingdpplat
- used for latitude thinningdpplon
- used for longitude thinningpublic static void setDoThinning(boolean value)
value
- booleanpublic static boolean isDoThinning()
public static void setFanEpsilon(double value)
value
- doublepublic static double getFanEpsilon()
protected static int doThinning(java.util.List<java.lang.Object> ipts)
public static OMText createOMText(java.lang.String text, double latitude, double longitude)
text
- the textlatitude
- the latitude of where to place the textlongitude
- the longitude of where to place the textpublic static OMPoint createOMPoint(double latitude, double longitude)
latitude
- the latitude of where to place the textlongitude
- the longitude of where to place the text
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |