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

Painter initialization problem

XMLWordPrintable

      FULL PRODUCT VERSION :
      java version "1.6.0_12"
      Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
      Java HotSpot(TM) Client VM (build 11.2-b01, mixed mode, sharing)

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

      A DESCRIPTION OF THE PROBLEM :
      After GlyphView.breakView call, painter not initialized by new GlyphPainter2, like in JDK1.5.
      JDK1.6 doesn't call TextLayoutStrategy.createView for the new view anymore, so, there is no call '((GlyphView)frag).setGlyphPainter(new GlyphPainter2(tl));'


      Stacktrace from JDK1.6.0_12(ViewLabel is my class):
      1.6 createFragment
      ViewLabel.createFragment(int, int) line: 122
      ViewLabel(GlyphView).breakView(int, int, float, float) line: 714
      TextLayoutStrategy(FlowView$FlowStrategy).layoutRow(FlowView, int, int) line: 541
      TextLayoutStrategy.layoutRow(FlowView, int, int) line: 109
      TextLayoutStrategy(FlowView$FlowStrategy).layout(FlowView) line: 460
      TextLayoutStrategy.layout(FlowView) line: 92
      ViewParagraph(FlowView).layout(int, int) line: 184
      ViewParagraph(BoxView).setSize(float, float) line: 380
      BoxView.updateChildSizes() line: 349
      BoxView.setSpanOnAxis(int, float) line: 331

      Stacktrace from JDK 1.5.0_12(ViewLabel is my class):
      1.5 createFragment
      ViewLabel.createFragment(int, int) line: 122
      TextLayoutStrategy.createView(FlowView, int, int, int) line: 179
      TextLayoutStrategy(FlowView$FlowStrategy).layoutRow(FlowView, int, int) line: 460
      TextLayoutStrategy.layoutRow(FlowView, int, int) line: 109
      TextLayoutStrategy(FlowView$FlowStrategy).layout(FlowView) line: 416
      TextLayoutStrategy.layout(FlowView) line: 92
      ViewParagraph(FlowView).layout(int, int) line: 184
      ViewParagraph(BoxView).setSize(float, float) line: 379
      BoxView.updateChildSizes() line: 348
      BoxView.setSpanOnAxis(int, float) line: 330
      BoxView.layout(int, int) line: 682
      BoxView.setSize(float, float) line: 379
      BoxView.updateChildSizes() line: 348

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      ((GlyphView)frag).setGlyphPainter(new GlyphPainter2(tl)) should be called for new view in the TextLayoutStrategy(FlowView$FlowStrategy).layoutRow
      ACTUAL -
      ((GlyphView)frag).setGlyphPainter(new GlyphPainter2(tl)) doesn't called for new view in the TextLayoutStrategy(FlowView$FlowStrategy).layoutRow

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Override LabelView by own class and override method:

        public View createFragment(int p0, int p1) {
              GlyphView r= (GlyphView)super.createFragment(p0, p1);
              r.setGlyphPainter(getGlyphPainter());
              return r;
          }

      Release Regression From : 5
      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
            igor Igor Nekrestyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: