Exemplo n.º 1
0
 /** Sets the name. */
 public void setName(String name) {
   for (Attribute a : getModel().getRoot().getAttributes()) {
     if (a.getName().equals(name)) {
       setRef(a);
       return;
     }
   }
   getReferent().setName(name);
 }
Exemplo n.º 2
0
  /** Sets the type. */
  public void setType(AXIType type) {
    if (type instanceof Attribute) {
      setRef((Attribute) type);
      return;
    }

    int index = this.getIndex();
    AXIComponent parent = getParent();
    Attribute a = getModel().getComponentFactory().createAttribute();
    a.setName(getReferent().getName());
    parent.removeChild(this);
    parent.insertAtIndex(Attribute.PROP_ATTRIBUTE, a, index);
    a.setType(type);
  }
Exemplo n.º 3
0
 /** Sets the new referent. */
 public void setRef(Attribute referent) {
   AttributeImpl oldRef = (AttributeImpl) getReferent();
   if (oldRef == referent) return;
   oldRef.removeListener(this);
   super.setSharedComponent(referent);
   firePropertyChangeEvent(PROP_ATTRIBUTE_REF, oldRef, referent);
   forceFireEvent();
 }
Exemplo n.º 4
0
 /** Creates a new instance of AttributeRef */
 public AttributeRef(AXIModel model, SchemaComponent component, Attribute referent) {
   super(model, component);
   super.setSharedComponent(referent);
 }