com.supermap.desktop.core.utilties
类 LayerUtilities
- java.lang.Object
-
- com.supermap.desktop.core.utilties.LayerUtilities
-
public class LayerUtilities extends java.lang.Object
-
-
方法概要
所有方法 静态方法 具体方法 限定符和类型 方法和说明 static java.util.HashMap<java.lang.String,com.supermap.data.FieldInfo>
getFieldNamesAndFieldInfo(com.supermap.desktop.core.beans.ThemeData layer)
传入object为3d图层获取外挂表字段 获取指定图层的字段名以及对应的字段信息 如果没有关联表字段不带表名,如果带有外部关联表的字段带表名static com.supermap.mapping.Layer
getFirstLayerByDatasetType(IFormMap activeForm, com.supermap.data.DatasetType datasetType)
static java.util.List<com.supermap.data.DatasetVector>
getJoinDatasets(com.supermap.data.DatasetVector dataset, com.supermap.data.JoinItems joinItems)
获取指定图层关联的数据集集合 数据集集合含外部连接表对应的数据集static java.util.List<com.supermap.data.DatasetVector>
getJoinDatasets(com.supermap.desktop.core.beans.ThemeData layer)
获取指定图层关联的数据集集合 数据集集合含外部连接表对应的数据集static java.util.List<com.supermap.data.FieldInfo>
getJoinFieldInfos(com.supermap.data.DatasetVector dataset, com.supermap.data.JoinItems joinItems)
获取带指定连接信息的矢量数据集的字段集合static java.util.List<java.lang.String>
getJoinFieldNames(com.supermap.data.DatasetVector dataset, com.supermap.data.JoinItems joinItems)
获取连接字段名static java.util.HashMap<java.lang.String,java.lang.String>
getJoinFieldNamesDic(com.supermap.data.DatasetVector dataset, com.supermap.data.JoinItems joinItems)
static java.util.List<java.lang.String>
getJoinFieldNamesWithoutDatasetName(com.supermap.data.DatasetVector dataset, com.supermap.data.JoinItems joinItems)
获得一个带指定连接信息的矢量数据集的字段名集合,字段名不包含表名static com.supermap.data.JoinItems
getJoinItems(java.lang.Object layer)
获取图层的外界表信息static com.supermap.data.Recordset
getJoinRecordset(com.supermap.data.DatasetVector dataset, boolean onlyFieldInfos, com.supermap.data.JoinItems joinItems, java.util.List<java.lang.String> resultFields)
获得一个矢量数据集带指定连接信息的记录集,同时输出带表名的字段名列表static com.supermap.data.Recordset
getJoinRecordset(com.supermap.desktop.core.beans.ThemeData layer, boolean onlyFieldInfos)
获得一个矢量图层对应数据集的记录集,包含连接信息static com.supermap.data.Rectangle2D
getLayerBounds(com.supermap.mapping.Map map, com.supermap.mapping.Layer layer)
获取指定地图上指定图层的范围static com.supermap.data.Rectangle2D
getLayerBounds(com.supermap.mapping.Map map, com.supermap.mapping.LayerGroup layerGroup)
获取指定地图上指定图层分组的 Boundsstatic java.util.ArrayList<com.supermap.mapping.Layer>
getLayersFromLayerGroup(com.supermap.mapping.LayerGroup layerGroup)
static int
getSelectionSize(com.supermap.mapping.Layer layer)
获取图层的选中对象个数,会递归查找子图层static java.lang.Object
getThemeClone(java.lang.Object currentTheme)
static boolean
isContainLayer(com.supermap.mapping.Layers layers, com.supermap.mapping.Layer layer)
判断当前layers中是否包含指定图层static boolean
isGridOrMosaicLayer(com.supermap.mapping.Layer layer)
static boolean
isMapAllGridOrMosaic(com.supermap.mapping.Map map)
static boolean
layersVisit(com.supermap.mapping.Layers layers, org.jetbrains.userdefine.process.beans.Function<com.supermap.mapping.Layer,java.lang.Boolean> visitor)
对图层树进行深度优先遍历过程的抽象static boolean
resetDataset(com.supermap.mapping.Layer layer, com.supermap.data.Dataset dataset)
重新设置图层的数据集static void
setDefaultSelecetedStyle(com.supermap.mapping.Layer layer)
给图层设置全局设置的默认对像选中风格
-
-
-
方法详细资料
-
getLayerBounds
public static com.supermap.data.Rectangle2D getLayerBounds(com.supermap.mapping.Map map, com.supermap.mapping.Layer layer)
获取指定地图上指定图层的范围- 参数:
map
- 指定的地图,主要用来做动态投影的判断处理layer
- 图层- 返回:
- 范围
-
getLayerBounds
public static com.supermap.data.Rectangle2D getLayerBounds(com.supermap.mapping.Map map, com.supermap.mapping.LayerGroup layerGroup)
获取指定地图上指定图层分组的 Bounds
-
getSelectionSize
public static int getSelectionSize(com.supermap.mapping.Layer layer)
获取图层的选中对象个数,会递归查找子图层- 参数:
layer
- 需要查找的图层- 返回:
- 选中对象个数
-
isContainLayer
public static boolean isContainLayer(com.supermap.mapping.Layers layers, com.supermap.mapping.Layer layer)
判断当前layers中是否包含指定图层- 参数:
layers
- layerslayer
- 图层- 返回:
- 是否包含
-
setDefaultSelecetedStyle
public static void setDefaultSelecetedStyle(com.supermap.mapping.Layer layer)
给图层设置全局设置的默认对像选中风格
-
getJoinDatasets
public static java.util.List<com.supermap.data.DatasetVector> getJoinDatasets(com.supermap.desktop.core.beans.ThemeData layer)
获取指定图层关联的数据集集合 数据集集合含外部连接表对应的数据集
-
getJoinDatasets
public static java.util.List<com.supermap.data.DatasetVector> getJoinDatasets(com.supermap.data.DatasetVector dataset, com.supermap.data.JoinItems joinItems)
获取指定图层关联的数据集集合 数据集集合含外部连接表对应的数据集
-
getJoinRecordset
public static com.supermap.data.Recordset getJoinRecordset(com.supermap.desktop.core.beans.ThemeData layer, boolean onlyFieldInfos)
获得一个矢量图层对应数据集的记录集,包含连接信息
-
getJoinRecordset
public static com.supermap.data.Recordset getJoinRecordset(com.supermap.data.DatasetVector dataset, boolean onlyFieldInfos, com.supermap.data.JoinItems joinItems, java.util.List<java.lang.String> resultFields)
获得一个矢量数据集带指定连接信息的记录集,同时输出带表名的字段名列表
-
getJoinFieldNames
public static java.util.List<java.lang.String> getJoinFieldNames(com.supermap.data.DatasetVector dataset, com.supermap.data.JoinItems joinItems)
获取连接字段名
-
getJoinFieldNamesWithoutDatasetName
public static java.util.List<java.lang.String> getJoinFieldNamesWithoutDatasetName(com.supermap.data.DatasetVector dataset, com.supermap.data.JoinItems joinItems)
获得一个带指定连接信息的矢量数据集的字段名集合,字段名不包含表名
-
getJoinFieldNamesDic
public static java.util.HashMap<java.lang.String,java.lang.String> getJoinFieldNamesDic(com.supermap.data.DatasetVector dataset, com.supermap.data.JoinItems joinItems)
-
getJoinFieldInfos
public static java.util.List<com.supermap.data.FieldInfo> getJoinFieldInfos(com.supermap.data.DatasetVector dataset, com.supermap.data.JoinItems joinItems)
获取带指定连接信息的矢量数据集的字段集合
-
getJoinItems
public static com.supermap.data.JoinItems getJoinItems(java.lang.Object layer)
获取图层的外界表信息- 参数:
layer
- layer或Layer3DDataset对象
-
getFieldNamesAndFieldInfo
public static java.util.HashMap<java.lang.String,com.supermap.data.FieldInfo> getFieldNamesAndFieldInfo(com.supermap.desktop.core.beans.ThemeData layer)
传入object为3d图层获取外挂表字段 获取指定图层的字段名以及对应的字段信息 如果没有关联表字段不带表名,如果带有外部关联表的字段带表名
-
resetDataset
public static boolean resetDataset(com.supermap.mapping.Layer layer, com.supermap.data.Dataset dataset)
重新设置图层的数据集
-
layersVisit
public static boolean layersVisit(com.supermap.mapping.Layers layers, org.jetbrains.userdefine.process.beans.Function<com.supermap.mapping.Layer,java.lang.Boolean> visitor)
对图层树进行深度优先遍历过程的抽象- 参数:
layers
- 图层visitor
- 访问器,接收layer作为参数,返回值为boolean,表示是否继续遍历。true 继续,false 中止。- 返回:
- 是否中止查询
-
getFirstLayerByDatasetType
public static com.supermap.mapping.Layer getFirstLayerByDatasetType(IFormMap activeForm, com.supermap.data.DatasetType datasetType)
-
getLayersFromLayerGroup
public static java.util.ArrayList<com.supermap.mapping.Layer> getLayersFromLayerGroup(com.supermap.mapping.LayerGroup layerGroup)
-
getThemeClone
public static java.lang.Object getThemeClone(java.lang.Object currentTheme)
-
isMapAllGridOrMosaic
public static boolean isMapAllGridOrMosaic(com.supermap.mapping.Map map)
-
isGridOrMosaicLayer
public static boolean isGridOrMosaicLayer(com.supermap.mapping.Layer layer)
-
-