|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Object com.supermap.data.Geometry com.supermap.data.GeoCompound
public class GeoCompound
复合几何对象类。
该类继承自 Geometry
类,主要用于 CAD 图层。复合几何对象由多个子对象构成,每一个子对象对应一个 Geometry
类对象。该类提供了添加、移除子对象等管理子对象的功能。
复合几何对象类的对象的结构是一个树状结构,复合几何对象由多个子对象构成,每一个子对象对应一个 Geometry
类对象,因此,复合几何对象的子对象也可以是一个复合几何对象类对象,以此类推,构成了复合几何对象的层层嵌套的树状结构,如下面的示意图,简单地展示了复合几何对象的树状结构。
构造方法摘要 | |
---|---|
GeoCompound()
构造一个新的 GeoCompound 对象。 |
|
GeoCompound(GeoCompound geoCompound)
根据给定的 GeoCompound 对象构造一个与其完全相同的新对象。 |
方法摘要 | |
---|---|
int |
addPart(Geometry geometry)
向复合几何对象中添加一个子对象。 |
void |
adjust(boolean isMinGeometryMovedUp)
调整复合几何对象中子对象的叠置顺序。 |
GeoCompound |
clone()
返回当前 GeoCompound 对象的一个拷贝。 |
void |
dispose()
释放该对象所占用的资源。 |
Geometry[] |
divide(boolean isTopOnly)
分解复合几何对象,复合几何对象的结构类似于树状结构, 如果分解时只分解顶层对象,则返回的几何对象仍然可能存在复合几何对象,否则将不含有复合几何对象。 |
Geometry |
getPart(int index)
返回复合几何对象中的指定序号的子对象。 |
int |
getPartCount()
返回构成复合几何对象的子对象的个数。 |
boolean |
insertPart(int index,
Geometry geometry)
向复合几何对象中的指定序号的位置处插入一个子对象。 |
Geometry |
mirror(Point2D startPoint,
Point2D endPoint)
返回当前复合几何对象关于指定线段对称的几何对象,即获取复合几何对象的镜像。 |
boolean |
removePart(int index)
删除复合几何对象中的指定序号的子对象。 |
boolean |
setPart(int index,
Geometry geometry)
用指定的几何对象替换复合几何对象中指定序号处的子对象。 |
从类 com.supermap.data.Geometry 继承的方法 |
---|
addCustomGeometryCreatedListener, fromXML, getBounds, getID, getInnerPoint, getStyle, getType, getVariantID, hitTest, isEmpty, offset, removeCustomGeometryCreatedListener, resize, rotate, setEmpty, setID, setStyle, toXML |
从类 java.lang.Object 继承的方法 |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
构造方法详细信息 |
---|
public GeoCompound()
public GeoCompound(GeoCompound geoCompound)
geoCompound
- 给定的 GeoCompound 对象。方法详细信息 |
---|
public int getPartCount()
public int addPart(Geometry geometry)
geometry
- 待添加的子对象,该对象是 Geometry
类对象。
public boolean removePart(int index)
index
- 指定的待删除子对象的序号。
public Geometry getPart(int index)
index
- 指定的复合几何对象子对象的序号。
public boolean insertPart(int index, Geometry geometry)
index
- 指定的插入的位置,默认值为1。geometry
- 待插入的子对象。
public boolean setPart(int index, Geometry geometry)
index
- 被替换的子对象的序号,必须大于或者等于0。geometry
- 指定的几何对象。
public void adjust(boolean isMinGeometryMovedUp)
isMinGeometryMovedUp
- 是否将较小的子对象移到上面。public Geometry[] divide(boolean isTopOnly)
复合几何对象类的对象的结构是一个树状结构,复合几何对象由多个子对象构成,每一个子对象对应一个 Geometry
类对象,因此,复合几何对象的子对象也可以是一个复合几何对象类对象,以此类推,构成了复合几何对象的层层嵌套的树状结构,如下面的示意图,简单地展示了复合几何对象的树状结构。
isTopOnly
- 是否只分解顶层对象。该参数为 true 时,表示只分解顶层的对象。
public void dispose()
Geometry
中的 dispose
public GeoCompound clone()
java.lang.Object
中的 clone
public Geometry mirror(Point2D startPoint, Point2D endPoint)
Geometry
中的 mirror
startPoint
- 指定的线段的起点。endPoint
- 指定的线段的终点。
Geometry.offset(double,double)
|
|||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |