Package org.meteoinfo.chart.plot
Class MapPlot
- java.lang.Object
-
- org.meteoinfo.chart.plot.Plot
-
- org.meteoinfo.chart.plot.AbstractPlot2D
-
- org.meteoinfo.chart.plot.MapPlot
-
- All Implemented Interfaces:
IWebMapPanel
public class MapPlot extends AbstractPlot2D implements IWebMapPanel
-
-
Field Summary
-
Fields inherited from class org.meteoinfo.chart.plot.AbstractPlot2D
background
-
Fields inherited from class org.meteoinfo.chart.plot.Plot
columnIndex, DEFAULT_BACKGROUND_ALPHA, DEFAULT_BACKGROUND_PAINT, DEFAULT_FOREGROUND_ALPHA, DEFAULT_LEGEND_ITEM_BOX, DEFAULT_LEGEND_ITEM_CIRCLE, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, isSubPlot, MINIMUM_HEIGHT_TO_DRAW, MINIMUM_WIDTH_TO_DRAW, outerPosition, position, rowIndex, symbolAntialias, units
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GraphicaddCircle(float x, float y, float radius, PolygonBreak pgb)Add a circleGraphicaddGrahic(Graphic graphic, ProjectionInfo proj)Add a graphicvoidaddGraphic(Graphic graphic)Add a graphicvoidaddLayer(int idx, MapLayer layer)Add a layervoidaddLayer(MapLayer layer)Add a layervoidaddPoint(double lat, double lon, PointBreak pb)Add point graphicGraphicaddPoint(java.util.List<java.lang.Number> lat, java.util.List<java.lang.Number> lon, PointBreak pb)Add point graphicGraphicaddPolygon(java.util.List<java.lang.Number> lat, java.util.List<java.lang.Number> lon, PolygonBreak pgb)Add polygonGraphicaddPolyline(java.util.List<java.lang.Number> lat, java.util.List<java.lang.Number> lon, PolylineBreak plb)Add polylineGraphicaddPolyline(java.util.List<java.lang.Number> lat, java.util.List<java.lang.Number> lon, PolylineBreak plb, boolean iscurve)Add polylinevoidaddText(ChartText text)Add textExtentgetAutoExtent()Get auto extentjava.awt.ColorgetBackground()Get background colorDatasetgetDataset()Get datasetMapLayergetLayer(int i)Get layer by indexMapLayergetLayer(java.lang.String name)Get layer by nameintgetLayerNum()Get layer numberLayerCollectiongetLayers()Get layersLegendSchemegetLegendScheme()Get legend schemeMapFramegetMapFrame()Get map frameMapViewgetMapView()Get map viewPlotTypegetPlotType()Get plot typejava.awt.geom.Rectangle2DgetPositionArea(java.awt.geom.Rectangle2D area)Get position areaProjectionInfogetProjInfo()Get projection infoMapLayergetSelectedLayer()Get selected layerintgetWebMapZoom()Get web map zoombooleanhasWebMapLayer()Check if has web map layerbooleanisAntialias()Get if is antialiasbooleanisLonLatMap()Is lon/lat map or notvoidloadMIProjectFile(java.lang.String fn)Load MeteoInfo project filevoidloadMIProjectFile(java.lang.String fn, int mfidx)Load MeteoInfo project filevoidreDraw()Re draw functionvoidremoveLastLayer()Remove last added layervoidsetAntialias(boolean value)Set if is antialiasvoidsetAutoExtent()voidsetAxisExtent(Extent extent)Set axis extentvoidsetAxisOn(boolean value)Set all axis visible or notvoidsetBackground(java.awt.Color value)Set background colorvoidsetDataset(Dataset dataset)Set datasetvoidsetLonLatExtent(Extent extent)Set longitude/latitude extentvoidsetMapFrame(MapFrame value)Set map framevoidsetMapView(MapView value, boolean isGeoMap)Set map viewvoidsetParent(ChartPanel value)ChartPanel parentvoidsetSelectedLayer(MapLayer value)Set selected layervoidupdateLegendScheme()-
Methods inherited from class org.meteoinfo.chart.plot.AbstractPlot2D
addLegend, draw, getAspect, getAxis, getDrawExtent, getExtent, getGraphArea, getGridLine, getLeftTitle, getLegend, getLegend, getLegends, getOuterPositionArea, getPlotOrientation, getPositionArea, getRightTitle, getSelectedColor, getTexts, getTightInset, getTightInsetArea, getTitle, getWindArrow, getXAxis, getXAxisLocation, getYAxis, getYAxisLocation, isAutoAspect, isDrawNeatLine, isDrawRightAxis, isDrawTopAxis, isInsideTick, isLogX, isLogY, isXReverse, isYReverse, projToScreen, projXLength, projYLength, removeLegend, removeLegend, screenToProj, setAspect, setAutoAspect, setAxis, setAxisLabelFont, setDrawExtent, setDrawExtent1, setDrawLegend, setDrawNeatLine, setDrawRightAxis, setDrawTopAxis, setExtent, setInsideTick, setLeftTitle, setLeftTitle, setLegend, setLegends, setPlotOrientation, setRightTitle, setRightTitle, setSelectedColor, setTexts, setTitle, setTitle, setWindArrow, setXAxis, setXAxisLocation, setYAxis, setYAxisLocation, updateDrawExtent, zoomToExtentScreen
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class org.meteoinfo.chart.plot.Plot
getGraphArea, getOuterPosition, getOuterPositionArea, getPlotShrink, getPosition, getPositionArea, getPositionAreaZoom, getTightInset, getUnits, isOuterPosActive, isSameShrink, isSymbolAntialias, setGraphArea, setOuterPosActive, setOuterPosition, setOuterPosition, setOuterPosition, setOuterPositionArea, setPlotShrink, setPosition, setPosition, setPosition, setPositionArea, setPositionAreaZoom, setSameShrink, setSymbolAntialias, setTightInset, setUnits, setUnits, updatePosition, updatePosition, updatePositionArea, updatePostionAreaZoom
-
-
-
-
Method Detail
-
setParent
public void setParent(ChartPanel value)
ChartPanel parent- Parameters:
value- ChartPanel
-
getDataset
public Dataset getDataset()
Description copied from class:PlotGet dataset- Specified by:
getDatasetin classPlot- Returns:
- Dataset
-
setDataset
public void setDataset(Dataset dataset)
Description copied from class:PlotSet dataset- Specified by:
setDatasetin classPlot- Parameters:
dataset- Dataset
-
getMapView
public MapView getMapView()
Get map view- Returns:
- Map view
-
setMapView
public void setMapView(MapView value, boolean isGeoMap)
Set map view- Parameters:
value- Map viewisGeoMap- If is geo map
-
getPlotType
public PlotType getPlotType()
Description copied from class:PlotGet plot type- Overrides:
getPlotTypein classAbstractPlot2D- Returns:
- Plot type
-
isAntialias
public boolean isAntialias()
Get if is antialias- Returns:
- Boolean
-
setAntialias
public void setAntialias(boolean value)
Set if is antialias- Parameters:
value- Boolean
-
getBackground
public java.awt.Color getBackground()
Get background color- Overrides:
getBackgroundin classAbstractPlot2D- Returns:
- Background color
-
setBackground
public void setBackground(java.awt.Color value)
Set background color- Overrides:
setBackgroundin classAbstractPlot2D- Parameters:
value- Background color
-
getMapFrame
public MapFrame getMapFrame()
Get map frame- Returns:
- Map frame
-
setMapFrame
public void setMapFrame(MapFrame value)
Set map frame- Parameters:
value- Map frame
-
getProjInfo
public ProjectionInfo getProjInfo()
Get projection info- Returns:
- Projection info
-
isLonLatMap
public boolean isLonLatMap()
Is lon/lat map or not- Returns:
- Boolean
-
getSelectedLayer
public MapLayer getSelectedLayer()
Get selected layer- Returns:
- Selected layer
-
setSelectedLayer
public void setSelectedLayer(MapLayer value)
Set selected layer- Parameters:
value- Selected layer
-
hasWebMapLayer
public boolean hasWebMapLayer()
Check if has web map layer- Returns:
- Boolean
-
getWebMapZoom
public int getWebMapZoom()
Get web map zoom- Specified by:
getWebMapZoomin interfaceIWebMapPanel- Returns:
- Web map zoom
-
reDraw
public void reDraw()
Description copied from interface:IWebMapPanelRe draw function- Specified by:
reDrawin interfaceIWebMapPanel
-
getAutoExtent
public Extent getAutoExtent()
Get auto extent- Returns:
- Auto extent
-
setAutoExtent
public void setAutoExtent()
- Specified by:
setAutoExtentin classAbstractPlot2D
-
updateLegendScheme
public void updateLegendScheme()
- Specified by:
updateLegendSchemein classAbstractPlot2D
-
addGraphic
public void addGraphic(Graphic graphic)
Add a graphic- Parameters:
graphic- The graphic
-
addGrahic
public Graphic addGrahic(Graphic graphic, ProjectionInfo proj)
Add a graphic- Parameters:
graphic- The graphicproj- The graphic projection- Returns:
- Added graphic
-
addLayer
public void addLayer(MapLayer layer)
Add a layer- Parameters:
layer- The layer
-
addLayer
public void addLayer(int idx, MapLayer layer)Add a layer- Parameters:
idx- Indexlayer- Layer
-
removeLastLayer
public void removeLastLayer()
Remove last added layer
-
setAxisOn
public void setAxisOn(boolean value)
Set all axis visible or not- Overrides:
setAxisOnin classAbstractPlot2D- Parameters:
value- Boolean
-
setLonLatExtent
public void setLonLatExtent(Extent extent)
Set longitude/latitude extent- Parameters:
extent- Extent
-
setAxisExtent
public void setAxisExtent(Extent extent)
Set axis extent- Parameters:
extent- Extent
-
addText
public void addText(ChartText text)
Description copied from class:AbstractPlot2DAdd text- Overrides:
addTextin classAbstractPlot2D- Parameters:
text- Chart text
-
addPoint
public void addPoint(double lat, double lon, PointBreak pb)Add point graphic- Parameters:
lat- Latitudelon- Lontitudepb- Point break
-
addPoint
public Graphic addPoint(java.util.List<java.lang.Number> lat, java.util.List<java.lang.Number> lon, PointBreak pb)
Add point graphic- Parameters:
lat- Latitudelon- Lontitudepb- Point break- Returns:
- Graphic
-
addPolyline
public Graphic addPolyline(java.util.List<java.lang.Number> lat, java.util.List<java.lang.Number> lon, PolylineBreak plb)
Add polyline- Parameters:
lat- Latitudelon- Longitudeplb- PolylineBreak- Returns:
- Graphic
-
addPolyline
public Graphic addPolyline(java.util.List<java.lang.Number> lat, java.util.List<java.lang.Number> lon, PolylineBreak plb, boolean iscurve)
Add polyline- Parameters:
lat- Latitudelon- Longitudeplb- PolylineBreakiscurve- Is curve line or not- Returns:
- Graphic
-
addPolygon
public Graphic addPolygon(java.util.List<java.lang.Number> lat, java.util.List<java.lang.Number> lon, PolygonBreak pgb)
Add polygon- Parameters:
lat- Latitudelon- Longitudepgb- PolygonBreak- Returns:
- Graphic
-
addCircle
public Graphic addCircle(float x, float y, float radius, PolygonBreak pgb)
Add a circle- Parameters:
x- Center xy- Center yradius-pgb- PolygonBreak- Returns:
- Graphic
-
getPositionArea
public java.awt.geom.Rectangle2D getPositionArea(java.awt.geom.Rectangle2D area)
Get position area- Overrides:
getPositionAreain classPlot- Parameters:
area- Whole area- Returns:
- Graphic area
-
getLayerNum
public int getLayerNum()
Get layer number- Returns:
- Layer number
-
getLayers
public LayerCollection getLayers()
Get layers- Returns:
- Layers
-
getLayer
public MapLayer getLayer(int i)
Get layer by index- Parameters:
i- The layer index- Returns:
- The layer
-
getLayer
public MapLayer getLayer(java.lang.String name)
Get layer by name- Parameters:
name- The layer name- Returns:
- The layer
-
getLegendScheme
public LegendScheme getLegendScheme()
Get legend scheme- Returns:
- Legend scheme
-
loadMIProjectFile
public void loadMIProjectFile(java.lang.String fn, int mfidx) throws org.xml.sax.SAXException, java.io.IOException, javax.xml.parsers.ParserConfigurationExceptionLoad MeteoInfo project file- Parameters:
fn- MeteoInfo project file namemfidx- Map frame index- Throws:
org.xml.sax.SAXExceptionjava.io.IOExceptionjavax.xml.parsers.ParserConfigurationException
-
loadMIProjectFile
public void loadMIProjectFile(java.lang.String fn) throws org.xml.sax.SAXException, java.io.IOException, javax.xml.parsers.ParserConfigurationExceptionLoad MeteoInfo project file- Parameters:
fn- MeteoInfo project file name- Throws:
org.xml.sax.SAXExceptionjava.io.IOExceptionjavax.xml.parsers.ParserConfigurationException
-
-