Exemplo n.º 1
0
  public Component(String id, ComponentType type) {
    this.id = id;
    this.type = type;
    this.parent = null;
    directChildren = new ArrayList<>();
    attributes = new Attributes(this.id);
    allChildren = new HashMap<>();
    attributeId = new HashMap<>();

    initAttributesId();
  }
Exemplo n.º 2
0
  public Component(ComponentType type) {
    this.id = generateCustomId();
    this.type = type;
    this.parent = null;
    directChildren = new ArrayList<>();
    attributes = new Attributes(this.id);
    allChildren = new HashMap<>();
    attributeId = new HashMap<>();

    initAttributesId();
  }
Exemplo n.º 3
0
  public Component(Component parent) {
    this.id = generateCustomId();
    this.type = ComponentType.PANEL;
    this.parent = parent;
    directChildren = new ArrayList<>();
    attributes = new Attributes(this.id);
    allChildren = new HashMap<>();
    attributeId = new HashMap<>();

    initAttributesId();
    parent.addChild(this);
  }
Exemplo n.º 4
0
  public void setId(String id) {
    id = id.isEmpty() == true ? generateCustomId() : id;

    if (this.parent != null) removeIndexComponent(this.parent, this);

    this.id = id;

    if (this.parent != null) indexComponent(this.parent, this);

    attributes.setId(this.id);
    initAttributesId();
  }