예제 #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");
  }
예제 #2
0
 public void setAnimationCheckboxHandler(EventHandler<ActionEvent> handler) {
   animateCheckbox.setOnAction(handler);
 }
예제 #3
0
 public BooleanProperty getAnimatedCheckboxSelectedProperty() {
   return animateCheckbox.selectedProperty();
 }