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

Wrong bounds at Text and Label

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: fx1.2.1
    • Fix Version/s: fx1.3
    • Component/s: javafx
    • Labels:

      Description

      Label or Text present wrong bounds.
      When using Japanese characters, the influence can not be disregarded.

      Please fix this bugs.
      see: http://javafx-jira.kenai.com/browse/RT-2839
      ----
      import javafx.stage.Stage;
      import javafx.scene.Scene;
      import javafx.scene.text.TextOrigin;
      import javafx.scene.shape.Rectangle;

      import javafx.scene.text.Text;

      var textA: Text = Text {
          layoutY: 10
          content: "ABCDEF"
          textOrigin: TextOrigin.TOP
      }
      var rectA:Rectangle = Rectangle{
          layoutY: 10
          width: bind textA.boundsInLocal.width, height: 5
          opacity: 0.4
      }
      var textB: Text = Text {
          layoutY: 30
          content: "???????"
          textOrigin: TextOrigin.TOP
      }
      var rectB:Rectangle = Rectangle{
          layoutY: 30
          width: bind textB.boundsInLocal.width, height: 5
          opacity: 0.4
      }
      Stage {
          title: "Application title"
          width: 250
          height: 80
          scene: Scene {
              content: [
                  textA, textB, rectA, rectB
              ]
          }
      }

        Attachments

          Activity

            People

            • Assignee:
              amfowler Anne Fowler (Inactive)
              Reporter:
              duke J. Duke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: