Package org.meteoinfo.shape
Class GraphicCollection
- java.lang.Object
-
- org.meteoinfo.shape.Graphic
-
- org.meteoinfo.shape.GraphicCollection
-
- All Implemented Interfaces:
java.util.Iterator
- Direct Known Subclasses:
GraphicCollection3D
public class GraphicCollection extends Graphic implements java.util.Iterator
-
-
Constructor Summary
Constructors Constructor Description GraphicCollection()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, Graphic aGraphic)Inset a graphicbooleanadd(Graphic aGraphic)Add a graphicvoidaddAll(java.util.List<Graphic> gs)Add allvoidaddLabel(Graphic aLP)Add label pointvoidaddLabels()Add labelsvoidaddLabelsContourDynamic(Extent sExtent)Add labels of contour layer dynamiclyvoidclear()Clear graphicsGraphicCollectionclip(java.util.List<PolygonShape> clipPolys)Clipbooleancontains(Graphic g)Contains or notGraphicget(int idx)Get a graphic by indexfloatgetArrowZoom()Get arrow zoomExtentgetExtent()Get extentGraphicgetGraphicN(int idx)Get Graphic by indexjava.util.List<Graphic>getGraphics()Get graphic listjava.util.List<Graphic>getLabelPoints()Get label pointsLabelSetgetLabelSet()Get label setColorBreakgetLegend()Get legendColorBreakgetLegendBreak()Get legend breakLegendSchemegetLegendScheme()Get legend schemeintgetNumGraphics()Get graphics numberjava.util.List<Shape>getShapes()Get shapesShapeTypesgetShapeType()Get shape typebooleanhasNext()intindexOf(Graphic g)Index ofbooleanis3D()Get is 3D or notbooleanisCollection()Get if is GraphicCollectionbooleanisEmpty()Get is empty or notbooleanisSingleLegend()Get is single legend or notvoidjoin(Graphic graphic)Join this graphics with other graphicsjava.lang.Objectnext()Graphicremove(int index)Remove a graphic by indexbooleanremove(Graphic aGraphic)Remove a graphicvoidremoveAll(java.util.List<Graphic> gs)Remove allGraphicCollectionselectGraphics(Extent aExtent)Select graphics by an extentvoidsetExtent(Extent value)Set extentvoidsetGraphics(java.util.List<Graphic> value)Set graphic listvoidsetLabelPoints(java.util.List<Graphic> lps)Set label pointsvoidsetLabelSet(LabelSet ls)Set label setvoidsetLegendBreak(ColorBreak value)Set legend breakvoidsetLegendScheme(LegendScheme value)Set legend schemevoidsetSingleLegend(boolean value)Set is single legend or notintsize()Get graphic list sizevoidupdateExtent()Update extent-
Methods inherited from class org.meteoinfo.shape.Graphic
addLegend, addShape, exportToXML, getResizeAbility, getShape, importFromXML, loadLegend, loadShape, setLegend, setShape, verticeAddUpdate, verticeMoveUpdate, verticeRemoveUpdate
-
-
-
-
Method Detail
-
getGraphics
public java.util.List<Graphic> getGraphics()
Get graphic list- Overrides:
getGraphicsin classGraphic- Returns:
- Graphic list
-
setGraphics
public void setGraphics(java.util.List<Graphic> value)
Set graphic list- Parameters:
value- Graphic list
-
getExtent
public Extent getExtent()
Get extent
-
setExtent
public void setExtent(Extent value)
Set extent
-
isSingleLegend
public boolean isSingleLegend()
Get is single legend or not- Overrides:
isSingleLegendin classGraphic- Returns:
- Boolean
-
setSingleLegend
public void setSingleLegend(boolean value)
Set is single legend or not- Parameters:
value- Boolean
-
getLabelSet
public LabelSet getLabelSet()
Get label set- Returns:
- Label set
-
setLabelSet
public void setLabelSet(LabelSet ls)
Set label set- Parameters:
ls- Label set
-
getLabelPoints
public java.util.List<Graphic> getLabelPoints()
Get label points- Returns:
- The lable points
-
setLabelPoints
public void setLabelPoints(java.util.List<Graphic> lps)
Set label points- Parameters:
lps- The lable points
-
getLegendScheme
public LegendScheme getLegendScheme()
Get legend scheme- Returns:
- Legend scheme
-
setLegendScheme
public void setLegendScheme(LegendScheme value)
Set legend scheme- Parameters:
value- Legend scheme
-
getLegendBreak
public ColorBreak getLegendBreak()
Get legend break- Returns:
- Legend break
-
setLegendBreak
public void setLegendBreak(ColorBreak value)
Set legend break- Parameters:
value- Legend break
-
is3D
public boolean is3D()
Get is 3D or not- Returns:
- Boolean
-
isCollection
public boolean isCollection()
Get if is GraphicCollection- Overrides:
isCollectionin classGraphic- Returns:
- Boolean
-
updateExtent
public void updateExtent()
Update extent
-
add
public boolean add(Graphic aGraphic)
Add a graphic- Parameters:
aGraphic- The graphic- Returns:
- Boolean
-
add
public void add(int index, Graphic aGraphic)Inset a graphic- Parameters:
index- IndexaGraphic- The graphic
-
get
public Graphic get(int idx)
Get a graphic by index- Parameters:
idx- Index- Returns:
- Graphic
-
indexOf
public int indexOf(Graphic g)
Index of- Parameters:
g- Graphic- Returns:
- Index
-
contains
public boolean contains(Graphic g)
Contains or not- Parameters:
g- Graphic- Returns:
- Boolean
-
size
public int size()
Get graphic list size- Returns:
- Gaphic list size
-
isEmpty
public boolean isEmpty()
Get is empty or not- Returns:
- Boolean
-
getNumGraphics
public int getNumGraphics()
Get graphics number- Overrides:
getNumGraphicsin classGraphic- Returns:
- 1
-
getGraphicN
public Graphic getGraphicN(int idx)
Get Graphic by index- Overrides:
getGraphicNin classGraphic- Parameters:
idx- Index- Returns:
- Graphic
-
remove
public boolean remove(Graphic aGraphic)
Remove a graphic- Parameters:
aGraphic- The graphic- Returns:
- Boolean
-
remove
public Graphic remove(int index)
Remove a graphic by index- Parameters:
index- The index- Returns:
- The removed graphic
-
clear
public void clear()
Clear graphics
-
addAll
public void addAll(java.util.List<Graphic> gs)
Add all- Parameters:
gs- Graphic list
-
join
public void join(Graphic graphic)
Join this graphics with other graphics- Parameters:
graphic- Other graphics
-
removeAll
public void removeAll(java.util.List<Graphic> gs)
Remove all- Parameters:
gs- Graphic list
-
getLegend
public ColorBreak getLegend()
Get legend
-
selectGraphics
public GraphicCollection selectGraphics(Extent aExtent)
Select graphics by an extent- Parameters:
aExtent- The extent- Returns:
- Selected graphics
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator
-
next
public java.lang.Object next()
- Specified by:
nextin interfacejava.util.Iterator
-
addLabels
public void addLabels()
Add labels
-
getShapes
public java.util.List<Shape> getShapes()
Get shapes- Returns:
- Shapes
-
getShapeType
public ShapeTypes getShapeType()
Get shape type- Returns:
- Shape type
-
addLabel
public void addLabel(Graphic aLP)
Add label point- Parameters:
aLP- Label point
-
addLabelsContourDynamic
public void addLabelsContourDynamic(Extent sExtent)
Add labels of contour layer dynamicly- Parameters:
sExtent- View extent of MapView
-
getArrowZoom
public float getArrowZoom()
Get arrow zoom- Returns:
- Arrow zoom
-
clip
public GraphicCollection clip(java.util.List<PolygonShape> clipPolys)
Clip- Parameters:
clipPolys- Clipping polygons- Returns:
- Clipped graphics
-
-