示例#1
0
文件: Role.java 项目: faizalh/jtrac7
 /* copy object values into an existing XML Element */
 private void copyTo(Element e) {
   // appending empty strings to create new objects for "clone" support
   e.addAttribute(NAME, name + "");
   for (State state : states.values()) {
     state.addAsChildOf(e);
   }
 }
示例#2
0
文件: Role.java 项目: faizalh/jtrac7
 public Role(Element e) {
   name = e.attributeValue(NAME);
   for (Object o : e.elements(STATE)) {
     State state = new State((Element) o);
     states.put(state.getStatus(), state);
   }
 }
示例#3
0
文件: Role.java 项目: faizalh/jtrac7
 public void removeState(int stateId) {
   states.remove(stateId);
   for (State s : states.values()) {
     s.removeTransition(stateId);
   }
 }
示例#4
0
文件: Role.java 项目: faizalh/jtrac7
 public void add(State state) {
   states.put(state.getStatus(), state);
 }