@Override
 public DesignComponent createComponent(DesignComponent parentComponent) {
   DesignComponent dc = parentComponent.getDocument().createComponent(getTypeID());
   if (myEventType != null) {
     DesignComponent svgES = parentComponent.getDocument().createComponent(myEventType);
     svgES.writeProperty(
         SVGComponentEventSourceCD.PROP_SVGCOMPONENT,
         PropertyValue.createComponentReference(dc));
     parentComponent.addComponent(svgES);
   }
   dc.writeProperty(SVGComponentCD.PROP_ID, MidpTypes.createStringValue(getId()));
   Map<String, Object> properties = getProperties();
   if (properties != null) {
     for (Entry<String, Object> entry : properties.entrySet()) {
       if (!entry.getKey().equals(SVGRadioButtonCD.PROP_BUTTON_GROUP)) {
         dc.writeProperty(
             entry.getKey(), MidpTypes.createStringValue(entry.getValue().toString()));
       }
     }
   }
   return dc;
 }
Exemplo n.º 2
0
 @Override
 public void postInitialize(DesignComponent component) {
   component.writeProperty(PROP_MAX_SIZE, MidpTypes.createIntegerValue(32));
   component.writeProperty(PROP_CONSTRAINTS, MidpTypes.createIntegerValue(VALUE_ANY));
 }