com.supermap.data
类 GeoLegend
- java.lang.Object
-
- com.supermap.data.InternalHandle
-
- com.supermap.data.InternalHandleDisposable
-
- com.supermap.data.Geometry
-
- com.supermap.data.GeoLegend
-
- 所有已实现的接口:
- IDisposable
public class GeoLegend extends Geometry
该类继承自Geometry抽象类。需要关联地图名和工作空间进行使用,当设置标题,图例项是否可见等内容时,需要调用load()方法,设置才起作用。 可以使用getInnerGeometry()方法来控制图例项的显示内容和位置。
-
-
构造器概要
构造器 构造器和说明 GeoLegend(GeoLegend geoLegend)根据给定的 GeoLegend 对象构造一个与其完全相同的新对象。GeoLegend(String mapName, Workspace workspace)根据指定的参数来构造一个 GeoLegend 的新对象。GeoLegend(String mapName, Workspace workspace, String title)根据指定的参数来构造一个 GeoLegend 的新对象。
-
方法概要
所有方法 实例方法 具体方法 已过时的方法 限定符和类型 方法和说明 GeoLegendclone()克隆一个Geometry对象。voiddispose()释放该对象所占用的资源。GeoStylegetBackGroundStyle()返回背景的风格。doublegetBottomMargin()返回边框向下扩充的距离。Point2DgetCenter()返回二维矩形几何对象的中心点。intgetColumnCount()返回图例项的列数。String[]getCurrentMakeItemNames()doublegetHeight()返回地图图例对象的高度。GeoCompoundgetInnerGeometry()返回图例包含的复合几何对象(GeoCompound)。String[]getItemNames()返回图例项的名称的数组。String[]getItems()已过时。TextStylegetItemTextStyle()返回图例项说明的文本风格。doublegetLeftMargin()返回边框向左扩充的距离。GeoLegendLineTypegetLineStyle()返回图例线子项风格StringgetMapName()返回地图几何对象所关联的地图名称,此对象所属的工作空间中须含有此地图名称,否则地图无法正常显示。GeoLegendRegionTypegetRegionStyle()返回图例面线子项风格doublegetRightMargin()返回边框向右扩充的距离。intgetSubItemStyle()返回图例子项风格。TextStylegetSubItemTextStyle()返回图例子项(如专题图)说明的文本风格。StringgetTitle()返回图例标题。TextStylegetTitleStyle()返回图例标题风格。doublegetTopMargin()返回边框向上扩充的距离。doublegetWidth()返回地图图例对象的宽度。WorkspacegetWorkspace()返回关联的工作空间,默认是返回到该图例对象所属的工作空间对象。booleanisItemVisible(String itemName)返回图例项是否可见。booleanisNoteLeft()voidload(boolean isAddToScreenLayer)加载设置的内容。voidsetBackGroundStyle(GeoStyle geoStyle)设置背景的风格voidsetBottomMargin(double value)设置边框向下扩充的距离。voidsetCenter(Point2D value)设置二维矩形几何对象的中心点。voidsetColumnCount(int count)设置图例项的列数。voidsetCurrentMakeItemNames(String[] layerNames)voidsetHeight(double value)设置地图图例对象的高度。voidsetIsNoteLeft(String itemName, boolean value)voidsetItemTextStyle(TextStyle textStyle)设置图例项说明的文本风格。voidsetItemVisible(String itemName, boolean value)设置图例项是否可见。voidsetLeftMargin(double value)设置边框向左扩充的距离。voidsetLineStyle(GeoLegendLineType nGeoStyle)设置图例线子项风格voidsetMapName(String mapName)设置地图几何对象所关联的地图名称,此对象所属的工作空间中须含有此地图名称,否则地图无法正常显示。voidsetRegionStyle(GeoLegendRegionType nGeoStyle)设置图例面子项风格voidsetRightMargin(double value)设置边框向右扩充的距离。voidsetSubItemStyle(int nGeoStyle)设置图例子项风格。voidsetSubItemTextStyle(TextStyle textStyle)设置图例子项(如专题图)说明的文本风格。voidsetTitle(String title)设置图例标题。voidsetTitleStyle(TextStyle textStyle)设置图例标题风格。voidsetTopMargin(double value)设置边框向上扩充的距离。voidsetWidth(double value)设置地图图例对象的宽度。
-
-
-
构造器详细资料
-
GeoLegend
public GeoLegend(GeoLegend geoLegend)
根据给定的 GeoLegend 对象构造一个与其完全相同的新对象。- 参数:
geoLegend- 给定的 GeoLegend 对象
-
GeoLegend
public GeoLegend(String mapName, Workspace workspace, String title)
根据指定的参数来构造一个 GeoLegend 的新对象。- 参数:
mapName- 关联地图的名称。workspace- 关联的工作空间。title- 图例的标题。
-
-
方法详细资料
-
getMapName
public String getMapName()
返回地图几何对象所关联的地图名称,此对象所属的工作空间中须含有此地图名称,否则地图无法正常显示。- 返回:
- 地图几何对象所关联的地图名称,此对象所属的工作空间中须含有此地图名称,否则地图无法正常显示。
-
setMapName
public void setMapName(String mapName)
设置地图几何对象所关联的地图名称,此对象所属的工作空间中须含有此地图名称,否则地图无法正常显示。- 参数:
string- 地图几何对象所关联的地图名称
-
getTitle
public String getTitle()
返回图例标题。- 返回:
- 图例标题。
-
setTitle
public void setTitle(String title)
设置图例标题。- 参数:
string- 图例标题
-
getBackGroundStyle
public GeoStyle getBackGroundStyle()
返回背景的风格。- 返回:
- 背景的风格。
-
setBackGroundStyle
public void setBackGroundStyle(GeoStyle geoStyle)
设置背景的风格- 参数:
geoStyle- 背景的风格
-
getTitleStyle
public TextStyle getTitleStyle()
返回图例标题风格。- 返回:
- 图例标题风格。
-
setTitleStyle
public void setTitleStyle(TextStyle textStyle)
设置图例标题风格。- 参数:
textStyle- 图例标题风格
-
getItemTextStyle
public TextStyle getItemTextStyle()
返回图例项说明的文本风格。- 返回:
- 图例项说明的文本风格。
-
setItemTextStyle
public void setItemTextStyle(TextStyle textStyle)
设置图例项说明的文本风格。- 参数:
textStyle- 图例项说明的文本风格。
-
getSubItemTextStyle
public TextStyle getSubItemTextStyle()
返回图例子项(如专题图)说明的文本风格。- 返回:
- 图例子项(如专题图)说明的文本风格。
-
setSubItemTextStyle
public void setSubItemTextStyle(TextStyle textStyle)
设置图例子项(如专题图)说明的文本风格。- 参数:
textStyle- 图例子项(如专题图)说明的文本风格。
-
getLeftMargin
public double getLeftMargin()
返回边框向左扩充的距离。- 返回:
- 边框向左扩充的距离。
-
setLeftMargin
public void setLeftMargin(double value)
设置边框向左扩充的距离。- 参数:
value- 边框向左扩充的距离。
-
getRightMargin
public double getRightMargin()
返回边框向右扩充的距离。- 返回:
- 边框向右扩充的距离。
-
setRightMargin
public void setRightMargin(double value)
设置边框向右扩充的距离。- 参数:
value- 边框向右扩充的距离。
-
getTopMargin
public double getTopMargin()
返回边框向上扩充的距离。- 返回:
- 边框向上扩充的距离。
-
setTopMargin
public void setTopMargin(double value)
设置边框向上扩充的距离。- 参数:
value- 边框向上扩充的距离。
-
getBottomMargin
public double getBottomMargin()
返回边框向下扩充的距离。- 返回:
- 边框向下扩充的距离。
-
setBottomMargin
public void setBottomMargin(double value)
设置边框向下扩充的距离。- 参数:
value- 边框向下扩充的距离。
-
getColumnCount
public int getColumnCount()
返回图例项的列数。- 返回:
- 图例项的列数。
-
setColumnCount
public void setColumnCount(int count)
设置图例项的列数。- 参数:
value- 图例项的列数。
-
getItemNames
public String[] getItemNames()
返回图例项的名称的数组。- 返回:
- 图例项的名称的数组。
-
getItems
@Deprecated public String[] getItems()
已过时。
-
isItemVisible
public boolean isItemVisible(String itemName)
返回图例项是否可见。- 参数:
itemName- 指定的图例项名称。- 返回:
- true表示图例项可见,否则不可见。
-
setItemVisible
public void setItemVisible(String itemName, boolean value)
设置图例项是否可见。- 参数:
itemName- 指定的图例项名称。value- 图例项是否可见。
-
getWorkspace
public Workspace getWorkspace()
返回关联的工作空间,默认是返回到该图例对象所属的工作空间对象。- 返回:
- 返回关联的工作空间。
- 默认值:
- 默认是返回到该图例对象所属的工作空间对象。
-
getCenter
public Point2D getCenter()
返回二维矩形几何对象的中心点。- 返回:
- 二维矩形几何对象的中心点。
-
setCenter
public void setCenter(Point2D value)
设置二维矩形几何对象的中心点。- 参数:
point2D- 二维矩形几何对象的中心点。
-
getWidth
public double getWidth()
返回地图图例对象的宽度。- 返回:
- 地图图例对象的宽度。
-
setWidth
public void setWidth(double value)
设置地图图例对象的宽度。- 参数:
value- 地图图例对象的宽度。
-
getHeight
public double getHeight()
返回地图图例对象的高度。- 返回:
- 地图图例对象的高度。
-
setHeight
public void setHeight(double value)
设置地图图例对象的高度。- 参数:
value- 地图图例对象的高度。
-
load
public void load(boolean isAddToScreenLayer)
加载设置的内容。- 参数:
isAddToScreenLayer- 是否添加到屏幕图层。加载到屏幕图层的图例,将不随布局和地图的缩放而变化,这样在进行布局浏览时,可以获得较好的显示效果;但在进行布局打印时,不建议用户将图例加载到屏幕图层,直接加载到布局即可。
-
getInnerGeometry
public GeoCompound getInnerGeometry()
返回图例包含的复合几何对象(GeoCompound)。- 返回:
- 图例包含的复合几何对象(
GeoCompound)。
-
dispose
public void dispose()
释放该对象所占用的资源。当调用该方法之后,此对象不再可用。- 指定者:
dispose在接口中IDisposable- 指定者:
dispose在类中Geometry
-
getSubItemStyle
public int getSubItemStyle()
返回图例子项风格。- 返回:
- 图例子项风格。
-
setSubItemStyle
public void setSubItemStyle(int nGeoStyle)
设置图例子项风格。该方法不支持设置固定文本大小。- 参数:
nGeoStyle- 图例子项风格。
-
getCurrentMakeItemNames
public String[] getCurrentMakeItemNames()
-
setCurrentMakeItemNames
public void setCurrentMakeItemNames(String[] layerNames)
-
isNoteLeft
public boolean isNoteLeft()
-
setIsNoteLeft
public void setIsNoteLeft(String itemName, boolean value)
-
getLineStyle
public GeoLegendLineType getLineStyle()
返回图例线子项风格- 返回:
-
setLineStyle
public void setLineStyle(GeoLegendLineType nGeoStyle)
设置图例线子项风格- 参数:
nGeoStyle- 图例线子项风格
-
getRegionStyle
public GeoLegendRegionType getRegionStyle()
返回图例面线子项风格- 返回:
-
setRegionStyle
public void setRegionStyle(GeoLegendRegionType nGeoStyle)
设置图例面子项风格- 参数:
nGeoStyle- 图例面子项风格
-
-
Copyright © 2021–2024 SuperMap. All rights reserved.