com.supermap.data
类 GeoGraphicCompound
- java.lang.Object
-
- com.supermap.data.InternalHandle
-
- com.supermap.data.InternalHandleDisposable
-
- com.supermap.data.Geometry
-
- com.supermap.data.GeoGraphicCompound
-
- 所有已实现的接口:
- IDisposable
public class GeoGraphicCompound extends Geometry
标绘组合类。该类很好的支持创建标号的组合对象,及支持创建多旗对象。
-
-
构造器概要
构造器 构造器和说明 GeoGraphicCompound()
构造一个新的GeoGraphicCompound对象GeoGraphicCompound(GeoGraphicCompound geoGraphicCompound)
构造一个新的GeoGraphicCompound对象GeoGraphicCompound(GraphicCompoundType type)
构造一个新的GeoGraphicCompound对象
-
方法概要
所有方法 实例方法 具体方法 限定符和类型 方法和说明 int
addPart(Geometry geometry)
向标绘组合对象中添加一个子对象。void
adjust(boolean isMinGeometryMovedUp)
调整标绘组合对象中子对象的叠置顺序。GeoGraphicCompound
clone()
克隆一个Geometry对象。void
dispose()
释放该对象所占用的资源。Geometry[]
divide(boolean isTopOnly)
分解标绘组合对象,标绘组合对象的结构类似于树状结构, 如果分解时只分解顶层对象,则返回的几何对象仍然可能存在复合几何对象,否则将不含有标绘组合对象。void
generateUuid()
重新生成标绘组合对象的惟一标识,一般用于拷贝之后使用。GraphicCompoundType
getCompoundType()
获取标绘组合对象类型Geometry
getPart(int index)
返回复合几何对象中的指定序号的子对象。int
getPartCount()
返回标绘组合对象的子对象的个数。String
getUuID()
获取标绘组合对象的惟一标识。boolean
insertPart(int index, Geometry geometry)
向标绘组合对象中的指定序号的位置处插入一个子对象。boolean
isEmpty()
返回是否为空boolean
removePart(int index)
删除标绘组合对象中的指定序号的子对象。void
setEmpty()
清空几何对象boolean
setPart(int index, Geometry geometry)
用指定的几何对象替换标绘组合对象中指定序号处的子对象。-
从类继承的方法 com.supermap.data.Geometry
addCustomGeometryCreatedListener, fromXML, getBounds, getID, getInnerPoint, getStyle, getType, getVariantID, hitTest, mirror, offset, removeCustomGeometryCreatedListener, resize, rotate, setBounds, setID, setStyle, toXML
-
-
-
-
构造器详细资料
-
GeoGraphicCompound
public GeoGraphicCompound()
构造一个新的GeoGraphicCompound对象
-
GeoGraphicCompound
public GeoGraphicCompound(GraphicCompoundType type)
构造一个新的GeoGraphicCompound对象- 参数:
type
- 标绘组合对象的类型,即普通组合对象或者多旗对象
-
GeoGraphicCompound
public GeoGraphicCompound(GeoGraphicCompound geoGraphicCompound)
构造一个新的GeoGraphicCompound对象- 参数:
geoGraphicCompound
- 标绘组合对象
-
-
方法详细资料
-
getCompoundType
public GraphicCompoundType getCompoundType()
获取标绘组合对象类型- 返回:
- 标绘组合对象类型,即普通组合对象或者多旗对象
-
addPart
public int addPart(Geometry geometry)
向标绘组合对象中添加一个子对象。- 参数:
geometry
- 待添加的子对象,该对象是GeoGraphicObject
或GeoGraphicCompound
类对象。- 返回:
- 成功添加的子对象的序号。
-
getPartCount
public int getPartCount()
返回标绘组合对象的子对象的个数。- 返回:
- 构成标绘组合对象的子对象的个数。
- 默认值:
- 默认值为 0。
-
removePart
public boolean removePart(int index)
删除标绘组合对象中的指定序号的子对象。- 参数:
index
- 指定的待删除子对象的序号。- 返回:
- 删除成功返回 true; 否则返回 false。
-
getPart
public Geometry getPart(int index)
返回复合几何对象中的指定序号的子对象。- 参数:
index
- 指定的复合几何对象子对象的序号。- 返回:
- 成功返回指定序号的子对象,失败返回空值。
-
insertPart
public boolean insertPart(int index, Geometry geometry)
向标绘组合对象中的指定序号的位置处插入一个子对象。- 参数:
index
- 指定的插入的位置,默认值为1。geometry
- 待插入的子对象。- 返回:
- 插入成功返回 true; 否则返回 false。
-
setPart
public boolean setPart(int index, Geometry geometry)
用指定的几何对象替换标绘组合对象中指定序号处的子对象。- 参数:
index
- 被替换的子对象的序号,必须大于或者等于0。geometry
- 指定的几何对象。- 返回:
- 替换成功返回 true; 否则返回 false。
-
adjust
public void adjust(boolean isMinGeometryMovedUp)
调整标绘组合对象中子对象的叠置顺序。- 参数:
isMinGeometryMovedUp
- 是否将较小的子对象移到上面。
-
divide
public Geometry[] divide(boolean isTopOnly)
分解标绘组合对象,标绘组合对象的结构类似于树状结构, 如果分解时只分解顶层对象,则返回的几何对象仍然可能存在复合几何对象,否则将不含有标绘组合对象。标绘组合对象类的对象的结构是一个树状结构,标绘组合对象由多个子对象构成,每一个子对象对应一个
GeoGraphicObject
或GeoGraphicCompound
类对象,因此,标绘组合对象的子对象也可以是一个标绘组合对象类对象,以此类推,构成了标绘组合对象的层层嵌套的树状结构。- 参数:
isTopOnly
- 是否只分解顶层对象。该参数为 true 时,表示只分解顶层的对象。- 返回:
- 几何对象数组。
-
clone
public GeoGraphicCompound clone()
从类复制的说明:Geometry
克隆一个Geometry对象。
-
dispose
public void dispose()
从类复制的说明:Geometry
释放该对象所占用的资源。当调用该方法之后,此对象不再可用。- 指定者:
dispose
在接口中IDisposable
- 指定者:
dispose
在类中Geometry
-
isEmpty
public boolean isEmpty()
返回是否为空- 覆盖:
isEmpty
在类中Geometry
- 返回:
- boolean
- 另请参阅:
Geometry.offset(double, double)
-
getUuID
public String getUuID()
获取标绘组合对象的惟一标识。- 返回:
- 返回标绘组合对象的惟一标识。
-
generateUuid
public void generateUuid()
重新生成标绘组合对象的惟一标识,一般用于拷贝之后使用。
-
-
Copyright © 2021–2024 SuperMap. All rights reserved.