You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by gm...@apache.org on 2005/05/09 05:32:11 UTC

cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr ContentLayoutManager.java AbstractLayoutManager.java BasicLinkLayoutManager.java PageSequenceLayoutManager.java LayoutManager.java PageNumberCitationLayoutManager.java

gmazza      2005/05/08 20:32:11

  Modified:    src/java/org/apache/fop/layoutmgr Tag:
                        Temp_KnuthStylePageBreaking
                        ContentLayoutManager.java
                        AbstractLayoutManager.java
                        BasicLinkLayoutManager.java
                        PageSequenceLayoutManager.java LayoutManager.java
                        PageNumberCitationLayoutManager.java
  Log:
  resolveRefID() --> getFirstPVWithID() renaming.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.24.2.6  +2 -2      xml-fop/src/java/org/apache/fop/layoutmgr/ContentLayoutManager.java
  
  Index: ContentLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/ContentLayoutManager.java,v
  retrieving revision 1.24.2.5
  retrieving revision 1.24.2.6
  diff -u -r1.24.2.5 -r1.24.2.6
  --- ContentLayoutManager.java	29 Apr 2005 00:06:21 -0000	1.24.2.5
  +++ ContentLayoutManager.java	9 May 2005 03:32:10 -0000	1.24.2.6
  @@ -255,8 +255,8 @@
       }
   
       /** @see org.apache.fop.layoutmgr.LayoutManager */
  -    public PageViewport resolveRefID(String ref) {
  -        return parentLM.resolveRefID(ref);
  +    public PageViewport getFirstPVWithID(String ref) {
  +        return parentLM.getFirstPVWithID(ref);
       }
   
       /** @see org.apache.fop.layoutmgr.LayoutManager */
  
  
  
  1.41.2.7  +3 -3      xml-fop/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java
  
  Index: AbstractLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java,v
  retrieving revision 1.41.2.6
  retrieving revision 1.41.2.7
  diff -u -r1.41.2.6 -r1.41.2.7
  --- AbstractLayoutManager.java	30 Apr 2005 05:14:08 -0000	1.41.2.6
  +++ AbstractLayoutManager.java	9 May 2005 03:32:10 -0000	1.41.2.7
  @@ -353,12 +353,12 @@
       }
   
       /**
  -     * Delegate resolving the id reference to the parent layout manager.
  +     * Delegate resolving the id reference to the PSLM
        *
        * @see org.apache.fop.layoutmgr.LayoutManager
        */
  -    public PageViewport resolveRefID(String ref) {
  -        return parentLM.resolveRefID(ref);
  +    public PageViewport getFirstPVWithID(String ref) {
  +        return parentLM.getFirstPVWithID(ref);
       }
   
       /**
  
  
  
  1.6.2.1   +5 -5      xml-fop/src/java/org/apache/fop/layoutmgr/BasicLinkLayoutManager.java
  
  Index: BasicLinkLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/BasicLinkLayoutManager.java,v
  retrieving revision 1.6
  retrieving revision 1.6.2.1
  diff -u -r1.6 -r1.6.2.1
  --- BasicLinkLayoutManager.java	13 Nov 2004 20:37:17 -0000	1.6
  +++ BasicLinkLayoutManager.java	9 May 2005 03:32:10 -0000	1.6.2.1
  @@ -51,13 +51,13 @@
            if (fobj.getExternalDestination() != null) {
                area.addTrait(Trait.EXTERNAL_LINK, fobj.getExternalDestination());
            } else {
  -             String link = fobj.getInternalDestination();
  -             PageViewport page = parentLM.resolveRefID(link);
  +             String idref = fobj.getInternalDestination();
  +             PageViewport page = parentLM.getFirstPVWithID(idref);
                if (page != null) {
                    area.addTrait(Trait.INTERNAL_LINK, page.getKey());
                } else {
  -                 LinkResolver res = new LinkResolver(link, area);
  -                 parentLM.addUnresolvedArea(link, res);
  +                 LinkResolver res = new LinkResolver(idref, area);
  +                 parentLM.addUnresolvedArea(idref, res);
                }
            }
        }
  
  
  
  1.50.2.25 +7 -8      xml-fop/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java
  
  Index: PageSequenceLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java,v
  retrieving revision 1.50.2.24
  retrieving revision 1.50.2.25
  diff -u -r1.50.2.24 -r1.50.2.25
  --- PageSequenceLayoutManager.java	7 May 2005 14:35:53 -0000	1.50.2.24
  +++ PageSequenceLayoutManager.java	9 May 2005 03:32:10 -0000	1.50.2.25
  @@ -270,15 +270,14 @@
       }
   
       /**
  -     * Resolve a reference ID.
  -     * This resolves a reference ID and returns the first PageViewport
  -     * that contains the reference ID or null if reference not found.
  +     * This returns the first PageViewport that contains an id trait
  +     * matching the idref argument, or null if no such PV exists.
        *
  -     * @param id the reference ID to lookup
  -     * @return the first page viewport that contains the reference
  +     * @param idref the idref trait needing to be resolved 
  +     * @return the first PageViewport that contains the ID trait
        */
  -    public PageViewport resolveRefID(String id) {
  -        List list = areaTreeHandler.getPageViewportsContainingID(id);
  +    public PageViewport getFirstPVWithID(String idref) {
  +        List list = areaTreeHandler.getPageViewportsContainingID(idref);
           if (list != null && list.size() > 0) {
               return (PageViewport) list.get(0);
           }
  
  
  
  1.21.2.6  +15 -44    xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManager.java
  
  Index: LayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/LayoutManager.java,v
  retrieving revision 1.21.2.5
  retrieving revision 1.21.2.6
  diff -u -r1.21.2.5 -r1.21.2.6
  --- LayoutManager.java	29 Apr 2005 00:06:21 -0000	1.21.2.5
  +++ LayoutManager.java	9 May 2005 03:32:10 -0000	1.21.2.6
  @@ -174,49 +174,6 @@
       PageViewport getCurrentPV();
   
       /**
  -     * Resolve the id reference.
  -     * This is called by an area looking for an id reference.
  -     * If the id reference is not found then it should add a resolvable object.
  -     *
  -     * @param ref the id reference
  -     * @return the page containing the id reference or null if not found
  -     */
  -    PageViewport resolveRefID(String ref);
  -
  -    /**
  -     * Add an id to the page.
  -     * (todo) add the location of the area on the page
  -     *
  -     * @param id the id reference to add.
  -     */
  -    void addIDToPage(String id);
  -
  -    /**
  -     * Add an unresolved area.
  -     * The is used to add a resolvable object to the page for a given id.
  -     *
  -     * @param id the id reference this object needs for resolving
  -     * @param res the resolvable object
  -     */
  -    void addUnresolvedArea(String id, Resolvable res);
  -
  -    /**
  -     * Retrieve a marker.
  -     * This method is used when retrieve a marker.
  -     *
  -     * @param name the class name of the marker
  -     * @param pos the retrieve position
  -     * @param boundary the boundary for retrieving the marker
  -     * @return the layout manaager of the retrieved marker if any
  -     */
  -    Marker retrieveMarker(String name, int pos, int boundary);
  -
  -    /**
  -     * @return the LayoutManagerMaker object.
  -     */
  -    LayoutManagerMaker getLayoutManagerMaker();
  -
  -    /**
        * Load next child LMs, up to child LM index pos
        * @param pos index up to which child LMs are requested
        * @return if requested index does exist
  @@ -264,6 +221,20 @@
       LinkedList getChangedKnuthElements(List oldList, /*int flaggedPenalty,*/
                                          int alignment);
   
  -    public static final int FLAGGED_PENALTY = 50;
  +    /** @see PageSequenceLayoutManager#getFirstPVWithID(String) */
  +    PageViewport getFirstPVWithID(String ref);
  +
  +    /** @see PageSequenceLayoutManager#addIDToPage(String) */
  +    void addIDToPage(String id);
  +
  +    /** @see PageSequenceLayoutManager#addUnresolvedArea(String, Resolvable) */
  +    void addUnresolvedArea(String id, Resolvable res);
  +
  +    /** @see PageSequenceLayoutManager#retrieveMarker(String, int, int) */
  +    Marker retrieveMarker(String name, int pos, int boundary);
  +
  +    /** @see PageSequenceLayoutManager#getLayoutManagerMaker() */
  +    LayoutManagerMaker getLayoutManagerMaker();
   
  +    public static final int FLAGGED_PENALTY = 50;
   }
  
  
  
  1.12.2.1  +2 -2      xml-fop/src/java/org/apache/fop/layoutmgr/PageNumberCitationLayoutManager.java
  
  Index: PageNumberCitationLayoutManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/PageNumberCitationLayoutManager.java,v
  retrieving revision 1.12
  retrieving revision 1.12.2.1
  diff -u -r1.12 -r1.12.2.1
  --- PageNumberCitationLayoutManager.java	6 Feb 2005 20:48:48 -0000	1.12
  +++ PageNumberCitationLayoutManager.java	9 May 2005 03:32:10 -0000	1.12.2.1
  @@ -71,7 +71,7 @@
        * return a resolvable area
        */
       private InlineArea getPageNumberCitationInlineArea(LayoutManager parentLM) {
  -        PageViewport page = parentLM.resolveRefID(fobj.getRefId());
  +        PageViewport page = parentLM.getFirstPVWithID(fobj.getRefId());
           InlineArea inline = null;
           if (page != null) {
               String str = page.getPageNumberString();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org