com.supermap.mapping.collector
Class CollectorElement
- java.lang.Object
-
- com.supermap.mapping.collector.CollectorElement
-
- Direct Known Subclasses:
- ElementLine, ElementPoint, ElementPolygon
public abstract class CollectorElement extends java.lang.Objectcollector element class
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classCollectorElement.GPSElementTypecollected object type.static interfaceCollectorElement.OnClickListenerThe listener that collected object click event is triggered when the object is tapped.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description voidaddPoint(Point2D pt)Adds the point.abstract booleanfromGeometry(Geometry geometry)construct collection object by Geometry.Rectangle2DgetBounds()Obtains bounds of collected object.GeometrygetGeometry()Obtains the Geometry of collected object.GeometryTypegetGeometryType()Obtains geometry object type of collected object.Point2DsgetGeoPoints()Obtains the point string of collected object.intgetID()Obtains the ID of collected object.java.lang.StringgetName()Obtains collected object name.java.lang.StringgetNotes()Obtains remarks of collected object.CollectorElement.OnClickListenergetOnClickListenner()Obtains click listener.java.util.ArrayList<java.lang.Integer>getPart()Gets the point string group info (only for dynamic data created by Geomotry).CollectorElement.GPSElementTypegetType()Obtains the type of collected object.java.lang.ObjectgetUserData()Gets the user data.voidsetName(java.lang.String name)Sets collected object name.voidsetNotes(java.lang.String notes)Sets remarks of collected object.voidsetOnClickListenner(CollectorElement.OnClickListener listener)Sets the clicking listener.voidsetUserData(java.lang.Object data)Sets the user data.
-
-
-
Method Detail
-
getOnClickListenner
public CollectorElement.OnClickListener getOnClickListenner()
Obtains click listener.- Returns:
- OnClickListener click listener.
-
setUserData
public void setUserData(java.lang.Object data)
Sets the user data.- Parameters:
data- user data.
-
getUserData
public java.lang.Object getUserData()
Gets the user data.- Returns:
- user data.
-
getGeoPoints
public Point2Ds getGeoPoints()
Obtains the point string of collected object.- Returns:
- the point string of collected object.
-
getPart
public java.util.ArrayList<java.lang.Integer> getPart()
Gets the point string group info (only for dynamic data created by Geomotry).- Returns:
- The point string group info.
-
getID
public int getID()
Obtains the ID of collected object.- Returns:
- ID of collected object.
-
getBounds
public Rectangle2D getBounds()
Obtains bounds of collected object.- Returns:
- bounds of collected object.
-
setOnClickListenner
public void setOnClickListenner(CollectorElement.OnClickListener listener)
Sets the clicking listener.- Parameters:
listener- click listener
-
addPoint
public void addPoint(Point2D pt)
Adds the point.- Parameters:
pt- point to be added.
-
fromGeometry
public abstract boolean fromGeometry(Geometry geometry)
construct collection object by Geometry.- Parameters:
geometry- geographic element.- Returns:
- A boolean. Return true if successful; otherwise, false.
-
getGeometry
public Geometry getGeometry()
Obtains the Geometry of collected object.- Returns:
- Geometry of collected object.
-
getGeometryType
public GeometryType getGeometryType()
Obtains geometry object type of collected object.- Returns:
- geometry object type of collected object.
-
getType
public CollectorElement.GPSElementType getType()
Obtains the type of collected object.- Returns:
- collected object type.
-
setName
public void setName(java.lang.String name)
Sets collected object name.- Parameters:
name- collected object name.
-
getName
public java.lang.String getName()
Obtains collected object name.- Returns:
- the name of collected object.
-
setNotes
public void setNotes(java.lang.String notes)
Sets remarks of collected object.- Parameters:
notes- remarks of collected object.
-
getNotes
public java.lang.String getNotes()
Obtains remarks of collected object.- Returns:
- remarks of collected object.
-
-