classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Field position attribute handling


From: Dalibor Topic
Subject: [PATCH] Field position attribute handling
Date: Sat, 15 Nov 2003 19:43:13 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312

Hi all,

attached is another small patch from Guilhem adding missing methods in FieldPosition. Please review & check in.

cheers,
dalibor topic

2003-11-15 Guilhem Lavaux <address@hidden>

        * java/text/FieldPosition.java (field_attribute): New field.
        (FieldPosition (Format.Field), FieldPosition(Format.Field, int),
        getFieldAttribute) New methods.

--- /var/tmp/PROJECTS/classpath//./java/text/FieldPosition.java Tue Jan 22 
23:27:01 2002
+++ java/text/FieldPosition.java        Tue Aug 26 11:29:53 2003
@@ -65,6 +65,38 @@
   private int end;
 
   /**
+   * This is the field attribute value.
+   */
+  private Format.Field field_attribute;
+
+  /**
+   * This method initializes a new instance of <code>FieldPosition</code>
+   * to have the specified field attribute. The attribute will be used as
+   * an id.
+   *
+   * @param field The field format attribute.
+   */
+  public FieldPosition (Format.Field field)
+  {
+    this.field_attribute = field;
+  }
+
+  /**
+   * This method initializes a new instance of <code>FieldPosition</code>
+   * to have the specified field attribute. The attribute will be used as
+   * an id is non null. The integer field id is only used if the Format.Field
+   * attribute is not used by the formatter.
+   *
+   * @param field The field format attribute.
+   * @param field_id The field identifier value.
+   */
+  public FieldPosition (Format.Field field, int field_id)
+  {
+    this.field_attribute = field;
+    this.field_id = field_id;
+  }
+
+  /**
    * This method initializes a new instance of <code>FieldPosition</code> to
    * have the specified field id.
    *
@@ -83,6 +115,11 @@
   public int getField ()
   {
     return field_id;
+  }
+
+  public Format.Field getFieldAttribute ()
+  {
+    return field_attribute;
   }
 
   /**

reply via email to

[Prev in Thread] Current Thread [Next in Thread]