/**
  * Adds a child layer. Nested layers can only have one parent.
  * @param child the child layer
  */
 public void AddChild(PdfLayer child)
 {
     if (child.parent != null)
     {
         throw new ArgumentException("The layer '" + ((PdfString)child.Get(PdfName.NAME)).ToUnicodeString() + "' already has a parent.");
     }
     child.parent = this;
     if (children == null)
     {
         children = new ArrayList();
     }
     children.Add(child);
 }
Beispiel #2
0
 /**
 * Adds a child layer. Nested layers can only have one parent.
 * @param child the child layer
 */    
 public void AddChild(PdfLayer child) {
     if (child.parent != null)
         throw new ArgumentException(MessageLocalization.GetComposedMessage("the.layer.1.already.has.a.parent", ((PdfString)child.Get(PdfName.NAME)).ToUnicodeString()));
     child.parent = this;
     if (children == null)
         children = new ArrayList();
     children.Add(child);
 }
Beispiel #3
0
 /**
 * Adds a child layer. Nested layers can only have one parent.
 * @param child the child layer
 */
 public void AddChild(PdfLayer child)
 {
     if (child.parent != null)
         throw new ArgumentException("The layer '" + ((PdfString)child.Get(PdfName.NAME)).ToUnicodeString() + "' already has a parent.");
     child.parent = this;
     if (children == null)
         children = new ArrayList();
     children.Add(child);
 }
Beispiel #4
0
 /**
  * Adds a child layer. Nested layers can only have one parent.
  * @param child the child layer
  */
 public void AddChild(PdfLayer child)
 {
     if (child.parent != null)
     {
         throw new ArgumentException(MessageLocalization.GetComposedMessage("the.layer.1.already.has.a.parent", ((PdfString)child.Get(PdfName.NAME)).ToUnicodeString()));
     }
     child.parent = this;
     if (children == null)
     {
         children = new ArrayList();
     }
     children.Add(child);
 }