def __init__(self, store): ScrollingFragment.__init__(self, store, POP3Grabber, None, [ POP3Grabber.username, POP3Grabber.domain, POP3Grabber.paused, StatusColumn(POP3Grabber.status, self) ]) self.docFactory = webtheme.getLoader(self.fragmentName)
def __init__(self, store): ScrollingFragment.__init__(self, store, POP3Grabber, None, [POP3Grabber.username, POP3Grabber.domain, POP3Grabber.paused, StatusColumn(POP3Grabber.status, self)]) self.docFactory = webtheme.getLoader(self.fragmentName)
def __init__(self, userBrowser): ScrollingFragment.__init__(self, userBrowser.store.parent, userbase.LoginMethod, userbase.LoginMethod.domain != None, (userbase.LoginMethod.localpart, userbase.LoginMethod.domain, userbase.LoginMethod.verified), defaultSortColumn=userbase.LoginMethod.domain, defaultSortAscending=True)
def __init__(self, store): ScrollingFragment.__init__( self, store, FromAddress, None, (FromAddressAddressColumn(), FromAddress.smtpHost, FromAddress.smtpPort, FromAddress.smtpUsername, FromAddress._default))
def test_oneSortableSortMetadata(self): """ Same as L{test_allUnsortableSortMetadata}, but with one sortable column """ sf = ScrollingFragment(self.store, DataThunk, None, (DataThunk.a, UnsortableColumn(DataThunk.b))) meta = sf.getTableMetadata() cols = meta[1] self.assertEquals(cols['a'][1], True) self.assertEquals(cols['b'][1], False)
def test_allUnsortableSortMetadata(self): """ Test that C{getTableMetadata} is correct with respect to the sortability of columns """ sf = ScrollingFragment( self.store, DataThunk, None, (UnsortableColumn(DataThunk.a), UnsortableColumn(DataThunk.b))) meta = sf.getTableMetadata() cols = meta[1] self.assertEquals(cols['a'][1], False) self.assertEquals(cols['b'][1], False)
def test_oneSortableSortMetadata(self): """ Same as L{test_allUnsortableSortMetadata}, but with one sortable column """ sf = ScrollingFragment( self.store, DataThunk, None, (DataThunk.a, UnsortableColumn(DataThunk.b))) meta = sf.getTableMetadata() cols = meta[1] self.assertEquals(cols['a'][1], True) self.assertEquals(cols['b'][1], False)
def testSortsOnFirstSortable(self): """ Test that the scrolltable sorts on the first sortable column """ sf = ScrollingFragment(self.store, DataThunk, None, (UnsortableColumn(DataThunk.a), DataThunk.b)) self.assertEquals(sf.currentSortColumn, DataThunk.b)
def testSortsOnFirstSortable2(self): """ Same as L{testSortsOnFirstSortable}, but for the case where the first sortable column is the first in the column list """ sf = ScrollingFragment(self.store, DataThunk, None, (DataThunk.a, UnsortableColumn(DataThunk.b))) self.assertIdentical(sf.currentSortColumn.sortAttribute(), DataThunk.a)
def testUnsortableColumnWrapper(self): """ Test that an L{UnsortableColumnWrapper} wrapping an L{AttributeColumn} is treated the same as L{UnsortableColumn} """ sf = ScrollingFragment(self.store, DataThunk, None, (UnsortableColumnWrapper( AttributeColumn(DataThunk.a)), DataThunk.b)) self.assertEquals(sf.currentSortColumn, DataThunk.b)
def testTestNoSortables(self): """ Test that the scrolltable can handle the case where all columns are unsortable """ sf = ScrollingFragment( self.store, DataThunk, None, (UnsortableColumn(DataThunk.a), UnsortableColumn(DataThunk.b))) self.assertEquals(sf.currentSortColumn, None)
def getScrollFragment(self): sf = ScrollingFragment(self.store, DataThunk, DataThunk.a > 4, [DataThunk.b, DataThunk.c], DataThunk.a) sf.linkToItem = lambda ign: None return sf
def getScrollFragment(self): sf = ScrollingFragment( self.store, DataThunk, DataThunk.a > 4, [DataThunk.b, DataThunk.c], DataThunk.a) sf.linkToItem = lambda ign: None return sf