twaver.model
Class Layer

java.lang.Object
  extended by twaver.model.Data
      extended by twaver.model.Layer
All Implemented Interfaces:
IChildList, IData, ILayer, IHandler<PropertyChangeEvent>, IListener<PropertyChangeEvent>, Identifiable

public class Layer
extends Data
implements ILayer

图层元素


Field Summary
protected  boolean editable
          是否可编辑
protected  int id
          图层编号
protected  boolean movable
          是否可移动
protected  java.lang.String name
          图层名称
protected  boolean visible
          是否可见
 
Fields inherited from class twaver.model.Data
parent
 
Constructor Summary
Layer(int id)
          构造函数
Layer(int id, java.lang.String name)
          构造函数
 
Method Summary
 int getId()
          元素编号,唯一标识
 java.lang.String getName()
          图层名称
 boolean isEditable()
           
 boolean isMovable()
           
 boolean isVisible()
           
 void setEditable(boolean editable)
          设置图层上的网元能否编辑
 void setMovable(boolean movable)
          设置图层上的网元能否移动
 void setName(java.lang.String name)
          设置图层名称
 void setVisible(boolean visible)
          设置图层上的网元能否可见
 
Methods inherited from class twaver.model.Data
addChild, addChild, beforeEvent, clearChildren, get, getChildAt, getChildIndex, getChildren, getChildrenCount, getParent, getProperties, getProperties, hasChildren, hashCode, isDescendantOf, onChildAdd, onChildRemove, onChildrenClear, onEvent, onParentChanged, remove, removeChild, set, setChildIndex, setListener, setParent, setParent, setProperty, toChildren, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface twaver.core.model.IData
get, getProperties, remove, set
 
Methods inherited from interface twaver.event.IHandler
setListener
 
Methods inherited from interface twaver.event.IListener
beforeEvent, onEvent
 
Methods inherited from interface twaver.core.model.IChildList
addChild, addChild, clearChildren, getChildAt, getChildIndex, getChildren, getChildrenCount, getParent, hasChildren, isDescendantOf, onParentChanged, removeChild, setChildIndex, setParent, setParent, toChildren
 

Field Detail

id

protected int id
图层编号


name

protected java.lang.String name
图层名称


movable

protected boolean movable
是否可移动


visible

protected boolean visible
是否可见


editable

protected boolean editable
是否可编辑

Constructor Detail

Layer

public Layer(int id)
构造函数

Parameters:
id - 图层编号

Layer

public Layer(int id,
             java.lang.String name)
构造函数

Parameters:
id - 图层编号
name - 图层名称
Method Detail

getName

public java.lang.String getName()
图层名称

Returns:
图层名称

setName

public void setName(java.lang.String name)
设置图层名称

Parameters:
name - 图层名称

getId

public int getId()
Description copied from interface: Identifiable
元素编号,唯一标识

Specified by:
getId in interface Identifiable
Overrides:
getId in class Data
Returns:
元素的唯一标识

isMovable

public boolean isMovable()
Specified by:
isMovable in interface ILayer

setMovable

public void setMovable(boolean movable)
设置图层上的网元能否移动

Parameters:
movable - 能否移动

isEditable

public boolean isEditable()
Specified by:
isEditable in interface ILayer

setEditable

public void setEditable(boolean editable)
设置图层上的网元能否编辑

Parameters:
editable - 能否编辑

isVisible

public boolean isVisible()
Specified by:
isVisible in interface ILayer

setVisible

public void setVisible(boolean visible)
设置图层上的网元能否可见

Parameters:
visible - 能否可见