javafx.scene.control.Button.setVisible()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(9.3k)|赞(0)|评价(0)|浏览(196)

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

Button.setVisible介绍

暂无

代码示例

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

@Override
  protected void layoutChildren() {
    final boolean showClose = showCloseButton();
    closeButton.setManaged(showClose);
    closeButton.setVisible(showClose);
    pseudoClassStateChanged(CLOSABLE, showClose);
    rippler.resizeRelocate(0,0, getWidth(), getHeight());
  }
}

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

protected void beginFiltering() {
 filterButton.setVisible(false);
 filterTextField.setVisible(true);
 closeFilterButton.setVisible(true);
 if(toolbar != null) {
  toolbar.setVisible(false);
 }
}

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

protected void endFiltering() {
 filterButton.setVisible(true);
 filterTextField.setVisible(false);
 closeFilterButton.setVisible(false);
 if(toolbar != null) {
  toolbar.setVisible(true);
 }
}

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

@Override
public void updateLocation(UpdateCurrentLocationEvent current) {
 // do nothing
 locationContainer.setVisible(false);
 final boolean hasPrevious = current.isHasPrevious();
 backIcon.setVisible(hasPrevious);
}

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

public void reinit() {
  isNavigatingTabContent = false;
  locationContainer.setVisible(false);
  backIcon.setVisible(false);
  primaryMenuButton.getDisplay().setVisible(true);
 }
}

代码示例来源:origin: it.unibo.alchemist/alchemist-projectview

private void setVisibilityBatch(final boolean visibility) {
  this.batch.setVisible(visibility);
  this.listYaml.setVisible(visibility);
  this.spinBatch.setVisible(visibility);
  this.thread.setVisible(visibility);
}

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

@Override
public void updateLocation(UpdateCurrentLocationEvent current) {
 Node location = current.getLocationNode();
 boolean hasPrevious = current.isHasPrevious();
 backIcon.setVisible(hasPrevious);
 Platform.runLater(() -> {
  currentLocation.getChildren().clear();
  currentLocation.getChildren().add(location);
 });
}

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

@Override
public void updateLocation(UpdateCurrentLocationEvent current) {
 // do nothing
 locationContainer.setVisible(false);
 isNavigatingTabContent = current.isTabContentNavigation();
 final boolean hasPrevious = current.isHasPrevious();
 backIcon.setVisible(hasPrevious);
 primaryMenuButton.getDisplay().setVisible(!hasPrevious);
}

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

@Override
  protected void layoutChildren() {
    final boolean showClose = showCloseButton();
    closeButton.setManaged(showClose);
    closeButton.setVisible(showClose);
    pseudoClassStateChanged(CLOSABLE, showClose);
    rippler.resizeRelocate(0,0, getWidth(), getHeight());
  }
}

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

@Override
public void initialize() {
  updateService.getLatestVersion()
         .thenAcceptAsync(this::displayVersion, Platform::runLater);
  final boolean canSelfupdate = UpdateService.selfupdateCompatible();
  updateButton.setVisible(canSelfupdate);
  updateButton.setManaged(canSelfupdate);
  updateButton.setOnAction(e -> {
    this.updateButton.setDisable(true);
    this.updateService.selfupdate();
  });
}

代码示例来源:origin: it.unibo.alchemist/alchemist-projectview

private void setComponentVisible(final ToggleSwitch ts, final boolean vis) {
  if (ts.equals(this.tsOut)) {
    this.setOut.setVisible(vis);
    this.pathOut.setVisible(vis);
    this.baseNameOut.setVisible(vis);
    this.bnTextOut.setVisible(vis);
    this.intOut.setVisible(vis);
    this.unitOut.setVisible(vis);
    this.spinOut.setVisible(vis);
    this.imgViewOut.setVisible(vis);
  } else {
    if (ts.isSelected() && this.pathYaml.getText().equals("")) {
      setAlert(RESOURCES.getString("file_no_selected"), RESOURCES.getString("yaml_no_selected_header"),
          RESOURCES.getString("yaml_no_selected_content"));
      setVisibilityBatch(false);
      ts.setSelected(false);
    } else {
      setVisibilityBatch(vis);
      if (ts.isSelected()) {
        setVariablesList();
      }
    }
  }
}

代码示例来源:origin: nl.cloudfarming.client/calendar-api

void rangeFromGraph(boolean fromGraph) {
  if (fromGraph) {
    if (boundsButtonsGroup.getSelectedToggle() != null) {
      lastToggleButton = boundsButtonsGroup.getSelectedToggle();
      boundsButtonsGroup.selectToggle(null);
    }
    Object[] range = (Object[]) xAxis.getRange();
    DateTime minDate = (DateTime) range[0];
    DateTime maxDate = (DateTime) range[1];
    DateBounds dateBounds = new DateBounds(minDate, maxDate);
    if (lastDateBounds != null) {
      boundsHistory.push(lastDateBounds);
    }
    lastDateBounds = dateBounds;
  } else {
    boundsHistory.clear();
    if (lastToggleButton != null) { 
      if (boundsButtonsGroup.getSelectedToggle() != lastToggleButton) {
        boundsButtonsGroup.selectToggle(lastToggleButton);
      }
      lastToggleButton = null;
    }
  }
  buttonNext.setDisable(fromGraph);
  buttonPrevious.setDisable(fromGraph);
  buttonBack.setVisible(fromGraph);
}

代码示例来源:origin: org.jrebirth.af.showcase/todos

/**
 * {@inheritDoc}
 */
@SuppressWarnings("unchecked")
@Override
protected void initView() {
  this.done = new CheckBox();
  this.contentLabel = new Label();
  this.deleteButton = new Button();
  FontAwesome.remove.use(this.deleteButton, 12);
  node().getChildren().addAll(this.done, this.contentLabel, this.deleteButton);
  this.deleteButton.setVisible(false);
  /*
   *
   * contentInput.visibleProperty().bind(viewModel.editModeProperty());
   *
   * contentInput.setOnAction(event -> viewModel.editModeProperty().set(false)); contentInput.focusedProperty().addListener((obs, oldV, newV) -> { if (!newV) {
   * viewModel.editModeProperty().set(false); } });
   *
   * contentBox.visibleProperty().bind(viewModel.editModeProperty().not()); done.visibleProperty().bind(viewModel.editModeProperty().not());
   *
   * contentLabel.textProperty().bind(viewModel.contentProperty()); contentLabel.setOnMouseClicked(event -> { if (event.getClickCount() > 1) { viewModel.editModeProperty().set(true);
   * contentInput.requestFocus(); } });
   *
   *
   * viewModel.textStrikeThrough().addListener((obs, oldV, newV) -> { if (newV) { contentLabel.getStyleClass().add(STRIKETHROUGH_CSS_CLASS); } else {
   * contentLabel.getStyleClass().remove(STRIKETHROUGH_CSS_CLASS); } });
   */
}

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

filterButton.setVisible(false);
filterTextField.setVisible(true);
closeFilterButton.setVisible(false);
closeFilterButton.setOnAction(e -> endFiltering());
actionsAndFiltersContainer.getChildren().add(0, closeFilterButton);

代码示例来源:origin: nl.cloudfarming.client/calendar-api

buttonBack = new Button(org.openide.util.NbBundle.getMessage(
    CalendarComponent.class, "CalendarComponent.button.back"));
buttonBack.setVisible(false);

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

backIcon.setVisible(hasPrevious);
if (topToolbar.getChildren().size() == 1) {
 Platform.runLater(() -> {

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

/**
 * Constructor
 */
public SingleLocationPrimaryMenuWithNavigationBar() {
 super();
 IconUtils.setHeaderNavigationBack(backIcon);
 backIcon.setOnAction(e -> goBack());
 backIcon.getStyleClass().remove("jfx-button");
 backIcon.getStyleClass().remove("button");
 backIcon.managedProperty().bind(backIcon.visibleProperty());
 backIcon.setVisible(false);
 final HBox box = NodeHelper.wrapInHbox(backIcon);
 box.getStyleClass().add("ep-navbar-top-toolbar-back-icon-container");
 topToolbar.getChildren().addAll(box, locationContainer);
 getChildren().addAll(topToolbar, bottomToolbar);
 topToolbar.getStyleClass().add("ep-primary-menu-with-navbar-top-toolbar");
 bottomToolbar.getStyleClass().add("ep-primary-menu-with-navbar-bottom-toolbar");
 getStyleClass().add("ep-primary-menu-with-navbar-toolbar");
 // location0.getStyleClass().add("current-location-item-label");
 topToolbar.minWidthProperty().bind(topToolbar.prefWidthProperty());
 topToolbar.minHeightProperty().bind(topToolbar.prefHeightProperty());
 topToolbar.maxHeightProperty().bind(topToolbar.prefHeightProperty());
 bottomToolbar.minWidthProperty().bind(bottomToolbar.prefWidthProperty());
 bottomToolbar.minHeightProperty().bind(bottomToolbar.prefHeightProperty());
 bottomToolbar.maxHeightProperty().bind(bottomToolbar.prefHeightProperty());
 bottomToolbar.managedProperty().bind(bottomToolbar.visibleProperty());
 NodeHelper.setHVGrow(topToolbar, bottomToolbar, this);
 bottomToolbar.setVisible(false);
}

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

/**
 * @{inheritedDoc}
 */
@Override
public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) {
 this.controller = (AbstractViewController) controller;
 backIcon = new Button();
 backIcon.setOnAction(e -> goBack());
 IconUtils.setHeaderNavigationBack(backIcon);
 backIcon.getStyleClass().addAll("ep-headerless-app-header-button", "hand-hover");
 backIcon.setDisable(true);
 backIcon.setVisible(true);
 backIcon.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
 backIcon.setAlignment(Pos.CENTER);
 getChildren().addAll(backIcon);
 getStyleClass().addAll("hand-hover");
 //getStyleClass().add("ep-primary-menu-with-navbar-top-toolbar");
 //getStyleClass().add("ep-primary-menu-with-navbar-toolbar");
 setAlignment(Pos.CENTER);
 setMinHeight(54);
 addEventFilter(MouseEvent.MOUSE_CLICKED, e->{
 });
}

代码示例来源:origin: org.controlsfx/controlsfx

button.setVisible(false);
button.setPrefHeight(1);

代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

fullscreen.setVisible(false);
fullscreen.setTooltip(new Tooltip("FullScreen"));
fullscreen.setOnAction(t -> switchFullscreen());

相关文章