コード例 #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
ファイル: scrolltable.py プロジェクト: fusionapp/mantissa
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