Ejemplo n.º 1
0
 public Block addBlock(String name, String type, String info)
 {
     Block newBlock;
     if (type.Equals("repeating")) newBlock = new RepeatingBlock(name, info);
     else if (type.Equals("single")) newBlock = new SingleBlock(name, info);
     else if (type.Equals("optional")) newBlock = new OptionalBlock(name, info);
     else if (type.Equals("dependent")) newBlock = new DependBlock(name, info);
     else return null;
     data.AddLast(newBlock);
     return newBlock;
 }
Ejemplo n.º 2
0
 public void drawData(SingleBlock data)
 {
     createLabel(data.getName(), "A block that appears only once.");
     structureDepth++;
     foreach (Data child in data.getChildren())
     {
         structureIndex++;
         child.drawData(this);
     }
     structureDepth--;
 }