com.supermap.mobjects.situation

类 PlotLayers

  • java.lang.Object
    • com.supermap.data.InternalHandle
      • com.supermap.data.InternalHandleDisposable
        • com.supermap.mobjects.situation.PlotLayers
  • 所有已实现的接口:
    IDisposable


    public class PlotLayers
    extends com.supermap.data.InternalHandleDisposable
    图元层集合类。该类对一个标绘图对象中的所有图元层进行管理。

    该类中提供了图元层的添加、删除以及移动等的方法。

    • 方法详细资料

      • clear

        public void clear()
        清空此图元层集合。
      • remove

        public void remove(int index)
        移除此图元层集合中指定索引位置的图元层对象。
        参数:
        index - 要移除的图元层的索引位置。
      • add

        public PlotLayer add(String name,
                             boolean bAddtoHead)
        添加一个图元层对象到此图元层集合中。
        参数:
        name - 添加的图元层的名称。
        bAddtoHead - 指定新创建图元层是否放在图元层集合的最上面一层。当设置为 false 时,则将此新创建图元层放在最底层。
        返回:
        新添加的图元层对象。
      • add

        public void add(PlotLayer plotLayer,
                        boolean bAddtoHead)
        添加一个图元层对象到此图元层集合中。
        参数:
        plotLayer - 添加的图元层。
        bAddtoHead - 指定新创建图元层是否放在图元层集合的最上面一层。当设置为 false 时,则将此新创建图元层放在最底层。
      • insert

        public void insert(int index,
                           PlotLayer plotLayer)
        在指定的索引位置添加一个图元层对象到此图元层集合中。
        参数:
        index - 指定要添加图元层对象的索引位置
        plotLayer - 添加的图元层。
      • insert

        public PlotLayer insert(int index,
                                String name)
        在指定的索引位置添加一个图元层对象到此图元层集合中。
        参数:
        index - 指定要添加图元层对象的索引位置
        name - 添加的图元层的名称。
        返回:
        新添加的图元层对象。
      • moveTo

        public boolean moveTo(int srcIndex,
                              int desIndex)
        将此图层集合中指定索引的图层往目标图层集指定位置。
        参数:
        srcIndex - 要移动的图层的索引。
        desIndex - 目标索引。
        返回:
        移动成功返回 true,否则返回 false。
      • moveUp

        public boolean moveUp(int index)
        将此图元层集合中指定索引的图元层往上移动一层。
        参数:
        index - 要移动的子图层的索引。
        返回:
        移动成功返回 true,否则返回 false。
      • moveDown

        public boolean moveDown(int index)
        将此图元层集合中指定索引的图元层往下移动一层。
        参数:
        index - 要移动的图元层的索引。
        返回:
        移动成功返回 true,否则返回 false。
      • moveToBottom

        public boolean moveToBottom(int index)
        将此图元层集合中指定索引的图元层移动到最底层。
        参数:
        index - 要移动到最底层的图元层的索引。
        返回:
        移动成功返回 true,否则返回 false。
      • moveToTop

        public boolean moveToTop(int index)
        将此图元层集合中指定索引的图元层移动到最顶层。
        参数:
        index - 要移动到最顶层的图元层的索引。
        返回:
        移动成功返回 true,否则返回 false。
      • indexOf

        public int indexOf(PlotLayer plotLayer)
        返回图元层对象在此图元层集合中的索引。
        参数:
        plotLayer - 要查找的图元层对象。
        返回:
        找到指定图元层则返回图元层索引,否则返回-1。
      • getCount

        public int getCount()
        返回此图元层集合中图元层对象的总数。
        返回:
        此图元层集合中图元层对象的总数。
        默认值:
        默认值为 0,即图元层集合中没有图元层对象。
      • get

        public PlotLayer get(int index)
        返回此图元层集合中指定索引位置的图元层对象。
        参数:
        index - 要返回的图元层的索引位置。
        返回:
        此图元层集合中指定索引位置的图元层对象。
      • dispose

        public void dispose()
        对象释放。
      • addPlotLayerAddedListener

        public void addPlotLayerAddedListener(PlotLayerAddedListener l)
        添加一个用于接收图元层、子图层或者标号添加结束事件(event)的监听器。
        参数:
        l - 一个用于接收图元层、子图层或者标号添加结束事件的监听器。
      • addPlotLayerRemovingListener

        public void addPlotLayerRemovingListener(PlotLayerRemovingListener l)
        添加一个用于接收图元层、子图层或者标号移除前事件(event)的监听器。
        参数:
        l - 一个用于接收图元层、子图层或者标号移除前事件的监听器。
      • addPlotLayerMovedListener

        public void addPlotLayerMovedListener(PlotLayerMovedListener l)
        添加一个用于接收图元层、子图层或者标号移动结束事件(event)的监听器。
        参数:
        l - 一个用于接收图元层、子图层或者标号移动结束事件的监听器。
      • addPlotLayerClearedListener

        public void addPlotLayerClearedListener(PlotLayerClearedListener l)
        添加一个用于接收图层标号清空事件(event)的监听器。
        参数:
        l - 一个用于接收图层标号清空事件的监听器。
      • addPlotLayerSelectedListener

        public void addPlotLayerSelectedListener(PlotLayerSelectedListener l)
        添加一个用于接收选中标号变化事件(event)的监听器。
        参数:
        l - 一个用于接收选中标号变化事件的监听器。
      • removePlotLayerAddedListener

        public void removePlotLayerAddedListener(PlotLayerAddedListener l)
        移除一个用于接收图元层、子图层或者标号添加结束事件(event)的监听器。
        参数:
        l - 一个用于接收图元层、子图层或者标号添加结束事件的监听器。
      • removePlotLayerRemovingListener

        public void removePlotLayerRemovingListener(PlotLayerRemovingListener l)
        移除一个用于接收图元层、子图层或者标号移除前事件(event)的监听器。
        参数:
        l - 一个用于接收图元层、子图层或者标号移除前事件的监听器。
      • removePlotLayerMovedListener

        public void removePlotLayerMovedListener(PlotLayerMovedListener l)
        移除一个用于接收图元层、子图层或者标号移动结束事件(event)的监听器。
        参数:
        l - 一个用于接收图元层、子图层或者标号移动结束事件的监听器。
      • removePlotLayerClearedListener

        public void removePlotLayerClearedListener(PlotLayerClearedListener l)
        移除一个用于接收图层标号清空的事件(event)的监听器。
        参数:
        l - 一个用于接收图层标号清空事件的监听器。
      • removePlotLayerSelectedListener

        public void removePlotLayerSelectedListener(PlotLayerSelectedListener l)
        移除一个用于接收选中标号变化事件(event)的监听器。
        参数:
        l - 一个用于接收选中标号变化事件的监听器。

Copyright © 2021–2024 SuperMap. All rights reserved.