com.supermap.data
类 GeoText
- java.lang.Object
-
- com.supermap.data.Geometry
-
- com.supermap.data.GeoText
-
public class GeoText extends Geometry
-
-
构造器概要
构造器 构造器和说明 GeoText()构造一个新的 GeoText 对象。GeoText(GeoText geoText)根据给定的 GeoText 对象来构造一个与其完全相同的新对象。GeoText(TextPart part)根据指定的参数来构造一个 GeoText 的新对象。GeoText(TextPart part, TextStyle textStyle)根据指定的参数来构造一个 GeoText 的新对象。
-
方法概要
所有方法 实例方法 具体方法 限定符和类型 方法和说明 intaddPart(TextPart part)在文本对象中添加文本子对象。GeoTextclone()返回当前 GeoText 对象的一个拷贝。voiddispose()释放对象所占用的资源。TextPartgetPart(int index)返回此文本对象的指定序号的子对象。intgetPartCount()返回文本对象的子对象个数。java.lang.StringgetText()返回文本对象的内容。TextStylegetTextStyle()返回文本对象的文本风格。booleaninsertPart(int index, TextPart part)在此文本对象的指定位置插入一个文本子对象。booleanisEmpty()判定该文本对象是否为空,即其子对象的个数是否为0。booleanremovePart(int index)删除此文本对象的指定序号的文本子对象。booleansetPart(int index, TextPart part)修改此文本对象的指定序号的子对象,即用新的文本子对象来替换原来的文本子对象。voidsetTextStyle(TextStyle textStyle)设置文本对象的文本风格。
-
-
-
构造器详细资料
-
GeoText
public GeoText()
构造一个新的 GeoText 对象。
-
GeoText
public GeoText(GeoText geoText)
根据给定的 GeoText 对象来构造一个与其完全相同的新对象。- 参数:
geoText- 指定的 GeoText 对象。
-
GeoText
public GeoText(TextPart part)
根据指定的参数来构造一个 GeoText 的新对象。- 参数:
part- TextPart子对象。- 另请参阅:
TextPart
-
-
方法详细资料
-
getText
public java.lang.String getText()
返回文本对象的内容。 如果该对象有多个子对象时,其值为子对象字符串之和。- 返回:
- 文本对象的内容。
- Default:
- 默认值为一个空字符串。
-
getPartCount
public int getPartCount()
返回文本对象的子对象个数。当文本对象清空后,其子对象的个数为0。- 返回:
- 文本对象的子对象个数。
- Default:
- 默认值为 0。
-
getTextStyle
public TextStyle getTextStyle()
返回文本对象的文本风格。文本风格用于指定文本对象显示时的字体、宽度、高度和颜色等。注意:GeoText.getTextStyle().setRotation() 对文本子对象
TextPart无效,TextPart的旋转角度由其自身getRotation()和setRotation()方法来控制。
-
setTextStyle
public void setTextStyle(TextStyle textStyle)
设置文本对象的文本风格。文本风格用于指定文本对象显示时的字体、宽度、高度和颜色等。注意:GeoText.getTextStyle().setRotation() 对文本子对象
TextPart无效,TextPart的旋转角度由其自身getRotation()和setRotation()方法来控制。- 参数:
textStyle- 文本对象的文本风格。- 另请参阅:
TextStyle
-
isEmpty
public boolean isEmpty()
判定该文本对象是否为空,即其子对象的个数是否为0。判断精度为零值判断精度。关于零值判断精度的详细信息请参见Environment类。
-
addPart
public int addPart(TextPart part)
在文本对象中添加文本子对象。
-
getPart
public TextPart getPart(int index)
返回此文本对象的指定序号的子对象。- 参数:
index- 子对象序号。- 返回:
- 指定序号的子对象。
- 抛出:
java.lang.IndexOutOfBoundsException- 如果 index 小于零或 index 大于等于该文本对象的子对象个数。
-
insertPart
public boolean insertPart(int index, TextPart part)在此文本对象的指定位置插入一个文本子对象。- 参数:
index- 插入子对象的位置,即子对象的序号值。其中序号值大于0且小于子对象的总数。part- 要插入的文本子对象。- 返回:
- 如果插入成功返回 true,否则返回 false。
- 抛出:
java.lang.IndexOutOfBoundsException- 如果 index 小于零或 index 大于该文本对象的子对象个数。- 另请参阅:
addPart(TextPart),removePart(int)
-
removePart
public boolean removePart(int index)
删除此文本对象的指定序号的文本子对象。- 参数:
index- 文本子对象序号。- 返回:
- 如果删除成功返回 true,否则返回 false。
- 抛出:
java.lang.IndexOutOfBoundsException- 如果 index 小于零或 index 大于等于该文本对象的子对象个数。
-
setPart
public boolean setPart(int index, TextPart part)修改此文本对象的指定序号的子对象,即用新的文本子对象来替换原来的文本子对象。- 参数:
index- 文本子对象序号。part- 文本子对象。- 返回:
- 如果设置成功返回 true,否则返回 false。
- 抛出:
java.lang.IndexOutOfBoundsException- 如果 index 小于零或 index 大于等于该文本对象的子对象个数。
-
clone
public GeoText clone()
返回当前 GeoText 对象的一个拷贝。
-
-