|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttwaver.model.HashList<T>
twaver.model.HashCollection<T>
twaver.model.DataBox<Layer>
twaver.model.LayerBox
public class LayerBox
图层管理容器,用于管理网元的图层数据
Field Summary | |
---|---|
protected ElementBox |
elementBox
网元容器,图层所在的网元容器 |
Fields inherited from class twaver.model.DataBox |
---|
roots |
Fields inherited from class twaver.model.HashList |
---|
dataList, dataMap |
Constructor Summary | |
---|---|
LayerBox(ElementBox elementBox)
图层管理容器,用于管理网元的图层数据 |
Method Summary | |
---|---|
boolean |
forEach(int layerId,
Action<Element> action)
|
boolean |
forEach(Layer layer,
Action<Element> action)
|
boolean |
forEachReverse(Layer layer,
Action<Element> action)
反向遍历该层所有的网元 |
Layer |
getDefaultLayer()
默认层 |
ElementBox |
getElementBox()
|
java.util.List<Element> |
getElements(Layer layer)
|
Layer |
getLayer(Element element)
获取网元所在的图层 |
Layer |
getLayerById(int layerId)
通过图层编号获取图层 |
protected void |
initLayers()
初始化图层容器 |
boolean |
inLayer(Element element,
Layer layer)
判断网元是否在指定图层 |
boolean |
isDefaultLayer(Layer layer)
是否是默认层 |
void |
resetLayers()
重置图层 |
boolean |
sendToBottom(Layer layer)
置底图层,该图层将绘制在底层 |
boolean |
sendToTop(Layer layer)
置顶图层,该图层将绘制在顶层 |
Methods inherited from class twaver.model.DataBox |
---|
beforeDataPropertyChange, doAdd, doRemove, forEachByBreadthFirst, forEachByDepthFirst, forEachByDepthFirstReverse, getDataChangeDispatcher, getParentChangeDispatcher, getRandomData, getRoots, getSelectionChangeDispatcher, getSelectionModel, onAdd, onClear, onDataPropertyChange, onParentChange, onRemove, toRoots |
Methods inherited from class twaver.model.HashCollection |
---|
_remove, accept, add, add, clearAll, getFilterDispatcher, getListChangeDispatcher, remove, setIndex, setListener |
Methods inherited from class twaver.model.HashList |
---|
add, add, add, addAll, addLast, clear, contains, contains, containsAll, containsById, forEach, forEach, forEachReverse, getById, getByIndex, getDatas, getLastData, indexOf, isEmpty, iterator, remove, remove, removeAll, removeById, removeByIndex, retainAll, reverseIterator, set, set, size, sort, toArray, toArray, toDatas, toDatas |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface twaver.core.model.IDataBox |
---|
getDataChangeDispatcher, getSelectionChangeDispatcher, getSelectionModel |
Methods inherited from interface twaver.core.model.IHashCollection |
---|
getListChangeDispatcher |
Methods inherited from interface twaver.core.model.IHashList |
---|
add, add, add, add, clearAll, contains, containsById, forEach, forEachReverse, getById, getByIndex, getDatas, getLastData, indexOf, isEmpty, remove, remove, removeById, reverseIterator, set, set, setIndex, size, toDatas |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Methods inherited from interface twaver.filter.IFilter |
---|
accept |
Methods inherited from interface twaver.event.IHandler |
---|
setListener |
Methods inherited from interface java.util.Collection |
---|
equals, hashCode |
Field Detail |
---|
protected ElementBox elementBox
Constructor Detail |
---|
public LayerBox(ElementBox elementBox)
elementBox
- 图层所在的网元容器Method Detail |
---|
protected void initLayers()
public ElementBox getElementBox()
getElementBox
in interface ILayerBox
public Layer getDefaultLayer()
getDefaultLayer
in interface ILayerBox
public boolean isDefaultLayer(Layer layer)
layer
- 判断该层是否是默认层
public void resetLayers()
public Layer getLayer(Element element)
ILayerBox
getLayer
in interface ILayerBox
element
- 网元public Layer getLayerById(int layerId)
layerId
- 图层编号
public boolean inLayer(Element element, Layer layer)
element
- 网元layer
- 图层
public java.util.List<Element> getElements(Layer layer)
getElements
in interface ILayerBox
public boolean forEach(Layer layer, Action<Element> action)
forEach
in interface ILayerBox
public boolean forEachReverse(Layer layer, Action<Element> action)
layer
- 图层action
- 回调函数,回调函数返回false时,结束遍历
public boolean forEach(int layerId, Action<Element> action)
forEach
in interface ILayerBox
public boolean sendToTop(Layer layer)
layer
- 图层
public boolean sendToBottom(Layer layer)
layer
- 图层
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |