Ejemplo n.º 1
0
    def __init__(self, **kwargs):
        self.backyear = kwargs.pop('BackyearSymbol', '<<')
        self.backmonth = kwargs.pop('BackmonthSymbol', '<')
        self.fwdyear = kwargs.pop('FwdyearSymbol', '>>')
        self.fwdmonth = kwargs.pop('FwdmonthSymbol', '>')
        self.addbuttons = kwargs.pop('AddButtons', True)
        self.mindate = kwargs.pop('MinDate', None) # (yr, mnth, day)
        self.maxdate = kwargs.pop('MaxDate', None) # (yr, mnth, day)
        self.weekdaylength = kwargs.pop('WeekdayLength', 1) 
        self.dayoffset = kwargs.pop('DayOffset', 1) # 1 returns Mon, 0 for Sun
        self.daybuttons = kwargs.pop('DayButtons', False)
        if kwargs.pop('ArrowButtons', False):
            self.bkls = Button
        else:
            self.bkls = Hyperlink

        FocusPanel.__init__(self, **kwargs)

        self.setDate()

        self.todayYear = self.currentYear
        self.todayMonth = self.currentMonth
        self.todayDay = self.currentDay
        self.selectedDateListeners = []
        self.defaultGrid = None # used later
Ejemplo n.º 2
0
    def __init__(self, **kwargs):
        """ setMatchPattern - defaults to '' to match everything
            match pattern examples: '^[0-9]*$' is for digits only
                                    '^[0-9,A-Z]*$' is for digits and uppercase
            setMaxLength
            setText
OB        """

        kwargs['MatchPattern'] = kwargs.pop('MatchPattern', '')
        cs = kwargs.pop('CursorStyle', "inputbox-cursor")
        gs = kwargs.pop('StyleName', 'gwt-inputbox')

        ap = AbsolutePanel(StyleName="inputbox")
        self.tp = Grid(StyleName=gs, Width="100%", Height="100%",
                       CellPadding=0, CellSpacing=0)
        self.cursor = HTML(StyleName=cs)
        ap.add(self.tp)
        ap.add(self.cursor, 0, 0)
        self.cf = self.tp.getCellFormatter()

        FocusPanel.__init__(self, Widget=ap, **kwargs)

        self.addTableListener(self)
        self.addKeyboardListener(self)
        self.addFocusListener(self)

        self.word_selected_pos = 0
        self.ctimer = Timer(notify=self.cursorFlash)
        self.focusset = False
        self.cstate = False
        self._keypressListeners = []
Ejemplo n.º 3
0
 def __init__(self):
     FocusPanel.__init__(self)
     self.theChild = ChildGChart()
     self.theChild.update()
     self.setWidget(self.theChild)
     self.addKeyboardListener(self)
     self.addMouseListener(self)
Ejemplo n.º 4
0
    def __init__(self, **kwargs):
        FocusPanel.__init__(self, **kwargs)
        yr, mth, day = time.strftime("%Y-%m-%d").split("-")
        self.todayYear = int(yr)
        self.todayMonth = int(mth)  # change to offset 0 as per javascript
        self.todayDay = int(day)

        self.currentMonth = self.todayMonth
        self.currentYear = self.todayYear
        self.currentDay = self.todayDay

        self.selectedDateListeners = []

        self.defaultGrid = None # used later

        return
Ejemplo n.º 5
0
    def __init__(self, **kwargs):
        FocusPanel.__init__(self, **kwargs)
        DateSelectedHandler.__init__(self)
        yr, mth, day = time.strftime("%Y-%m-%d").split("-")
        self.todayYear = int(yr)
        self.todayMonth = int(mth)  # change to offset 0 as per javascript
        self.todayDay = int(day)

        self.currentMonth = self.todayMonth
        self.currentYear = self.todayYear
        self.currentDay = self.todayDay


        self.defaultGrid = None # used later

        return
Ejemplo n.º 6
0
    def __init__ (self, **kwargs):
        ZillaWindow.__init__(self, kwargs)
        FocusPanel.__init__(self, kwargs)

        area1 = TextArea()
        area1.setText("Zakładka 1")

        area2 = TextArea()
        area2.setText("Zakładka 2")

        area3 = TextArea()
        area3.setText("Zakładka 2")

        tabs = TabPanel()
        tabs.add(area2, tabText="Gra nr 1")
        tabs.add(area1, tabText="Pokój gier")
        tabs.add(area3, tabText="Pokój gier")

        self.add (tabs)

        lwindow = LoginWindow(centered=True)
        lwindow.setPopupPosition (100, 100)
        lwindow.show()
Ejemplo n.º 7
0
    def __init__(self, **kwargs):
        ZillaWindow.__init__(self, kwargs)
        FocusPanel.__init__(self, kwargs)

        area1 = TextArea()
        area1.setText("Zakładka 1")

        area2 = TextArea()
        area2.setText("Zakładka 2")

        area3 = TextArea()
        area3.setText("Zakładka 2")

        tabs = TabPanel()
        tabs.add(area2, tabText="Gra nr 1")
        tabs.add(area1, tabText="Pokój gier")
        tabs.add(area3, tabText="Pokój gier")

        self.add(tabs)

        lwindow = LoginWindow(centered=True)
        lwindow.setPopupPosition(100, 100)
        lwindow.show()