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 2004/01/04 22:14:34 UTC

cvs commit: xml-fop/src/java/org/apache/fop/fo PropertyList.java PropertyManager.java

gmazza      2004/01/04 13:14:34

  Modified:    src/java/org/apache/fop/fo PropertyList.java
                        PropertyManager.java
  Log:
  String->Int conversion: removed String version of PropertyList.get()
  
  Revision  Changes    Path
  1.15      +0 -24     xml-fop/src/java/org/apache/fop/fo/PropertyList.java
  
  Index: PropertyList.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertyList.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- PropertyList.java	2 Jan 2004 22:37:09 -0000	1.14
  +++ PropertyList.java	4 Jan 2004 21:14:34 -0000	1.15
  @@ -274,17 +274,6 @@
           return p;
       }
   
  -
  -    /**
  -     * Return the property on the current FlowObject if it is specified, or if a
  -     * corresponding property is specified. If neither is specified, it returns null.
  -     * @param propertyName name of property
  -     * @return the Property corresponding to that name
  -     */
  -    public Property getSpecified(String propertyName) {
  -        return get(propertyName, false, false);
  -    }
  -
       /**
        * Return the property on the current FlowObject. If it isn't set explicitly,
        * this will try to compute it based on other properties, or if it is
  @@ -295,19 +284,6 @@
        */
       public Property get(int propId) {
           String propertyName = FOPropertyMapping.getPropertyName(propId);
  -        return get(propertyName, true, true);
  -    }
  -
  -    /**
  -     * TEMPORARY until conversion to int's complete
  -     * Return the property on the current FlowObject. If it isn't set explicitly,
  -     * this will try to compute it based on other properties, or if it is
  -     * inheritable, to return the inherited value. If all else fails, it returns
  -     * the default value.
  -     * @param propertyName The name of the property whose value is desired.
  -     * @return the Property corresponding to that name
  -     */
  -    public Property get(String propertyName) {
           return get(propertyName, true, true);
       }
   
  
  
  
  1.19      +14 -21    xml-fop/src/java/org/apache/fop/fo/PropertyManager.java
  
  Index: PropertyManager.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertyManager.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- PropertyManager.java	27 Dec 2003 22:00:38 -0000	1.18
  +++ PropertyManager.java	4 Jan 2004 21:14:34 -0000	1.19
  @@ -50,9 +50,6 @@
    */
   package org.apache.fop.fo;
   
  -// Java
  -import java.text.MessageFormat;
  -
   // FOP
   import org.apache.fop.fonts.Font;
   import org.apache.fop.fo.properties.CommonBorderAndPadding;
  @@ -83,16 +80,15 @@
       private CommonHyphenation hyphProps = null;
       private TextInfo textInfo = null;
   
  -    private static final String[] SA_BEFORE = new String[]{"before"};
  -    private static final String[] SA_AFTER = new String[]{"after"};
  -    private static final String[] SA_START = new String[]{"start"};
  -    private static final String[] SA_END = new String[]{"end"};
  -
  -    private static final MessageFormat MSGFMT_COLOR = new MessageFormat("border-{0}-color");
  -    private static final MessageFormat MSGFMT_STYLE = new MessageFormat("border-{0}-style");
  -    private static final MessageFormat MSGFMT_WIDTH = new MessageFormat("border-{0}-width");
  -    private static final MessageFormat MSGFMT_PADDING = new MessageFormat("padding-{0}");
  -
  +    private static final int[] SA_BEFORE = new int[] {
  +        PR_BORDER_BEFORE_COLOR, PR_BORDER_BEFORE_STYLE, PR_BORDER_BEFORE_WIDTH, PR_PADDING_BEFORE};
  +    private static final int[] SA_AFTER = new int[]{
  +        PR_BORDER_AFTER_COLOR, PR_BORDER_AFTER_STYLE, PR_BORDER_AFTER_WIDTH, PR_PADDING_AFTER};
  +    private static final int[] SA_START = new int[]{
  +        PR_BORDER_START_COLOR, PR_BORDER_START_STYLE, PR_BORDER_START_WIDTH, PR_PADDING_START};
  +    private static final int[] SA_END = new int[]{
  +        PR_BORDER_END_COLOR, PR_BORDER_END_STYLE, PR_BORDER_END_WIDTH, PR_PADDING_END};
  +    
       private static final String NONE = "none";
   
       /**
  @@ -189,18 +185,15 @@
           return borderAndPadding;
       }
   
  -    private void initBorderInfo(int whichSide, String[] saSide) {
  +    private void initBorderInfo(int whichSide, int[] saSide) {
           borderAndPadding.setPadding(whichSide,
  -                                    propertyList.get(
  -                                      MSGFMT_PADDING.format(saSide)).getCondLength());
  +                                    propertyList.get(saSide[3]).getCondLength());
           // If style = none, force width to 0, don't get Color (spec 7.7.20)
  -        int style = propertyList.get(MSGFMT_STYLE.format(saSide)).getEnum();
  +        int style = propertyList.get(saSide[1]).getEnum();
           if (style != Constants.NONE) {
               borderAndPadding.setBorder(whichSide, style,
  -                                       propertyList.get(
  -                                         MSGFMT_WIDTH.format(saSide)).getCondLength(),
  -                                       propertyList.get(
  -                                         MSGFMT_COLOR.format(saSide)).getColorType());
  +                                       propertyList.get(saSide[2]).getCondLength(),
  +                                       propertyList.get(saSide[0]).getColorType());
           }
       }
   
  
  
  

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