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

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

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

BorderPane.getStyleClass介绍

暂无

代码示例

代码示例来源:origin: torakiki/pdfsam

@Inject
public OpenWithDialog(StylesConfig styles, List<Module> modules) {
  initModality(Modality.WINDOW_MODAL);
  initStyle(StageStyle.UTILITY);
  setResizable(false);
  setTitle(DefaultI18nContext.getInstance().i18n("Open with"));
  this.modules = modules.stream().sorted(comparing(m -> m.descriptor().getName())).collect(toList());
  messageTitle.getStyleClass().add("-pdfsam-open-with-dialog-title");
  BorderPane containerPane = new BorderPane();
  containerPane.getStyleClass().addAll(Style.CONTAINER.css());
  containerPane.getStyleClass().addAll("-pdfsam-open-with-dialog", "-pdfsam-open-with-container");
  containerPane.setTop(messageTitle);
  BorderPane.setAlignment(messageTitle, Pos.TOP_CENTER);
  filesList.setPrefHeight(150);
  containerPane.setCenter(filesList);
  buttons.getStyleClass().addAll(Style.CONTAINER.css());
  containerPane.setBottom(buttons);
  BorderPane.setAlignment(buttons, Pos.CENTER);
  Scene scene = new Scene(containerPane);
  scene.getStylesheets().addAll(styles.styles());
  scene.setOnKeyReleased(new HideOnEscapeHandler(this));
  setScene(scene);
  eventStudio().addAnnotatedListeners(this);
}

代码示例来源:origin: torakiki/pdfsam

@Inject
public InfoStage(InfoPane infoPane, List<Image> logos, StylesConfig styles) {
  BorderPane containerPane = new BorderPane();
  containerPane.getStyleClass().addAll(Style.CONTAINER.css());
  containerPane.setCenter(infoPane);
  containerPane.setBottom(new ClosePane());
  Scene scene = new Scene(containerPane);
  scene.getStylesheets().addAll(styles.styles());
  scene.setOnKeyReleased(new HideOnEscapeHandler(this));
  setScene(scene);
  setTitle(DefaultI18nContext.getInstance().i18n("Document details"));
  getIcons().addAll(logos);
  setMaximized(true);
}

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

BorderPane pane = null;
 try {
   pane = (BorderPane) FXMLLoader.load(HERENAMECLASS.class.getResource("chat.fxml"));
   pane.getStyleClass().add("main");
 } catch (IOException ex) {
   Logger.getLogger(HERENAMECLASS.class.getName()).log(Level.SEVERE, null, ex);
   System.exit(-1);
 }

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

BorderPane pane = null;
   try {
     pane = (BorderPane) FXMLLoader.load(FILEJAVA.class.getResource("FILE.fxml"));
     pane.getStyleClass().add("main");
   } catch (IOException ex) {
     Logger.getLogger(FILEJAVA.class.getName()).log(Level.SEVERE, null, ex);
     System.exit(-1);
   }

代码示例来源:origin: torakiki/pdfsam

@Inject
public LogStage(LogPane logPane, LogListView logView, List<Image> logos, StylesConfig styles) {
  BorderPane containerPane = new BorderPane();
  containerPane.getStyleClass().addAll(Style.CONTAINER.css());
  containerPane.setCenter(logPane);
  containerPane.setBottom(new ClosePane((a) -> eventStudio().broadcast(HideStageRequest.INSTANCE, "LogStage")));
  Scene scene = new Scene(containerPane);
  scene.getStylesheets().addAll(styles.styles());
  scene.setOnKeyReleased(k -> {
    if (this.isShowing() && new KeyCodeCombination(KeyCode.ESCAPE).match(k)) {
      eventStudio().broadcast(HideStageRequest.INSTANCE, "LogStage");
    }
  });
  setScene(scene);
  setTitle(DefaultI18nContext.getInstance().i18n("Log register"));
  getIcons().addAll(logos);
  setMaximized(true);
  eventStudio().addAnnotatedListeners(this);
  this.onShowingProperty().addListener((o, oldVal, newVal) -> logView.scrollToBottomIfShowing());
  eventStudio().add(logView, LOGSTAGE_EVENTSTATION);
}

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

BorderPane layout = new BorderPane();
layout.setTop(hBox);
layout.getStyleClass().add("rootelement");

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

public static void main(String[] args) {
  launch(args);
}

@Override
public void start(final Stage primaryStage) {

  BorderPane pane = null;
  try {
    pane = (BorderPane) FXMLLoader.load(MAIN.class.getResource("FILE.fxml"));
    pane.getStyleClass().add("main");
  } catch (IOException ex) {

    Logger.getLogger(MAIN.class.getName()).log(Level.SEVERE, null, ex);
    System.exit(-1);
  }

  primaryStage.setScene(new Scene(pane, 1100, 620));
  primaryStage.getScene().getStylesheets().add(MAIN.class.getResource("FILE.css").toExternalForm());
  primaryStage.centerOnScreen();
  primaryStage.setTitle("Title");
  primaryStage.show();

}

代码示例来源:origin: PhoenicisOrg/phoenicis

/**
 * {@inheritDoc}
 */
@Override
public void initialise() {
  final BorderPane container = new BorderPane();
  container.getStyleClass().add("sidebar");
  container.setCenter(createMainContent());
  getChildren().addAll(container);
}

代码示例来源:origin: PhoenicisOrg/phoenicis

/**
 * constructor
 * @param text title which is shown in the tab
 * @param themeManager
 */
public MainWindowView(String text, ThemeManager themeManager) {
  super(text);
  this.themeManager = themeManager;
  this.content = new BorderPane();
  this.content.getStyleClass().add("mainWindowScene");
  this.populateFailurePanel();
  this.waitPanel = createWaitPanel();
  this.content.setCenter(waitPanel);
  this.setContent(content);
}

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

imageViewWrapper.getStyleClass().add("image-view-wrapper");

代码示例来源:origin: PhoenicisOrg/phoenicis

/**
 * {@inheritDoc}
 */
@Override
public void initialise() {
  final BorderPane container = new BorderPane();
  container.getStyleClass().add("detailsPane");
  container.setTop(createHeader());
  container.setCenter(createContent());
  getChildren().addAll(container);
}

代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.dialogs

/**
 * Create the dialog content
 * <p>
 * Subclasses should normally override {@link #createDialogArea()}
 * </p>
 * 
 * @return the content
 */
protected Parent createContents() {
  BorderPane p = new BorderPane();
  p.getStyleClass().add(getClass().getSimpleName());
  HBox box = new HBox();
  box.setPadding(getContentInset());
  Node content = createDialogArea();
  HBox.setHgrow(content, Priority.ALWAYS);
  box.getChildren().add(content);
  p.setCenter(box);
  p.setBottom(createButtonBar());
  return p;
}

代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls

/**
 * Create an area overlay
 * 
 * @param leftRightRatio
 *            the ration used by the left and right areas
 */
public AreaOverlay(double leftRightRatio) {
  getStyleClass().add("area-overlay"); //$NON-NLS-1$
  this.leftRightRatio = leftRightRatio;
  this.left = new BorderPane(new Label("Left")); //$NON-NLS-1$
  this.left.getStyleClass().addAll("left", "area");  //$NON-NLS-1$//$NON-NLS-2$
  this.right = new BorderPane(new Label("Right")); //$NON-NLS-1$
  this.right.getStyleClass().addAll("right", "area");  //$NON-NLS-1$//$NON-NLS-2$
  this.top = new BorderPane(new Label("Top")); //$NON-NLS-1$
  this.top.getStyleClass().addAll("top", "area");  //$NON-NLS-1$//$NON-NLS-2$
  this.bottom = new BorderPane(new Label("Bottom")); //$NON-NLS-1$
  this.bottom.getStyleClass().addAll("bottom", "area");  //$NON-NLS-1$//$NON-NLS-2$
  
  getChildren().addAll(this.left, this.right, this.top, this.bottom);
}

代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls

/**
 * Create an area overlay
 * 
 * @param leftRightRatio
 *            the ration used by the left and right areas
 */
public AreaOverlay(double leftRightRatio) {
  getStyleClass().add("area-overlay"); //$NON-NLS-1$
  this.leftRightRatio = leftRightRatio;
  this.left = new BorderPane(new Label("Left")); //$NON-NLS-1$
  this.left.getStyleClass().addAll("left", "area");  //$NON-NLS-1$//$NON-NLS-2$
  this.right = new BorderPane(new Label("Right")); //$NON-NLS-1$
  this.right.getStyleClass().addAll("right", "area");  //$NON-NLS-1$//$NON-NLS-2$
  this.top = new BorderPane(new Label("Top")); //$NON-NLS-1$
  this.top.getStyleClass().addAll("top", "area");  //$NON-NLS-1$//$NON-NLS-2$
  this.bottom = new BorderPane(new Label("Bottom")); //$NON-NLS-1$
  this.bottom.getStyleClass().addAll("bottom", "area");  //$NON-NLS-1$//$NON-NLS-2$
  
  getChildren().addAll(this.left, this.right, this.top, this.bottom);
}

代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.dialogs

VBox pane = new VBox();
BorderPane titleArea = new BorderPane();
titleArea.getStyleClass().add("titleDialog_TitleArea"); //$NON-NLS-1$
dialogContent.getStyleClass().add("titleDialog_ContentArea"); //$NON-NLS-1$
dialogContent.setCenter(createDialogContent());
dialogContent.setPadding(new Insets(10, 10, 10, 10));

代码示例来源:origin: PhoenicisOrg/phoenicis

/**
 * {@inheritDoc}
 */
@Override
public void initialise() {
  final BorderPane container = new BorderPane();
  container.getStyleClass().add("sidebar");
  // set the search box at the top of the side bar
  container.setTop(createSearchBox());
  // set the main content of the sidebar
  container.setCenter(createMainContent());
  // set the list widget selector at the bottom of the sidebar
  container.setBottom(createListWidgetSelector());
  getChildren().addAll(container);
}

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

public TaskProgressViewSkin(TaskProgressView<T> monitor) {
  super(monitor);
  BorderPane borderPane = new BorderPane();
  borderPane.getStyleClass().add("box");
  // list view
  ListView<T> listView = new ListView<>();
  listView.setPrefSize(500, 400);
  listView.setPlaceholder(new Label("No tasks running"));
  listView.setCellFactory(param -> new TaskCell());
  listView.setFocusTraversable(false);
  Bindings.bindContent(listView.getItems(), monitor.getTasks());
  borderPane.setCenter(listView);
  getChildren().add(listView);
}

代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls

this.clientAreaContainer.getStyleClass().add("efx-dialog-client-area"); //$NON-NLS-1$
setCenter(this.clientAreaContainer);

代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls

this.clientAreaContainer.getStyleClass().add("efx-dialog-client-area"); //$NON-NLS-1$
setCenter(this.clientAreaContainer);

代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.text.ui

public TextViewerHoverManager(TextViewer textViewer) {
  this.textViewer = textViewer;
  this.popup = new PopupWindow() {
  };
  this.popup.setAutoFix(false);
  this.popup.setAutoHide(false);
  this.textViewer.getTextWidget().sceneProperty().addListener( e -> {
    if( textViewer.getTextWidget().getScene() != null ) {
      popup.getScene().getStylesheets().setAll(textViewer.getTextWidget().getScene().getStylesheets());
    }
  });
  root = new BorderPane();
  root.getStyleClass().add("styled-text-hover");
  popup.getScene().setRoot(root);
}

相关文章