コード例 #1
0
 private void modifyAttr(PlugoutDescItem prop, String property, Object value) {
   if (colNames[0].equals(property)) {
     prop.setName((String) value);
   } else if (colNames[1].equals(property)) {
     String type = (String) value;
     prop.setType(type);
   } else if (colNames[2].equals(property)) {
     prop.setSource((String) value);
   } else if (colNames[3].equals(property)) {
     //			prop.setValue((String) value);
     prop.setDesc((String) value);
   } else if (colNames[4].equals(property)) {
     prop.setClazztype((String) value);
   }
   //		else if (colNames[5].equals(property)) {
   //		}
   view.getTv().update(prop, null);
 }
コード例 #2
0
 /** 取列值 */
 public Object getValue(Object element, String property) {
   if (element instanceof PlugoutDescItem) {
     PlugoutDescItem prop = (PlugoutDescItem) element;
     if (colNames[0].equals(property)) {
       return prop.getName() == null ? "" : prop.getName();
     } else if (colNames[1].equals(property)) {
       return prop.getType() == null ? "" : prop.getType();
     } else if (colNames[2].equals(property)) {
       String type = prop.getType() == null ? "" : prop.getType();
       type = type.split("\\.")[0];
       if (!type.equals(oldType)) {
         updateSource(type);
         oldType = type;
       }
       return prop.getSource() == null ? "" : prop.getSource();
     } else if (colNames[3].equals(property)) {
       //				return prop.getValue()==null?"":prop.getValue();
       return prop.getDesc() == null ? "" : prop.getDesc();
     } else if (colNames[4].equals(property)) {
       return prop.getClazztype() == null ? "" : prop.getClazztype();
       //			}else if(colNames[5].equals(property)){
     }
   }
   return "";
 }