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

Clip doesn't work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 7u6
    • 7u6
    • javafx
    • 2.2.0b12.

      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

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

              Created:
              Updated:
              Resolved:
              Imported: