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

Clip doesn't work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 7u6
    • Fix Version/s: 7u6
    • Component/s: javafx
    • Labels:
    • Environment:

      2.2.0b12.

      Description

      Run attached code.


      import javafx.application.Application;
      import javafx.scene.Group;
      import javafx.scene.Scene;
      import javafx.scene.control.Button;
      import javafx.scene.control.OverrunStyle;
      import javafx.scene.control.Slider;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;

      public class JavaApplication42 extends Application {

          public static void main(String[] args) {
              launch(args);
          }

          @Override
          public void start(final Stage stage) throws Exception {
              Button button = new Button("One two three four five");
              button.setTextOverrun(OverrunStyle.CLIP);

              Slider slider = new Slider();
              slider.setShowTickLabels(true);
              slider.setShowTickMarks(true);
              slider.valueProperty().bindBidirectional(button.prefWidthProperty());

              Group group = new Group();
              Scene scene = new Scene(group, 300, 300);
              VBox vbox = new VBox(5.0);
              vbox.getChildren().clear();
              vbox.getChildren().addAll(button, slider);
              group.getChildren().clear();
              group.getChildren().addAll(vbox);
              stage.setScene(scene);
              stage.show();
          }
      }

      You can see here:
      http://aurora-ds.ru.oracle.com:9500/runs/70276.ManualSubmit-1/workDir/javafx/scene/control/test/labeled/ToggleButtonsTest_setTextOverrunSingleLineTest/ToggleButtonsTest-setTextOverrunSingleLine.png

      That clip make the same effect, as ellipsis. That makes diff:
      http://aurora-ds.ru.oracle.com:9500/runs/70276.ManualSubmit-1/workDir/javafx/scene/control/test/labeled/ToggleButtonsTest_setTextOverrunSingleLineTest/ToggleButtonsTest-setTextOverrunSingleLine-diff.png

        Attachments

          Activity

            People

            Assignee:
            kwwong Kinsley Wong
            Reporter:
            akirov Alexander Kirov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: