javafx.scene.Group.setManaged()方法的使用及代码示例

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

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

Group.setManaged介绍

暂无

代码示例

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

text.getStyleClass().setAll("text", "percentage");
final Group group = new Group(fillRect, track, arc, text);
group.setManaged(false);
arcPane = new StackPane(group);
arcPane.setPrefSize(50, 50);

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

public EventMediaPlayerSkin(EventMediaPlayer control, ReadOnlyDoubleProperty parentWidth) {
  super(control);
  this.control = control;
  Group g = new Group();
  g.setManaged(false);
  initializeControl(g, parentWidth);
  getChildren().add(g);
}

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

public EventPlayerFrameSkin(EventPlayerFrame control) {
  super(control);
  this.control = control;
  Group g = new Group();
  g.setManaged(false);
  initializeFrame(g);
  addResizeHandler(g);
  getChildren().add(g);
}

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

private Group createSubTitle() {
  Group g = new Group();
  g.setManaged(false);
  String template = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.CityProductionConsumptionDialog.weekly", new Object[]{}, locale.getCurrentLocal());
  DecoratedText text = textFactory.createDecoratedText(template, new HashMap<>());
  StackPane titlePane = new StackPane();
  titlePane.getChildren().addAll(new PlaceHolder(WIDTH, 1), text);
  g.getChildren().add(titlePane);
  return g;
}

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

private Group createSubTitle() {
  StringBinding fromTo = new DateBoundStringProperty() {
    @Override
    protected String computeValue() {
      // FIXME: 5/15/16 this must go to the text.properties
      return modelTranslator.getStartOfWeek(date.getCurrentDate())+" to "+modelTranslator.getEndOfWeek(date.getCurrentDate());
    }
  };
  Text fromToText = new Text();
  fromToText.textProperty().bind(fromTo);
  fromToText.getStyleClass().add("dialogText");
  fromToText.setLayoutX(100);
  String template = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.TradeOfficeBalanceDialog.forecast", new Object[]{}, locale.getCurrentLocal());
  Text forecast = new Text(template);
  forecast.getStyleClass().add("dialogText");
  forecast.setLayoutX(350);
  Group g = new Group();
  g.setManaged(false);
  
  g.getChildren().addAll(fromToText, forecast);
  return g;
}
@PostConstruct

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

public OpenPatricianLargeWaxButtonSkin(final OpenPatricianLargeWaxButton button) {
  super(button);
  
  InputStream is = getClass().getResourceAsStream("sealingWaxFlattend_long.png");
  Image img = new Image(is);
  final ImageView imageView = new ImageView(img);
  
  final Label label = new Label();
  label.textProperty().bind(button.textProperty());
  label.idProperty().bind(button.idProperty());
  label.getStyleClass().add("OpenPatricianLargeWaxButtonLabeled");
  label.onMouseClickedProperty().bind(button.onActionProperty());
  imageView.onMouseReleasedProperty().bind(button.onActionProperty());
  
  StackPane stack = new StackPane();
  stack.getChildren().addAll(imageView, label);
  Group group = new Group(stack);
  
  group.setManaged(false);
  button.setPrefHeight(img.getHeight());
  button.setPrefWidth(img.getWidth());
  
  getChildren().add(group);
}

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

public OpenPatricianSmallWaxButtonSkin(final OpenPatricianSmallWaxButton button) {
  super(button);
  
  InputStream is = getClass().getResourceAsStream("sealingWaxFlattend.png");
  Image img = new Image(is);
  final ImageView imageView = new ImageView(img);
  final Label label = new Label();
  label.textProperty().bind(button.textProperty());
  label.getStyleClass().add("OpenPatricianSmallWaxButtonLabeled");
  label.onMouseClickedProperty().bind(button.onActionProperty());
  label.textProperty().bind(button.textProperty());
  imageView.onMouseReleasedProperty().bind(button.onActionProperty());
  
  StackPane stack = new StackPane();
  stack.getChildren().addAll(imageView, label);
  Group group = new Group(stack);
  
  group.setManaged(false);
  button.setPrefHeight(img.getHeight());
  button.setPrefWidth(img.getWidth());
  button.setMaxHeight(img.getHeight());
  getChildren().add(group);
}

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

public OpenPatricianWoodenTextInputSkin(OpenPatricianWoodenTextInput input) {
  super(input);
  textField = new TextField(input.getText());
  imgView = new ImageView();
  calculateDimensions(input);
  textField.textProperty().bindBidirectional(input.textProperty());
  textField.getStyleClass().add("openPatricianWoodenTextInput");
  Insets padding = textField.getPadding();
  Insets newPadding = new Insets(0, padding.getRight(), 0, padding.getLeft());
  textField.setPadding(newPadding);
  // Listeners
  input.sizeProperty().addListener((observable, oldValue, newValue) -> calculateDimensions(input));
  textField.heightProperty().addListener((observable, oldValue, newValue) -> {
    Dimension2D dim = sizing.calculate(input.getSize(), input.getFont());
    height.set(Math.max(dim.getHeight(), newValue.doubleValue()));
    setImage();
  });
  
  
  StackPane stack = new StackPane();
  stack.getChildren().addAll(imgView, textField);
  Group group = new Group(stack);
  group.setManaged(false);
  
  getChildren().add(group);
}

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

cityText.getStyleClass().add("dialogText");
Group g = new Group();
g.setManaged(false);

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

cityText.getStyleClass().add("dialogText");
Group g = new Group();
g.setManaged(false);

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

background.setManaged(false);

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

cityText.getStyleClass().add("dialogText");
Group g = new Group();
g.setManaged(false);

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

Group group = new Group(stack);
group.setManaged(false);

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

cityText.getStyleClass().add("dialogText");
Group g = new Group();
g.setManaged(false);

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

public OpenPatricianDialogInputSkin(OpenPatricianDialogInput input) {
  super(input);
  textField = new TextField(input.getText());
  calculateDimensions(input);
  input.fontProperty().addListener((observable, oldValue, newValue) ->
      calculateDimensions(input));
  textField.textProperty().bindBidirectional(input.textProperty());
  textField.getStyleClass().add("openPatricianDialogInput");
  Rectangle background = new Rectangle();
  background.setHeight(height.doubleValue());
  background.setWidth(width.doubleValue());
  background.setFill(Color.rgb(150, 150, 150));
  background.heightProperty().bind(height);
  background.widthProperty().bind(width);
  StackPane stack = new StackPane();
  stack.getChildren().addAll(background, textField);
  Group group = new Group(stack);
  group.setManaged(false);
  getChildren().add(group);
}

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

public OpenPatricianStoneButtonSkin(final OpenPatricianStoneButton button) {
  super(button);
  this.button = button;
  
  
  Dimension2D dim = calculateButtonDimensions(button);
  ImageFactory imageFactory = new ImageFactory();
  Image img = imageFactory.getSlabImage(dim);
  imageView = new ImageView(img);
  button.fontProperty().addListener((observable, oldvalue, newValue) -> calculateNewDimensions());
  
  final Label label = new Label(button.getText()); 
  label.onMouseClickedProperty().bind(button.onActionProperty());
  imageView.onMouseReleasedProperty().bind(button.onActionProperty());
  button.textProperty().addListener((observable, oldValue, newValue) -> calculateNewDimensions());
  
  StackPane stack = new StackPane();
  stack.getChildren().addAll(imageView, label);
  Group group = new Group(stack);
  
  group.setManaged(false);
  
  getChildren().add(group);
}

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

Text text = getHistoryText();
paginationGroup = new Group();
paginationGroup.setManaged(false);
Insets insets = new Insets(0, 10, 0, 70);
Polygon backLabel = createPolygonShape("backButton");
labelShapes.setManaged(false);

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

Text text = getCreditsText();
paginationGroup = new Group();
paginationGroup.setManaged(false);
Insets insets = new Insets(0, 10, 0, 70);
Polygon backLabel = createPolygonShape("backButton");
labelShapes.setManaged(false);

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

foreground.setManaged(false);

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

text.getStyleClass().setAll("text", "percentage");
final Group group = new Group(fillRect, track, arc, text);
group.setManaged(false);
arcPane = new StackPane(group);
arcPane.setPrefSize(50, 50);

相关文章