Esempio n. 1
0
        public virtual void Rollback(ArrayList snapshot)
        {
            this.marker = (Int32)snapshot[0];
            snapshot.RemoveAt(0);

            if (this.marker == MarkerStart)
            {
                ResetMarker();
                return;
            }
            else if ((this.marker == -1) || children.Count == 0)
            {
                return;
            }

            if (this.marker <= MarkerStart)
            {
                return;
            }

            int numChildren = children.Count;

            for (int i = this.marker + 1; i < numChildren; i++)
            {
                FONode fo = (FONode)children[i];
                fo.ResetMarker();
            }
            ((FONode)children[this.marker]).Rollback(snapshot);
        }
Esempio n. 2
0
 protected internal override void AddChild(FONode child)
 {
     if (child is XMLObj)
     {
         ((XMLObj)child).addGraphic(doc, element);
     }
 }
Esempio n. 3
0
 public void AddMarker(string markerClassName)
 {
     if (children != null)
     {
         for (int i = 0; i < children.Count; i++)
         {
             FONode child = (FONode)children[i];
             if (!child.MayPrecedeMarker())
             {
                 throw new FonetException(
                           String.Format("A fo:marker must be an initial child of '{0}'", GetName()));
             }
         }
     }
     if (markerClassNames == null)
     {
         markerClassNames = new Hashtable();
         markerClassNames.Add(markerClassName, String.Empty);
     }
     else if (!markerClassNames.ContainsKey(markerClassName))
     {
         markerClassNames.Add(markerClassName, String.Empty);
     }
     else
     {
         throw new FonetException(
                   String.Format("marker-class-name '{0}' already exists for this parent",
                                 markerClassName));
     }
 }
Esempio n. 4
0
 protected internal override void AddChild(FONode child)
 {
     if (child is XMLObj)
     {
         ((XMLObj)child).addGraphic(doc, element);
     }
 }
Esempio n. 5
0
 protected internal override void AddChild(FONode child)
 {
     if (doc == null)
     {
         CreateBasicDocument();
     }
     base.AddChild(child);
 }
Esempio n. 6
0
 protected internal override void AddChild(FONode child)
 {
     if (doc == null)
     {
         CreateBasicDocument();
     }
     base.AddChild(child);
 }
Esempio n. 7
0
        protected internal override void AddChild(FONode child)
        {
            var xmlChild = child as XMLObj;

            if (xmlChild != null)
            {
                xmlChild.addGraphic(doc, element);
            }
        }
Esempio n. 8
0
        public virtual void RemoveID(IDReferences idReferences)
        {
            if (((FObj)this).properties.GetProperty("id") == null ||
                ((FObj)this).properties.GetProperty("id").GetString() == null)
            {
                return;
            }
            idReferences.RemoveID(((FObj)this).properties.GetProperty("id").GetString());
            int numChildren = this.children.Count;

            for (int i = 0; i < numChildren; i++)
            {
                FONode child = (FONode)children[i];
                if ((child is FObj))
                {
                    ((FObj)child).RemoveID(idReferences);
                }
            }
        }
Esempio n. 9
0
        public override Status Layout(Area area)
        {
            if (this.properties != null)
            {
                Property prop = this.properties.GetProperty("id");
                if (prop != null)
                {
                    string id = prop.GetString();

                    if (this.marker == MarkerStart)
                    {
                        if (area.getIDReferences() != null)
                        {
                            area.getIDReferences().CreateID(id);
                        }
                        this.marker = 0;
                    }

                    if (this.marker == 0)
                    {
                        if (area.getIDReferences() != null)
                        {
                            area.getIDReferences().ConfigureID(id, area);
                        }
                    }
                }
            }

            int numChildren = this.children.Count;

            for (int i = this.marker; i < numChildren; i++)
            {
                FONode fo = (FONode)children[i];
                Status status;
                if ((status = fo.Layout(area)).isIncomplete())
                {
                    this.marker = i;
                    return(status);
                }
            }
            return(new Status(Status.OK));
        }
Esempio n. 10
0
 protected internal virtual void AddChild(FONode child)
 {
     children.Add(child);
 }
Esempio n. 11
0
 protected internal virtual void AddChild(FONode child)
 {
     children.Add(child);
 }