comparison pyink/FSM_window.py @ 1474:697ebfa9dc47

Update state and transition from domview
author Thinker K.F. Li <thinker@codemud.net>
date Sun, 24 Apr 2011 17:59:11 +0800
parents e807ad5aeb91
children 8c6078c17f2d
comparison
equal deleted inserted replaced
1473:e807ad5aeb91 1474:697ebfa9dc47
137 def clear(self): 137 def clear(self):
138 trn_g = self.trn_g 138 trn_g = self.trn_g
139 parent = trn_g.parent() 139 parent = trn_g.parent()
140 parent.removeChild(trn_g) 140 parent.removeChild(trn_g)
141 pass 141 pass
142
143 def update(self):
144 path = self.path
145 arrow_node = self._arrow_node
146 path_node = self._path_node
147 self._update_graph(path, arrow_node, path_node)
148 pass
142 pass 149 pass
143 150
144 class FSM_state(object): 151 class FSM_state(object):
145 _doc = None 152 _doc = None
146 _domview = None 153 _domview = None
241 248
242 def clear(self): 249 def clear(self):
243 state_g = self.state_g 250 state_g = self.state_g
244 parent = state_g.parent() 251 parent = state_g.parent()
245 parent.removeChild(state_g) 252 parent.removeChild(state_g)
253 pass
254
255 def update(self):
256 text_node = self._text_node
257 text_content = self._text_content
258 circle_node = self._circle_node
259 state_name = self.state_name
260 r = self.r
261 x, y = self.xy
262 self._update_graph(text_node, text_content, circle_node,
263 r, x, y)
246 pass 264 pass
247 pass 265 pass
248 266
249 class FSM_window(FSM_window_base): 267 class FSM_window(FSM_window_base):
250 __metaclass__ = data_monitor.data_monitor 268 __metaclass__ = data_monitor.data_monitor