Пример #1
0
 //插入属性
 public void inseartProperty(PropertyElement property,int index)
 {
     PropertyValueElement element = new PropertyValueElement(propertyValueManager);
     element.name = property.name + "";
     element.ValueType = property.ValueType;
     element.setValue(property.getDefaultValue());
     propertyValueManager.insertElement(element, index);
     propertyValueManager.refreshUI();
 }
Пример #2
0
 //刷新属性(全部填写默认属性)
 public void refreshProperty()
 {
     this.removeAll();
     for (int i = 0; i < propertiesManager.getElementCount(); i++)
     {
         PropertyValueElement element = new PropertyValueElement(this);
         PropertyElement property = (PropertyElement)(propertiesManager.getElement(i));
         element.name = property.name + "";
         element.ValueType = property.ValueType;
         element.setValue(property.getDefaultValue());
         addElement(element);
     }
 }
Пример #3
0
 //增加属性
 public void addProperty(PropertyElement property)
 {
     PropertyValueElement element = new PropertyValueElement(propertyValueManager);
     element.name = property.name + "";
     element.ValueType = property.ValueType;
     element.setValue(property.getDefaultValue());
     propertyValueManager.addElement(element);
     propertyValueManager.refreshUI();
 }