Beispiel #1
0
 public static bool LayoutFootnote(Page p, FootnoteBody fb, Area area)
 {
     try
     {
         BodyAreaContainer bac = p.getBody();
         AreaContainer footArea = bac.getFootnoteReferenceArea();
         footArea.setIDReferences(bac.getIDReferences());
         int basePos = footArea.GetCurrentYPosition()
             - footArea.GetHeight();
         int oldHeight = footArea.GetHeight();
         if (area != null)
         {
             footArea.setMaxHeight(area.getMaxHeight() - area.GetHeight()
                 + footArea.GetHeight());
         }
         else
         {
             footArea.setMaxHeight(bac.getMaxHeight()
                 + footArea.GetHeight());
         }
         Status status = fb.Layout(footArea);
         if (status.isIncomplete())
         {
             return false;
         }
         else
         {
             if (area != null)
             {
                 area.setMaxHeight(area.getMaxHeight()
                     - footArea.GetHeight() + oldHeight);
             }
             if (bac.getFootnoteState() == 0)
             {
                 Area ar = bac.getMainReferenceArea();
                 DecreaseMaxHeight(ar, footArea.GetHeight() - oldHeight);
                 footArea.setYPosition(basePos + footArea.GetHeight());
             }
         }
     }
     catch (FonetException)
     {
         return false;
     }
     return true;
 }
Beispiel #2
0
 public void removeChild(Area area)
 {
     this.currentHeight -= area.GetHeight();
     this.children.Remove(area);
 }
Beispiel #3
0
 public void removeChild(Area area)
 {
     this.currentHeight -= area.GetHeight();
     this.children.Remove(area);
 }
Beispiel #4
0
        public override Status Layout(Area area)
        {
            if (this.marker == MarkerBreakAfter)
            {
                return new Status(Status.OK);
            }

            if (this.marker == MarkerStart)
            {
                if (!setup)
                {
                    DoSetup(area);
                }
            }
            if (columnWidth > 0)
            {
                this.areaContainer =
                    new AreaContainer(propMgr.GetFontState(area.getFontInfo()),
                                      columnOffset, 0, columnWidth,
                                      area.getContentHeight(), Position.RELATIVE);
                areaContainer.foCreator = this;
                areaContainer.setPage(area.getPage());
                areaContainer.setBorderAndPadding(propMgr.GetBorderAndPadding());
                areaContainer.setBackground(propMgr.GetBackgroundProps());
                areaContainer.SetHeight(area.GetHeight());
                area.addChild(areaContainer);
            }
            return new Status(Status.OK);
        }