def __init__(self, parent, sweep, canvas, linedefs): View.__init__(self, parent) self.plot_canvas = canvas self.linedefs = linedefs # dictionary of [line, colour] lists keyed by name # names are: fitted_line, inside_data, left_outside_data, and right_outside_data self.visible = 1 self.set_model(sweep)
def __init__(self, parent, x, y, sweep): View.__init__(self, parent) self.canvas = parent.canvas self.graphic = self.canvas.create_oval(x, y + 3, x + 6, y + 9, outline="black") self.canvas.tag_bind(self.graphic, sequence='<Button-1>', func=self.click) self.set_model(sweep)
def __init__(self, parent, exp_view, end, colour, handle_width): View.__init__(self, parent) self.transform = exp_view.transform # a Transform self.graph_canvas = exp_view.graph_canvas self.plot_canvas = exp_view.plot_canvas self.colour = colour x0 = exp_view.left_margin x1 = exp_view.graph_width - exp_view.right_margin y0 = exp_view.top_margin y1 = exp_view.graph_height - exp_view.bottom_margin self.xlimits = (x0, x1) self.xmin = x0 self.xmax = x1 self.region = None self.end = end self.x = x0 w = handle_width s = (-1, 1)[end] * w ht = exp_view.graph_height - exp_view.handle_height hb = exp_view.graph_height self.handle_graphic = self.graph_canvas.create_polygon(x0, hb, x0, ht, x0 + s, ht + w, x0 + s, hb, fill=colour, outline=colour) self.hairline_graphic = self.plot_canvas.create_rectangle(x0 - 1 + end, y0, x0 + end, y1, outline="", fill=colour) self.graph_canvas.tag_bind(self.handle_graphic, sequence="<Button-1>", func=self.click) self.graph_canvas.tag_bind(self.handle_graphic, sequence="<Button1-Motion>", func=self.drag) self.graph_canvas.tag_bind(self.handle_graphic, sequence="<ButtonRelease-1>", func=self.release)
def __init__(self, sweep_list, target, x, y0, y1): View.__init__(self, sweep_list) self.canvas = sweep_list.canvas self.background = self.canvas.create_rectangle(x + 1, y0 + 1, x + 8, y1 - 1) self.foreground = self.canvas.create_rectangle(x + 1, y0 + 1, x + 8, y1 - 1, outline='black') self.target = target # an FtExperiment, FtSweepSet or FtSweep target.fit_region.add_view(self) target.noise_region.add_view(self) self.canvas.tag_bind(self.foreground, sequence="<Button-1>", func=self.click) self.canvas.tag_bind(self.background, sequence="<Button-1>", func=self.click) self.highlight(0) self.update()
def __init__(self, parent, canvas, x, y, ftvalue): View.__init__(self, parent) self.canvas = canvas self.item = self.canvas.create_text(x, y, anchor='ne') ftvalue.add_view(self) self.update()
def __init__(self, parent, canvas, model, *args, **kw): self.canvas = canvas self.text = canvas.create_text(*args, **kw) View.__init__(self, parent) self.set_model(model)
def __init__(self, master, model, **kw): Label.__init__(self, master, **kw) View.__init__(self) self.set_model(model)