javafx.scene.layout.VBox.getScene()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(94)

本文整理了Java中javafx.scene.layout.VBox.getScene()方法的一些代码示例,展示了VBox.getScene()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。VBox.getScene()方法的具体详情如下:
包路径:javafx.scene.layout.VBox
类名称:VBox
方法名:getScene

VBox.getScene介绍

暂无

代码示例

代码示例来源:origin: org.copper-engine/copper-monitoring-client

public void updatePreview() {
  if(previewPane != null && previewPane.getScene() != null) {
    try {
      CssConfigurator configurator = new CssConfigurator(currentCssConfig);            
      ObservableList<String> stylesheets = previewPane.getScene().getStylesheets();
      configurator.configure(stylesheets);
    } catch (IOException e) {
      e.printStackTrace();
    }        
  }
}

代码示例来源:origin: org.copper-engine/copper-monitoring-client

public void close() {
    previewPane.getScene().getWindow().hide();
  }
}

代码示例来源:origin: stackoverflow.com

public class HelloScreen {
  private TextField textField ;
  private VBox view ;

  public HelloScreen() {
    Label label = new Label("Name:");
    textField = new TextField();
    HBox hBox = new HBox(10, label,textField);
    hBox.setAlignment(Pos.CENTER);
    Button button = new Button("Show User Input In Console");

    // On click, close the window:
    button.setOnAction( e -> view.getScene().getWindow().hide());

    view = new VBox(10, hBox, button);
    view.setAlignment(Pos.CENTER);
  }

  public String getMessage() {
    return textField.getText();
  }

  public Parent getView() {
    return view ;
  }
}

代码示例来源:origin: org.copper-engine/copper-monitoring-client

@Override
public void run() {
 Window dialog = previewPane.getScene().getWindow();
 
 double currWidth = dialog.getWidth();
 double currHeight = dialog.getHeight();
 dialog.setWidth(Math.max(currWidth, 20 + previewPane.getLayoutX() + previewPane.getPrefWidth()));
 dialog.setHeight(20 + currHeight + previewPane.getPrefHeight());
 updatePreview();
}

代码示例来源:origin: org.copper-engine/copper-monitoring-client

previewPane.setPrefSize(scaledWidth, scaledHeight);
previewPane.getScene();
Platform.runLater(new Runnable() {

代码示例来源:origin: stackoverflow.com

mainContainer.getScene().setCursor(Cursor.HAND);
  };
});
  public void handle(final MouseEvent arg0) {
    mouseKoordinates.set(null);
    mainContainer.getScene().setCursor(Cursor.DEFAULT);

相关文章