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

x33g5p2x  于2022-01-20 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(107)

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

HBox.getWidth介绍

暂无

代码示例

代码示例来源:origin: jfoenixadmin/JFoenix

double dx = lastX - event.getX();
if (Math.abs(dx) > 0.5) {
  double newHVal = (getHvalue() + dx / (container.getWidth()));
  setHvalue(newHVal);

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

public class YourController implements Initializable {

  @FXML HBox   mHBox; 
  @FXML Button mButton;

  @Override
  public void initialize(final URL paramURL, final ResourceBundle paramResourceBundle) {
    Platform.runLater(new Runnable() { public void run() {
      double w0 = mHBox.getWidth();
      double w1 = mButton.getWidth();
      double h0 = mHBox.getHeight();
      double size = Math.min(w0-w1, h0);
      Canvas canvas = new Canvas(size, size);
      mHBox.getChildren().add(0, canvas);
    }});
  }
}

代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay

box.setLayoutX((WIDTH - box.getWidth())/2);
getContent().add(box);

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

clip.setWidth(menu.getWidth());
clip.setHeight(menu.getHeight());
  new KeyValue(clip.arcWidthProperty(), Math.min(b.getWidth(), b.getHeight())),
  new KeyValue(clip.arcHeightProperty(), Math.min(b.getWidth(), b.getHeight())),
  new KeyValue(menu.translateXProperty(), menu.getWidth() - b.getMaxX())));
  new KeyValue(clip.xProperty(), 0),
  new KeyValue(clip.yProperty(), 0),
  new KeyValue(clip.widthProperty(), menu.getWidth()),
  new KeyValue(clip.heightProperty(), menu.getHeight()),
  new KeyValue(clip.arcHeightProperty(), 0),

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

Rectangle rect = new ResizableRectangle(hBox.getWidth(),50);
rect.setFill(Color.RED);
rect.widthProperty().bind(hBox.widthProperty().subtract(20));

代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay

action.setOnAction(createAction(tasks.get(currentIndex.get()), aldermanOffice));
navigationBar.getChildren().addAll(back, action, next);
navigationBar.setLayoutX((CloseButtonDialog.WIDTH - navigationBar.getWidth()) / 2);
navigationBar.widthProperty().addListener((observable, oldWidth, newWidth) ->
    navigationBar.setLayoutX((CloseButtonDialog.WIDTH - newWidth.doubleValue()) / 2));

代码示例来源:origin: com.jfoenix/jfoenix

double dx = lastX - event.getX();
if (Math.abs(dx) > 0.5) {
  double newHVal = (getHvalue() + dx / (container.getWidth()));
  setHvalue(newHVal);

相关文章