コード例 #1
0
 private String getDescription(TableItem item) {
   if (item != null && item.getData() != null) {
     String key = ((PropertyDTO) item.getData()).getProperty();
     List<PropertyDTO> dp = getDefaultProperties();
     for (PropertyDTO p : dp) {
       if (p.getProperty().equals(key)) return p.getDescription();
     }
   }
   return getDescription(); //$NON-NLS-1$
 }
コード例 #2
0
 @Override
 public void dispose() {
   // clear all properties
   value = new JRPropertiesMap();
   List<PropertyDTO> props = (List<PropertyDTO>) tableViewer.getInput();
   for (PropertyDTO p : props) {
     if (p.getProperty() != null && !p.getProperty().equals("")) // $NON-NLS-1$
     value.setProperty(p.getProperty(), p.getValue().toString());
   }
   super.dispose();
 }
コード例 #3
0
 private void fillTable(Table table) {
   List<PropertyDTO> props = new ArrayList<PropertyDTO>();
   String[] names = value.getPropertyNames();
   for (int i = 0; i < names.length; i++) {
     PropertyDTO p = new PropertyDTO();
     p.setProperty(names[i]);
     p.setValue(value.getProperty(names[i]));
     props.add(p);
   }
   tableViewer.setInput(props);
 }