示例#1
0
 public void resetDetailPane() {
   detailPane.removeAll();
   Dimension d = new Dimension(0, 3);
   detailPane.setOpaque(false);
   detPaneHolder.setOpaque(false);
   if (selectedContact != null && selectedContact.getProperties() != null) {
     String[][] properties = selectedContact.getProperties();
     for (String[] property : properties) {
       javax.swing.JSeparator space = new JSeparator(SwingConstants.HORIZONTAL);
       space.setSize(d);
       detailPane.add(space);
       DetInnerPaneBlocks dipb = new DetInnerPaneBlocks(property[0], property[1]);
       detailPane.add(dipb);
     }
     detailPane.add(Box.createGlue());
     detailPane.setSize(0, (DetInnerPaneBlocks.height + d.height) * properties.length);
   } else {
     detailPane.setSize(0, 0);
   }
   resetDetPaneHolderSize();
 }