Пример #1
0
 def getScrollingElement(self, rowCount):
     """
     Get a L{ScrollingElement}
     """
     s = Store()
     for x in xrange(rowCount):
         SampleRowItem(value=(x + 1) * 50, store=s)
     scrollingElement = ScrollingElement(s, SampleRowItem, None,
                                         (SampleRowItem.value, ), None,
                                         True, FakeTranslator(s))
     scrollingElement.setFragmentParent(self)
     scrollingElement.docFactory = getLoader(scrollingElement.fragmentName)
     return scrollingElement
Пример #2
0
 def getScrollingElement(self, rowCount):
     """
     Get a L{ScrollingElement}
     """
     s = Store()
     for x in xrange(rowCount):
         SampleRowItem(value=(x + 1) * 50, store=s)
     scrollingElement = ScrollingElement(
         s, SampleRowItem, None, (SampleRowItem.value,), None, True,
         FakeTranslator(s))
     scrollingElement.setFragmentParent(self)
     scrollingElement.docFactory = getLoader(
         scrollingElement.fragmentName)
     return scrollingElement
Пример #3
0
def scroller():
    """
    Create a scrolling element with a large number of rows for use in an
    interactive demonstration.
    """
    aStore = Store()
    populate(aStore)
    se = ScrollingElement(aStore, Sample, None,
                          [Sample.quantity,
                           Sample.date,
                           Sample.title,
                           SampleColorWidgetColumn()],
                          webTranslator=FakeTranslator(aStore),
                          defaultSortAscending=False)
    se.docFactory = getLoader(se.fragmentName)
    return se
Пример #4
0
def scroller():
    """
    Create a scrolling element with a large number of rows for use in an
    interactive demonstration.
    """
    aStore = Store()
    populate(aStore)
    se = ScrollingElement(aStore,
                          Sample,
                          None, [
                              Sample.quantity, Sample.date, Sample.title,
                              SampleColorWidgetColumn()
                          ],
                          webTranslator=FakeTranslator(aStore),
                          defaultSortAscending=False)
    se.docFactory = getLoader(se.fragmentName)
    return se