Example #1
0
 private Status LayoutBestMarker(ArrayList markers, Area area)
 {
     if (markers != null)
     {
         for (int i = markers.Count - 1; i >= 0; i--)
         {
             Marker currentMarker = (Marker)markers[i];
             if (currentMarker.GetMarkerClassName().Equals(retrieveClassName))
             {
                 bestMarker = currentMarker;
                 bestMarker.resetMarkerContent();
                 return(bestMarker.LayoutMarker(area));
             }
         }
     }
     return(new Status(Status.OK));
 }
Example #2
0
        public override Status Layout(Area area)
        {
            if (marker == MarkerStart)
            {
                marker = 0;
                Page containingPage = area.getPage();
                bestMarker = SearchPage(containingPage);

                if (bestMarker != null)
                {
                    bestMarker.resetMarkerContent();
                    return bestMarker.LayoutMarker(area);
                }

                AreaTree areaTree = containingPage.getAreaTree();
                if (retrieveBoundary == RetrieveBoundary.PAGE_SEQUENCE)
                {
                    PageSequence pageSequence = areaTree.GetCurrentPageSequence();
                    if (pageSequence == containingPage.getPageSequence())
                    {
                        return LayoutBestMarker(areaTree.GetCurrentPageSequenceMarkers(), area);
                    }

                }
                else if (retrieveBoundary == RetrieveBoundary.DOCUMENT)
                {
                    return LayoutBestMarker(areaTree.GetDocumentMarkers(), area);

                }
                else if (retrieveBoundary != RetrieveBoundary.PAGE)
                {
                    throw new FonetException("Illegal 'retrieve-boundary' value");
                }

            }
            else if (bestMarker != null)
            {
                return bestMarker.LayoutMarker(area);
            }

            return new Status(Status.OK);

        }
Example #3
0
        public override Status Layout(Area area)
        {
            if (marker == MarkerStart)
            {
                marker = 0;
                Page containingPage = area.getPage();
                bestMarker = SearchPage(containingPage);

                if (bestMarker != null)
                {
                    bestMarker.resetMarkerContent();
                    return(bestMarker.LayoutMarker(area));
                }

                AreaTree areaTree = containingPage.getAreaTree();
                if (retrieveBoundary == RetrieveBoundary.PAGE_SEQUENCE)
                {
                    PageSequence pageSequence = areaTree.GetCurrentPageSequence();
                    if (pageSequence == containingPage.getPageSequence())
                    {
                        return(LayoutBestMarker(areaTree.GetCurrentPageSequenceMarkers(), area));
                    }
                }
                else if (retrieveBoundary == RetrieveBoundary.DOCUMENT)
                {
                    return(LayoutBestMarker(areaTree.GetDocumentMarkers(), area));
                }
                else if (retrieveBoundary != RetrieveBoundary.PAGE)
                {
                    throw new FonetException("Illegal 'retrieve-boundary' value");
                }
            }
            else if (bestMarker != null)
            {
                return(bestMarker.LayoutMarker(area));
            }

            return(new Status(Status.OK));
        }
Example #4
0
 private Status LayoutBestMarker(ArrayList markers, Area area)
 {
     if (markers != null)
     {
         for (int i = markers.Count - 1; i >= 0; i--)
         {
             Marker currentMarker = (Marker)markers[i];
             if (currentMarker.GetMarkerClassName().Equals(retrieveClassName))
             {
                 bestMarker = currentMarker;
                 bestMarker.resetMarkerContent();
                 return bestMarker.LayoutMarker(area);
             }
         }
     }
     return new Status(Status.OK);
 }