def __init__(self, img_url): Canvas.__init__(self, 300, 300) self.clock = CanvasImage(img_url) self.width = 150 self.height = 150 self.loader = ImageLoadListener(self) self.loader.add(self.clock) self.isActive = True self.onTimer()
def __init__(self, nameLabel, currentValueLabel, newValueLabel): Canvas.__init__(self, 800, 300) self.nodes = [] self.edges = [] self.nameLabel = nameLabel self.currentValueLabel = currentValueLabel self.newValueLabel = newValueLabel self.addMouseListener(self) self.draw()
def __init__(self, img_url): Canvas.__init__(self, 200, 200) self.img_url = img_url self.clock = CanvasImage(self.img_url) self.width = 200 self.height = 200 self.plusGMT = 0 #Time would be GMT+plusGMT self.loader = ImageLoadListener(self) self.loader.add(self.clock) self.isActive = True self.onTimer()
def __init__(self): Canvas.__init__(self, 300, 300) self.sun = CanvasImage('images/sun.png') self.moon = CanvasImage('images/moon.png') self.earth = CanvasImage('images/earth.png') self.loader = ImageLoadListener() self.loader.add(self.sun) self.loader.add(self.moon) self.loader.add(self.earth) self.isActive = True self.onTimer()
def __init__(self): self._dragging = False Canvas.__init__(self, Width=WIDTH, Height=HEIGHT) canvasElement = self.getElement() #Register for canvas mouse events self._proc = Processing(DOM.getFirstChild(canvasElement)) self._proc.setup = (lambda: self.setup_proc()) self._proc.draw = None self._proc.init() DOM.sinkEvents(canvasElement, Event.MOUSEEVENTS) DOM.setEventListener(canvasElement, self) self._currentPointList = [] self._x = None self._y = None self._callback_Redraw = None self._callback_AddStroke = None self._callback_DeleteStroke = None
def __init__(self): Canvas.__init__(self, 150, 150) self.draw() self.addMouseListener(self) self.addKeyboardListener(self)
def __init__(self): Canvas.__init__(self, 300, 300) self.draw()
def __init__(self): Canvas.__init__(self, 150, 150) self.img = CanvasImage('images/wallpaper.png', self)
def __init__(self): Canvas.__init__(self, 150, 150) self.draw()
def __init__(self): Canvas.__init__(self, 150, 150) self.context.translate(75, 75) self.draw()
def __init__(self): Canvas.__init__(self,0,0) self.c = getFirstChild(self.getElement()) self.p = Processing (self.c) global p p = self.p
def __init__(self): Canvas.__init__(self, 0, 0) self.c = getFirstChild(self.getElement()) self.p = Processing(self.c) global p p = self.p
def __init__(self): Canvas.__init__(self, 150, 150) self.context.translate(75,75) self.draw()
def __init__(self): Canvas.__init__(self, 300, 250) self.img = CanvasImage('media/splash%20screen.png', self) self.screen = 1 self.addMouseListener(self)
def __init__(self): Canvas.__init__(self, 300, 250) self.img = CanvasImage('media/splash screen.png', self) self.draw()