Пример #1
0
 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()
Пример #2
0
    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()
Пример #3
0
 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()
Пример #4
0
    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()
Пример #5
0
    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()
Пример #6
0
   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
Пример #7
0
 def __init__(self):
     Canvas.__init__(self, 150, 150)
     self.draw()
     self.addMouseListener(self)
     self.addKeyboardListener(self)
Пример #8
0
 def __init__(self):
     Canvas.__init__(self, 300, 300)
     self.draw()
Пример #9
0
 def __init__(self):
     Canvas.__init__(self, 150, 150)
     self.img = CanvasImage('images/wallpaper.png', self)
Пример #10
0
 def __init__(self):
     Canvas.__init__(self, 150, 150)
     self.draw()
Пример #11
0
 def __init__(self):
     Canvas.__init__(self, 150, 150)
     self.context.translate(75, 75)
     self.draw()
Пример #12
0
 def __init__(self):
     Canvas.__init__(self,0,0)
     self.c = getFirstChild(self.getElement())
     self.p = Processing (self.c)
     global p
     p = self.p
Пример #13
0
 def __init__(self):
     Canvas.__init__(self, 0, 0)
     self.c = getFirstChild(self.getElement())
     self.p = Processing(self.c)
     global p
     p = self.p
Пример #14
0
 def __init__(self):
     Canvas.__init__(self, 150, 150)
     self.draw()
     self.addMouseListener(self)
     self.addKeyboardListener(self)
Пример #15
0
 def __init__(self):
     Canvas.__init__(self, 300, 300)
     self.draw()
Пример #16
0
 def __init__(self):
     Canvas.__init__(self, 150, 150)
     self.img = CanvasImage('images/wallpaper.png', self)
Пример #17
0
 def __init__(self):
     Canvas.__init__(self, 150, 150)
     self.draw()
Пример #18
0
 def __init__(self):
     Canvas.__init__(self, 150, 150)
     self.context.translate(75,75)
     self.draw()
Пример #19
0
 def __init__(self):
     Canvas.__init__(self, 300, 250)
     self.img = CanvasImage('media/splash%20screen.png', self)
     self.screen = 1
     self.addMouseListener(self)
Пример #20
0
 def __init__(self):
     Canvas.__init__(self, 300, 250)
     self.img = CanvasImage('media/splash screen.png', self)
     self.draw()