Esempio n. 1
0
  public RNADrawingView() {

    // set up gui
    drawingPane.setPrefWidth(400);
    drawingPane.setPrefHeight(400);
    warningLabel.setTextFill(Color.RED);
    animateCheckbox.setSelected(false);

    buttonBox.getChildren().addAll(foldButton, drawButton, animateCheckbox);
    inputBox.getChildren().addAll(sequenceField, bracketField, buttonBox);
    buttonInputBox.getChildren().addAll(inputBox, warningLabel, buttonBox);
    drawingPane.getChildren().add(drawing);
    root.setTop(buttonInputBox);
    root.setBottom(drawingPane);

    buttonBox.setAlignment(Pos.BOTTOM_LEFT);
    inputBox.setPadding(new Insets(10, 5, 10, 5));
    HBox.setMargin(foldButton, new Insets(0, 2.5, 0, 2.5));
    HBox.setMargin(drawButton, new Insets(0, 2.5, 0, 2.5));
    HBox.setMargin(animateCheckbox, new Insets(0, 2.5, 0, 2.5));
    VBox.setMargin(sequenceField, new Insets(0, 0, 5, 0));

    this.scene = new Scene(root);
    scene.getStylesheets().add("resources/assignment6and7.css");
    drawingPane.getStyleClass().add("drawingPane");
  }
 public void setNav(Pane nav) {
   this.nav = nav;
   nav.setPrefWidth(DEFAULT_WIDTH_NAV);
   AnchorPane.setTopAnchor(nav, 0d);
   AnchorPane.setBottomAnchor(nav, 0d);
   getChildren().add(nav);
 }
  public SimpleScrollableVisualScene(double contentPrefWidth, double contentPrefHeight) {
    this.rotationProperty = new SimpleDoubleProperty(0);
    this.scaleProperty = new SimpleDoubleProperty(1);

    this.layers = new HashMap<>();
    this.entities = new HashMap<>();

    pane = new Pane();
    pane.setPrefWidth(contentPrefWidth);
    pane.setPrefHeight(contentPrefHeight);
    setContent(pane);

    setHbarPolicy(ScrollPane.ScrollBarPolicy.ALWAYS);
  }
Esempio n. 4
0
  public Progress(Stage owner) {
    this.owner = owner;

    Pane content = new Pane();
    content.setPrefWidth(200);
    content.setPrefHeight(200);
    indicator = new ProgressIndicator(-1.0);
    indicator.setStyle(" -fx-progress-color: white;");
    indicator.setTranslateX(60);
    indicator.setTranslateY(60);
    indicator.setPrefWidth(80);
    indicator.setPrefHeight(80);
    Rectangle back = new Rectangle(100, 100);
    back.setFill(Color.color(0, 0, 0, 0.5));
    back.setArcHeight(10);
    back.setArcWidth(10);
    back.setTranslateX(50);
    back.setTranslateY(50);
    content.getChildren().addAll(back, indicator);

    popup = new Popup();
    popup.getContent().addAll(content);
    popup.setAutoFix(true);
  }