Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4107613

RFE: DateFormat/FieldPosition: Need Field info by char position

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.1.4
    • core-libs
    • generic
    • generic



      Name: rm29839 Date: 01/28/98


      I've seen several reports talking about missing
      functionality with DateFormat and FieldPosition.
      My particular problem isn't specifically addressed
      by any of those reports (I believe).

      I'm writing an i18ized DateTime text component. A
      critical need for this is the ability to ask what
      field a particular character position is. When a
      user clicks in the text field, I need to know what
      options they have for manipulating the internal
      time/date value. The only way I can do that is
      to determine exactly what field the cursor is in.

      I don't think it's practical to step through calling
      "format" with FieldPositions set for every possible
      time/date field type until I find the one that my
      character position is in the range of. I suppose I
      can concieve of building a sorted (by beginindex)
      list beforehand, but that still seems pretty painful.
      (Review ID: 23604)
      ======================================================================

            okutsu Masayoshi Okutsu
            rmandelsunw Ronan Mandel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: