javafx.scene.image.ImageView.layoutXProperty()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(182)

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

ImageView.layoutXProperty介绍

暂无

代码示例

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

private ImageView createPirateIndicator() {
  Image shieldImg = imageLoader.getImage("icons/pirateIndicator" );
  ImageView imgView = new ImageView(shieldImg);
  DoubleBinding relYOrigin = shieldYOffsetBinding();
  imgView.layoutYProperty().bind(relYOrigin);
  imgView.layoutXProperty().bind(shipIconView.layoutXProperty());
  return imgView;
}

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

public CoinPriceAlwaysVisible() {
  amount = new SimpleStringProperty(this, "amount", "");
  getStylesheets().add(this.getClass().getResource("icons.css").toExternalForm());
  
  final ImageView imageView = new ImageView(img);
  final Label text = new Label();
  text.getStyleClass().add("iconText");
  text.textProperty().bind(amount);
  imageView.layoutXProperty().bind(text.widthProperty().add(3));
  
  getChildren().addAll(text, imageView);
}
public void setAmount(Integer amount) {

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

public FightingSkillAlwaysVisible() {
  getStylesheets().add(this.getClass().getResource("icons.css").toExternalForm());
  amount = new SimpleStringProperty(this, "amount", "");
  final ImageView imageView = new ImageView(img);
  final Label text = new Label();
  text.getStyleClass().add("iconText");
  text.textProperty().bind(amount);
  imageView.layoutXProperty().bind(text.widthProperty().add(3));
  getChildren().addAll(text, imageView);
}
public void setAmount(Integer amount) {

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

public NavigationSkillAlwaysVisible() {
  getStylesheets().add(this.getClass().getResource("icons.css").toExternalForm());
  amount = new SimpleStringProperty(this, "amount", "");
  final ImageView imageView = new ImageView(img);
  final Label text = new Label();
  text.getStyleClass().add("iconText");
  text.textProperty().bind(amount);
  imageView.layoutXProperty().bind(text.widthProperty().add(3));
  getChildren().addAll(text, imageView);
}
public void setAmount(Integer amount) {

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

public TradingSkillAlwaysVisible() {
  getStylesheets().add(this.getClass().getResource("icons.css").toExternalForm());
  amount = new SimpleStringProperty(this, "amount", "");
  final ImageView imageView = new ImageView(img);
  final Label text = new Label();
  text.getStyleClass().add("iconText");
  text.textProperty().bind(amount);
  imageView.layoutXProperty().bind(text.widthProperty().add(3));
  getChildren().addAll(text, imageView);
}
public void setAmount(Integer amount) {

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

public BaleAmountAlwaysVisible() {
  getStylesheets().add(this.getClass().getResource("icons.css").toExternalForm());
  amount = new SimpleStringProperty(this, "amount", "");
  final ImageView imageView = new ImageView(img);
  final Label text = new Label();
  text.getStyleClass().add("iconText");
  text.textProperty().bind(amount);
  imageView.layoutXProperty().bind(text.widthProperty().add(3));
  getChildren().addAll(text, imageView);
}
public void setAmount(Integer amount) {

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

public BarrelAmountAlwaysVisible() {
  getStylesheets().add(this.getClass().getResource("icons.css").toExternalForm());
  amount = new SimpleStringProperty(this, "amount", "");
  final ImageView imageView = new ImageView(img);
  final Label text = new Label();
  text.getStyleClass().add("iconText");
  text.textProperty().bind(amount);
  imageView.layoutXProperty().bind(text.widthProperty().add(3));
  getChildren().addAll(text, imageView);
}
public void setAmount(Integer amount) {

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

private ImageView createShield(INavigableVessel vessel) {
  Image shieldImg = imageLoader.getImage("icons/Shield_" + getShieldColorName(vessel));
  ImageView imgView = new ImageView(shieldImg);
  imgView.setLayoutX(shipIconView.getLayoutX());
  DoubleBinding relYOrigin = shieldYOffsetBinding();
  imgView.layoutYProperty().bind(relYOrigin);
  imgView.layoutXProperty().bind(shipIconView.layoutXProperty());
  return imgView;
}

代码示例来源:origin: Tristan971/Lyrebird

EMBEDDED_MEDIA_RECTANGLE_CORNER_RADIUS
);
clipRectangle.layoutXProperty().bind(imageView.layoutXProperty());
clipRectangle.layoutYProperty().bind(imageView.layoutYProperty());
imageView.setClip(clipRectangle);

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

DoubleBinding relYOrigin = shieldYOffsetBinding().add(2);
shipGroupSize.layoutYProperty().bind(relYOrigin);
shipGroupSize.layoutXProperty().bind(shipIconView.layoutXProperty().add(4));
Color shieldColor = getShieldBaseColor(vessel);
Color textColor = calculateContrastColor(shieldColor);

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

final ImageView imageView = new ImageView(compassIcon);
  imageView.setId("captainIcon");
  imageView.layoutXProperty().bind(sailorsOnShip2.widthProperty().add(3));
  g.getChildren().addAll(sailorsOnShip2, imageView);
} else {

相关文章