Esempio n. 1
0
 private void layoutStatic() {
   int x = 0;
   for (int i = 0; i < m_fields.length; i++) {
     GridData data = GridDataBuilder.createFromHints(m_fields[i], 1);
     data.x = x;
     data.y = 0;
     if (data.weightX < 0) {
       data.weightX = data.w;
     }
     m_fields[i].setGridDataInternal(data);
     x = x + data.w;
     m_gridRows = Math.max(m_gridRows, data.h);
   }
   m_gridColumns = x;
 }
Esempio n. 2
0
 public void validate() {
   // reset
   m_gridColumns = 2;
   m_gridRows = 1;
   ArrayList<IFormField> list = new ArrayList<IFormField>();
   // filter
   for (IFormField f : m_splitBox.getFields()) {
     if (f.isVisible()) {
       list.add(f);
     } else {
       GridData data = GridDataBuilder.createFromHints(f, 1);
       f.setGridDataInternal(data);
     }
   }
   m_fields = list.toArray(new IFormField[list.size()]);
   layoutStatic();
 }