Esempio n. 1
0
 def __init__(self):
     head = 'Name,Value'.split(',')
     self.data = [
         ['This', 'Bacon'],
         ['That', 'Eggs'],
     ]
     DefaultTableModel.__init__(self, self.data, head)
 def __init__(self, *args, **kwargs):
     savemode = False
     if 'savemode' in kwargs:
         savemode = kwargs.pop('savemode')
     DefaultTableModel.__init__(self, *args, **kwargs)
     if savemode:
         self.checkbox_column = 3
     else:
         self.checkbox_column = 4
Esempio n. 3
0
 def __init__( self, data, headings ) :
     info = []
     df   = DateFormat.getDateInstance( DateFormat.SHORT )
     for date, size, path in data :
         info.append(
             [
                 df.parse( date ),
                 Integer( size.strip().replace( ',', '' ) ),
                 String( path )
             ]
         )
     DefaultTableModel.__init__( self, info, headings )
Esempio n. 4
0
 def __init__(self, data, headings):
     info = []
     df = DateFormat.getDateInstance(DateFormat.SHORT)
     for tf, date, size, f, d in data:
         info.append([
             Boolean(tf == '1'),
             df.parse(date),
             Integer(size.strip().replace(',', '')),
             Float(f),
             Double(d)
         ])
     DefaultTableModel.__init__(self, info, headings)
Esempio n. 5
0
 def __init__(self, data, headings):
     DefaultTableModel.__init__(self, data, headings)
     L = len(data)
     self.visible = [1] * L
     self.sectionNumber = [0] * L
     self.sections = 0
     section = -1
     for i in range(L):
         row = data[i]
         if row[0].startswith('_'):
             self.sections += 1
             section += 1
         self.sectionNumber[i] = section
     self.sectionVisible = [1] * self.sections
     self.findText = None
Esempio n. 6
0
 def __init__(self):
     head = 'Byte,Double,Float,Integer,Long,Short'.split(',')
     self.data = [[
         Byte(Byte.MIN_VALUE),
         Double(Double.MIN_VALUE),
         Float(Float.MIN_VALUE),
         Integer(Integer.MIN_VALUE),
         Long(Long.MIN_VALUE),
         Short(Short.MIN_VALUE)
     ],
                  [
                      Byte(Byte.MAX_VALUE),
                      Double(Double.MAX_VALUE),
                      Float(Float.MAX_VALUE),
                      Integer(Integer.MAX_VALUE),
                      Long(Long.MAX_VALUE),
                      Short(Short.MAX_VALUE)
                  ]]
     DefaultTableModel.__init__(self, self.data, head)
 def __init__(self, data, headings):
     DefaultTableModel.__init__(self, data, headings)
Esempio n. 8
0
 def __init__(self, data, headings):
     # call the DefaultTableModel constructor to populate the table
     DefaultTableModel.__init__(self, data, headings)
Esempio n. 9
0
 def __init__(self):
     head = 'Name,Value'.split(',')
     self.data = [['Uno', choices[0]], ['Dos', choices[1]],
                  ['Tres', choices[2]]]
     DefaultTableModel.__init__(self, self.data, head)
Esempio n. 10
0
 def __init__(self, data, headings):
     DefaultTableModel.__init__(self, data, headings)
     self.visible = [1] * len(data)
Esempio n. 11
0
 def __init__(self, data):
     for row in range(len(data)):
         data[row][0] = int(data[row][0])
     DefaultTableModel.__init__(self, data, self.headings)
Esempio n. 12
0
 def __init__(self):
     head = 'Name,Value'.split(',')
     self.data = [['Which', 'spam']]
     DefaultTableModel.__init__(self, self.data, head)
Esempio n. 13
0
 def __init__(self):
     head = 'Name,Value'.split(',')
     self.data = [['Min Port', Integer(0)], ['Max Port', Integer(65535)]]
     DefaultTableModel.__init__(self, self.data, head)