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

ParagraphView with getMinimumSpan() returning 0 no longer hidden

XMLWordPrintable

      FULL PRODUCT VERSION :
      java version "1.6.0_02"
      Java(TM) SE Runtime Environment (build 1.6.0_02-b06)
      Java HotSpot(TM) Client VM (build 1.6.0_02-b06, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :

      My application implements an editor with a text block expansion/collapse functionality to hide certain lines in the editor. This was implented by extending ParagraphView and overriding getMinimumSpan() to return '0' for the hidden lines.

      This works perfectly in JRE5 and JRE6 update 1 but is not working in JRE6 update 2. It is critical that this be fixed.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      (1) Implement a class that extends ParagraphView and overrides getMinimumSpan() to return '0f' for certain lines
      (2) Implement a class that extends ViewFactory that overrides 'create()' to return the above class for elements named AbstractDocument.ParagraphElementName
      (3) Implement a class that extends StyledEditorKit that overrides 'getViewFactory()' to return an instance of the new factory from step (2)
      (4) Create a Document() based on the editor kit from step(3), add text to the document

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      In JRE5 and JRE6 update 1 the lines with zero span are not rendered
      ACTUAL -
      With JRE 6 update 2 the lines are all rendered on top of one another

      REPRODUCIBILITY :
      This bug can be reproduced always.

      Release Regression From : 5.0u12
      The above release value was the last known release where this
      bug was not reproducible. Since then there has been a regression.

            peterz Peter Zhelezniakov
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: