java类javafx.scene.control.Separator的实例源码

CheckListView.java 文件源码 项目:marathonv5 阅读 37 收藏 0 点赞 0 评论 0
private void initComponents(boolean selectable) {
    initVerticalButtonBar();
    pane = new ScrollPane();
    HBox.setHgrow(pane, Priority.ALWAYS);
    setCenter(pane);
    if (selectable) {
        setRight(verticalButtonBar);
        verticalButtonBar.setStyle("-fx-padding: 5px");
        verticalButtonBar.setDisable(true);
    }
    VBox titleBox = new VBox();
    Label titleLabel = new Label("Editing CheckList", FXUIUtils.getIcon("newCheckList"));
    titleLabel.getStyleClass().add("modaldialog-title");
    titleBox.getChildren().add(titleLabel);
    titleBox.getChildren().add(new Separator());
    setTop(titleBox);
}
HelloRecurrenceView.java 文件源码 项目:CalendarFX 阅读 31 收藏 0 点赞 0 评论 0
@Override
protected Node createControl() {
    RecurrenceView view = new RecurrenceView();

    Label label = new Label("Rule: " + view.getRecurrenceRule());
    label.setMaxWidth(300);
    label.setWrapText(true);

    view.recurrenceRuleProperty().addListener(it -> label.setText(view.getRecurrenceRule()));

    Separator separator = new Separator(Orientation.HORIZONTAL);

    VBox box = new VBox(20);
    box.setFillWidth(true);
    box.getChildren().addAll(view, separator, label);
    box.setAlignment(Pos.CENTER);

    return box;
}
FormDialog.java 文件源码 项目:redisfx 阅读 46 收藏 0 点赞 0 评论 0
public FormDialog(Stage owner) {
    VBox root = new VBox(10);
    root.setPadding(new Insets(10));
    root.getChildren().addAll(
            getContentPane(),
            new Separator(Orientation.HORIZONTAL),
            getButtonsPane()
    );
    root.getStylesheets().add("css/style.css");
    root.setMinWidth(200);
    root.setMinHeight(100);
    setScene(new Scene(root));

    if (owner != null) {
        this.initModality(Modality.WINDOW_MODAL);
        this.initOwner(owner);
    }

    Icons.Logo.setToStage(this);

    okButton.setOnAction(this::okButtonClicked);
    cancelButton.setOnAction(this::cancelButtonClicked);
    this.setOnCloseRequest(this::closeButtonClicked);
}
StatusBarManager.java 文件源码 项目:CSS-Editor-FX 阅读 38 收藏 0 点赞 0 评论 0
private void initBar() {
  length.textProperty().bind(map(getCodeAreaValue(c -> c.textProperty()), t -> t.length()));
  lines.textProperty().bind(map(getCodeAreaValue(c -> c.textProperty()), t -> StringUtil.countLine(t)));
  caretLine.textProperty().bind(
      map(getCodeAreaValue(c -> c.caretPositionProperty()), t -> StringUtil.countLine(area.getValue().getText().substring(0, t))));
  caretColumn.textProperty().bind(map(getCodeAreaValue(c -> c.caretColumnProperty()), t -> t));
  select.textProperty().bind(mapString(getCodeAreaValue(c -> c.selectedTextProperty()), t -> t.length() + " | " + StringUtil.countLine(t)));
  charset.textProperty().bind(mapString(Options.charset.property(), t -> t.toString()));
  inputType.textProperty().bind(Bindings.when(yep(overrideProperty)).then("Override").otherwise("Insert"));

  bar.getRightItems().addAll(
      margin(new Text("lines"), 0, 5), minWidth(lines, 60),
      margin(new Text("length"), 0, 5), minWidth(length, 70),
      new Separator(Orientation.VERTICAL),
      margin(new Text("Col"), 0, 5), minWidth(caretColumn, 60),
      margin(new Text("Line"), 0, 5), minWidth(caretLine, 60),
      new Separator(Orientation.VERTICAL),
      margin(new Text("Sel"), 0, 5), minWidth(select, 90),
      new Separator(Orientation.VERTICAL),
      minWidth(charset, 60),
      new Separator(Orientation.VERTICAL),
      minWidth(inputType, 60),
      new Separator(Orientation.VERTICAL)
      );
}
HistoryListPopup.java 文件源码 项目:arma-dialog-creator 阅读 37 收藏 0 点赞 0 评论 0
public HistoryListPopup(@Nullable String popupTitle, @NotNull HistoryListProvider provider) {
    super(ArmaDialogCreator.getPrimaryStage(), new VBox(5), popupTitle);
    this.provider = provider;

    myRootElement.setPadding(new Insets(10));
    final ScrollPane scrollPane = new ScrollPane(stackPaneWrapper);
    VBox.setVgrow(scrollPane, Priority.ALWAYS);
    scrollPane.setFitToHeight(true);
    scrollPane.setFitToWidth(true);
    scrollPane.setStyle("-fx-background-color:transparent");

    myRootElement.getChildren().addAll(scrollPane, new Separator(Orientation.HORIZONTAL), getBoundResponseFooter(false, true, false));

    gridPaneContent.setVgap(15);
    gridPaneContent.setHgap(5);
    ColumnConstraints constraints = new ColumnConstraints(-1, -1, Double.MAX_VALUE, Priority.ALWAYS, HPos.CENTER, true);
    gridPaneContent.getColumnConstraints().addAll(constraints, constraints);

    myStage.setMinWidth(320);
    myStage.setMinHeight(320);
    myStage.setWidth(480);

    stackPaneWrapper.setPrefHeight(320);

    fillContent();
}
DragDropWithControls.java 文件源码 项目:openjfx-8u-dev-tests 阅读 30 收藏 0 点赞 0 评论 0
private Parent createRightPane() {
    HBox hbox = new HBox(10);

    VBox lbox = new VBox(10);
    lbox.getChildren().addAll(targetControlPane, new Separator(), new Text("Target control type:"),
            createControlCombo(targetControlPane, false), new Text("Target transfer modes:"), createTMSelect(targetModes));

    VBox rbox = new VBox(10);
    rbox.getChildren().addAll(new Text("Data formats:"), createFormatSelect(targetFormats),
            ButtonBuilder.create().text("paste from clipboard").id(ID_FROM_CLIPBOARD_BUTTON).onAction(new EventHandler<ActionEvent>() {
        public void handle(ActionEvent t) {
            getDataFromClipboard(Clipboard.getSystemClipboard());
        }
    }).build());

    VBox content = new VBox(10);
    content.getChildren().addAll(new Text("Transfered content:"), transferedContentPane);

    hbox.getChildren().addAll(lbox, new Separator(Orientation.VERTICAL), rbox,
            new Separator(Orientation.VERTICAL), content);
    if (parameters.size() > 0) {
        hbox.setStyle("-fx-background-color: " + parameters.get(0) + ";");
    }
    return hbox;
}
SeparatorApp.java 文件源码 项目:openjfx-8u-dev-tests 阅读 39 收藏 0 点赞 0 评论 0
@Override
public Node drawNode() {
    HBox root = new HBox();
    root.setSpacing(spacing);
    for (HPos pos : HPos.values()) {
        Separator separator = getSeparator();
        separator.setHalignment(pos);
        if (separator.getHalignment() != pos) {
            reportGetterFailure("separator.setHalignment()");
        }
        VBox box = new VBox();
        box.getChildren().addAll(new Label("[" + pos.name() + "]"), separator);
        root.getChildren().add(box);
    }
    return root;
}
SeparatorApp.java 文件源码 项目:openjfx-8u-dev-tests 阅读 40 收藏 0 点赞 0 评论 0
@Override
public Node drawNode() {
    HBox root = new HBox();
    root.setSpacing(spacing);
    for (VPos pos : VPos.values()) {
        Separator separator = getSeparator();
        separator.setValignment(pos);
        if (separator.getValignment() != pos) {
            reportGetterFailure("separator.setHalignment()");
        }
        VBox box = new VBox();
        box.getChildren().addAll(new Label("[" + pos.name() + "]"), separator);
        root.getChildren().add(box);
    }
    return root;
}
SimpleConfigurationTitle.java 文件源码 项目:JttDesktop 阅读 28 收藏 0 点赞 0 评论 0
/**
 * Constructs a new {@link SimpleConfigurationTitle}.
 * @param title the {@link String} title.
 * @param description the {@link String} description.
 * @param styling the {@link JavaFxStyle} to use.
 */
SimpleConfigurationTitle( String title, String description, JavaFxStyle styling ) {
   if ( title == null ) {
      throw new IllegalArgumentException( "Title string must not be null." );
   }

   this.title = title;
   this.description = description;

   Label titleLabel = styling.createBoldLabel( title );
   titleLabel.setAlignment( Pos.CENTER_LEFT );
   getChildren().add( titleLabel );

   if ( description != null ) {
      Label descriptionLabel = styling.createWrappedTextLabel( description );
      getChildren().add( descriptionLabel );
   }

   getChildren().add( new Separator() );

   setSpacing( SPACING );
}
UpcomingController.java 文件源码 项目:drbookings 阅读 36 收藏 0 点赞 0 评论 0
private static void addCheckInNotes(final LocalDate date, final VBox box,
    final List<CheckInOutDetails> checkInNotes) {

if (checkInNotes.size() > 0) {
    for (final CheckInOutDetails next : checkInNotes) {
    final TextFlow tf = new TextFlow();
    final Text t0 = new Text("Room " + next.room);
    t0.getStyleClass().add("emphasis");
    final Text t1 = new Text(" (" + next.bookingOrigin + ")");
    tf.getChildren().addAll(t0, t1);
    if (!StringUtils.isBlank(next.notes)) {
        final Text t2 = new Text(": " + next.notes);
        t2.getStyleClass().add("guest-message");
        tf.getChildren().add(t2);
    }
    box.getChildren().add(tf);
    }
    box.getChildren().add(new Separator());
}
   }
UpcomingController.java 文件源码 项目:drbookings 阅读 25 收藏 0 点赞 0 评论 0
private static void addCheckOutNotes(final LocalDate date, final VBox box,
    final List<CheckInOutDetails> checkOutNotes) {
if (checkOutNotes.size() > 0) {
    for (final CheckInOutDetails next : checkOutNotes) {
    final TextFlow tf = new TextFlow();
    final Text t0 = new Text("Room " + next.room);
    t0.getStyleClass().add("emphasis");
    final Text t1 = new Text(" (" + next.bookingOrigin + ")");
    tf.getChildren().addAll(t0, t1);
    if (!StringUtils.isBlank(next.notes)) {
        final Text t2 = new Text(": " + next.notes);
        t2.getStyleClass().add("guest-message");
        tf.getChildren().add(t2);
    }
    box.getChildren().add(tf);
    }
    box.getChildren().add(new Separator());
}
   }
BookingDetailsController.java 文件源码 项目:drbookings 阅读 39 收藏 0 点赞 0 评论 0
private void addBookingEntry(final Booking be) {
    // System.err.println("Adding entry for " + be);
    final VBox box = new VBox(4);
    // box.setPadding(new Insets(4));
    addRow0(box, be);
    box.getChildren().add(new Separator());
    addRowNetEarnings(box, be);
    box.getChildren().add(new Separator());
    addRowFees(box, be);
    box.getChildren().add(new Separator());
    addRow4(box, be);
    box.getChildren().add(new Separator());
    addRow5(box, be);
    box.getChildren().add(new Separator());
    addRow1(box, be);
    addRow2(box, be);
    addModifyButton(box, be);
    content.getChildren().add(box);

}
StatusBarManager.java 文件源码 项目:CSS-Editor-FX 阅读 45 收藏 0 点赞 0 评论 0
private void initBar() {
  length.textProperty().bind(map(getCodeAreaValue(c -> c.textProperty()), t -> t.length()));
  lines.textProperty().bind(map(getCodeAreaValue(c -> c.textProperty()), t -> StringUtil.countLine(t)));
  caretLine.textProperty().bind(
      map(getCodeAreaValue(c -> c.caretPositionProperty()), t -> StringUtil.countLine(area.getValue().getText().substring(0, t))));
  caretColumn.textProperty().bind(map(getCodeAreaValue(c -> c.caretColumnProperty()), t -> t));
  select.textProperty().bind(mapString(getCodeAreaValue(c -> c.selectedTextProperty()), t -> t.length() + " | " + StringUtil.countLine(t)));
  charset.textProperty().bind(mapString(Options.charset.property(), t -> t.toString()));
  inputType.textProperty().bind(Bindings.when(yep(overrideProperty)).then("Override").otherwise("Insert"));

  bar.getRightItems().addAll(
      margin(new Text("lines"), 0, 5), minWidth(lines, 60),
      margin(new Text("length"), 0, 5), minWidth(length, 70),
      new Separator(Orientation.VERTICAL),
      margin(new Text("Col"), 0, 5), minWidth(caretColumn, 60),
      margin(new Text("Line"), 0, 5), minWidth(caretLine, 60),
      new Separator(Orientation.VERTICAL),
      margin(new Text("Sel"), 0, 5), minWidth(select, 90),
      new Separator(Orientation.VERTICAL),
      minWidth(charset, 60),
      new Separator(Orientation.VERTICAL),
      minWidth(inputType, 60),
      new Separator(Orientation.VERTICAL)
      );
}
UIFactory.java 文件源码 项目:downloadclient 阅读 35 收藏 0 点赞 0 评论 0
private static void addRemoveButton(
    final VBox container,
    final VBox root,
    VBox dynroot,
    HBox subroot,
    ComboBox box) {

    Button remove = new Button(I18n.getMsg("gui.remove"));
    remove.setOnAction(new EventHandler<ActionEvent>() {
        @Override public void handle(ActionEvent e) {
            ObservableList<Node> items = container.getChildren();
            items.remove(root);
        }
    });
    subroot.getChildren().addAll(box, remove);
    subroot.setMargin(box, new Insets(MARGIN_5,
        MARGIN_5, MARGIN_5, MARGIN_20));
    subroot.setMargin(remove, new Insets(MARGIN_5,
        MARGIN_5, MARGIN_5, MARGIN_5));
    Separator sep = new Separator();
    root.getChildren().addAll(subroot, dynroot, sep);
    root.setId("process_parameter");
}
GlobalLocalPane.java 文件源码 项目:iso-game-engine 阅读 29 收藏 0 点赞 0 评论 0
GlobalLocalPane(final Pane global, final Pane local) {
    super();

    this.global = global;
    this.local = local;

    global.setFocusTraversable(false);
    local.setFocusTraversable(false);

    final Node l1 = new Label("Global");
    final Node l2 = new Label("Local");
    final Node v1 = new VBox(l1, global);
    final Node v2 = new Separator(Orientation.HORIZONTAL);
    final Node v3 = new VBox(l2, local);

    this.getChildren().addAll(v1, v2, v3);

    this.setFocusTraversable(false);
    l1.setFocusTraversable(false);
    l2.setFocusTraversable(false);
    v1.setFocusTraversable(false);
    v2.setFocusTraversable(false);
    v3.setFocusTraversable(false);
}
FlyoutDemo.java 文件源码 项目:mars-sim 阅读 37 收藏 0 点赞 0 评论 0
@Override
public void start(Stage primaryStage) throws Exception {
    BorderPane pane = new BorderPane();

    ToolBar  toolBar = new ToolBar();

    Label fileLabel = new Label("File");

    flyout = createFlyout();

    // Could be TOP, LEFT, RIGHT too!
    flyout.setFlyoutSide(Flyout.Side.BOTTOM);

    toolBar.getItems().addAll(
        fileLabel,
        new Separator(),
        flyout
    );

    pane.setTop(toolBar);

    Scene scene = new Scene(pane, 600, 200);
    primaryStage.setScene(scene);
    primaryStage.show();
}
FlyoutDemo.java 文件源码 项目:tidbit 阅读 35 收藏 0 点赞 0 评论 0
@Override
public void start(Stage primaryStage) throws Exception {
    BorderPane pane = new BorderPane();

    ToolBar  toolBar = new ToolBar();

    Label fileLabel = new Label("File");

    flyout = createFlyout();

    // Could be TOP, LEFT, RIGHT too!
    flyout.setFlyoutSide(Flyout.Side.BOTTOM);

    toolBar.getItems().addAll(
        fileLabel,
        new Separator(),
        flyout
    );

    pane.setTop(toolBar);

    Scene scene = new Scene(pane, 600, 200);
    primaryStage.setScene(scene);
    primaryStage.show();
}
RuleModalPane.java 文件源码 项目:roda-in 阅读 35 收藏 0 点赞 0 评论 0
private void createBottom() {
  createContinueButton();
  createBackButton();
  createCancelButton();

  space = new HBox();
  HBox.setHgrow(space, Priority.ALWAYS);

  VBox bottom = new VBox();
  VBox.setVgrow(bottom, Priority.ALWAYS);
  Separator separator = new Separator();

  buttons = new HBox(10);
  buttons.setPadding(new Insets(10, 10, 10, 10));
  buttons.setAlignment(Pos.CENTER);
  buttons.getChildren().addAll(btCancel, space, btContinue);

  bottom.getChildren().addAll(separator, buttons);

  setBottom(bottom);
}
AddMetadataPane.java 文件源码 项目:roda-in 阅读 35 收藏 0 点赞 0 评论 0
private void createBottom() {
  createContinueButton();
  createCancelButton();

  HBox space = new HBox();
  HBox.setHgrow(space, Priority.ALWAYS);

  VBox bottom = new VBox();
  VBox.setVgrow(bottom, Priority.ALWAYS);
  Separator separator = new Separator();

  HBox buttons = new HBox(10);
  buttons.setPadding(new Insets(10, 10, 10, 10));
  buttons.setAlignment(Pos.CENTER);
  buttons.getChildren().addAll(btCancel, space, btContinue);

  bottom.getChildren().addAll(separator, buttons);

  setBottom(bottom);
}
ToolboxView.java 文件源码 项目:metastone 阅读 36 收藏 0 点赞 0 评论 0
public ToolboxView() {
    FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/fxml/ToolboxView.fxml"));
    fxmlLoader.setRoot(this);
    fxmlLoader.setController(this);

    try {
        fxmlLoader.load();
    } catch (IOException exception) {
        throw new RuntimeException(exception);
    }

    playerPanel = new PlayerPanel();
    getItems().add(playerPanel);
    getItems().add(new Separator());
    cardPanel = new CardPanel();
    getItems().add(cardPanel);
    getItems().add(new Separator());
    minionPanel = new MinionPanel();
    getItems().add(minionPanel);
}
GitIgnoreEditor.java 文件源码 项目:Elegit 阅读 26 收藏 0 点赞 0 评论 0
/**
 * Set up the content of the window, including styling and layout
 * @return the top-level node in the scene
 */
private static Parent getRootOfScene(){
    TextArea textArea = new TextArea();
    textArea.setStyle("-fx-focus-color: transparent; -fx-faint-focus-color: transparent;");

    Button okButton = new Button("Save");
    okButton.setOnAction(event -> handleConfirmation(textArea.getText(), true));
    Button cancelButton = new Button("Cancel");
    cancelButton.setOnAction(event -> handleConfirmation(textArea.getText(), false));

    HBox buttonArea = new HBox(cancelButton, okButton);
    buttonArea.setPadding(new Insets(5, 5, 5, 5));
    buttonArea.setSpacing(5);
    buttonArea.setAlignment(Pos.BOTTOM_RIGHT);

    VBox parent = new VBox(textArea, new Separator(Orientation.HORIZONTAL), buttonArea);
    VBox.setVgrow(textArea, Priority.ALWAYS);
    parent.setStyle("-fx-border-color: #3498DB");

    textArea.setText(getTextFromGitIgnoreFile());

    return parent;
}
RectangleSocketPreviewView.java 文件源码 项目:GRIP 阅读 35 收藏 0 点赞 0 评论 0
protected RectangleSocketPreviewView(GripPlatform platform, OutputSocket<RectsReport> socket) {
  super(socket);
  this.platform = platform;

  // Add a checkbox to set if the preview should just show the rectangles, or also the input image
  final CheckBox show = new CheckBox("Show Input Image");
  show.setSelected(this.showInputImage);
  show.selectedProperty().addListener(observable -> {
    synchronized (this) {
      this.showInputImage = show.isSelected();
      this.convertImage();
    }
  });

  final VBox content = new VBox(this.imageView, new Separator(Orientation.HORIZONTAL), this
      .infoLabel, show);
  content.getStyleClass().add("preview-box");
  this.setContent(content);
}
LinesSocketPreviewView.java 文件源码 项目:GRIP 阅读 40 收藏 0 点赞 0 评论 0
/**
 * @param socket An output socket to preview.
 */
public LinesSocketPreviewView(GripPlatform platform, OutputSocket<LinesReport> socket) {
  super(socket);
  this.platform = platform;

  // Add a checkbox to set if the preview should just show the lines, or also the input image
  final CheckBox show = new CheckBox("Show Input Image");
  show.setSelected(this.showInputImage);
  show.selectedProperty().addListener(observable -> {
    synchronized (this) {
      this.showInputImage = show.isSelected();
      this.convertImage();
    }
  });

  final VBox content = new VBox(this.imageView, new Separator(Orientation.HORIZONTAL), this
      .infoLabel, show);
  content.getStyleClass().add("preview-box");
  this.setContent(content);
}
BlobsSocketPreviewView.java 文件源码 项目:GRIP 阅读 31 收藏 0 点赞 0 评论 0
/**
 * @param socket An output socket to preview.
 */
public BlobsSocketPreviewView(GripPlatform platform, OutputSocket<BlobsReport> socket) {
  super(socket);
  this.platform = platform;
  final CheckBox show = new CheckBox("Show Input Image");
  show.setSelected(this.showInputImage);
  show.selectedProperty().addListener(observable -> {
    synchronized (this) {
      this.showInputImage = show.isSelected();
      this.convertImage();
    }
  });

  final VBox content = new VBox(this.imageView, new Separator(Orientation.HORIZONTAL), this
      .infoLabel, show);
  content.getStyleClass().add("preview-box");
  this.setContent(content);
}
DataCollectionUI.java 文件源码 项目:SONDY 阅读 35 收藏 0 点赞 0 评论 0
public DataCollectionUI(){
    grid = new GridPane();
    grid.setPadding(new Insets(5, 5, 5, 5));

    // Adding separators
    grid.add(new Text("Available sources"),0,0);
    grid.add(new Separator(),0,1);
    grid.add(new Text("Create a source"),0,3);
    grid.add(new Separator(),0,4);
    grid.add(new Text("Collect data from the selected source"),0,6);
    grid.add(new Separator(),0,7);

    availableSourcesUI();
    newSourceUI();
    collectDataUI();
}
DataManipulationUI.java 文件源码 项目:SONDY 阅读 36 收藏 0 点赞 0 评论 0
public DataManipulationUI(){
    StyleManager.getInstance().addUserAgentStylesheet(PropertySheet.class.getResource("propertysheet.css").toExternalForm());

    // Initializing the main grid
    grid = new GridPane();
    grid.setPadding(new Insets(5,5,5,5));

    // Adding separators
    grid.add(new Text("Available datasets"),0,0);
    grid.add(new Separator(),0,1);
    grid.add(new Text("Import a dataset"),0,3);
    grid.add(new Separator(),0,4);
    grid.add(new Text("Preprocess the selected dataset"),0,6);
    grid.add(new Separator(),0,7);
    grid.add(new Text("Filter the selected preprocessed dataset"),0,9);
    grid.add(new Separator(),0,10);

    // Initializing specific UIs
    availableDatasetsUI();
    newDatasetProperties = new HashMap<>();
    importUI();
    preprocessUI();
    filterUI();
}
WebViewAutoHeightAdjust2.java 文件源码 项目:javafx-demos 阅读 29 收藏 0 点赞 0 评论 0
private Node getBottom() {
    StackPane sp = new StackPane();
    sp.setMinHeight(25);
    sp.setAlignment(Pos.TOP_RIGHT);
    ImageView image = new ImageView(new Image(getClass().getResourceAsStream("/images/mglass.gif")));
    image.setCursor(Cursor.HAND);
    image.setTranslateX(-5);
    image.setTranslateY(3);
    image.setOnMouseClicked(new EventHandler<MouseEvent>() {
        @Override
        public void handle(MouseEvent paramT) {
            ScenicView.show(scene);
        }
    });
    sp.getChildren().addAll(new Separator(),image);
    return sp;
}
WebViewAutoHeightAdjust.java 文件源码 项目:javafx-demos 阅读 35 收藏 0 点赞 0 评论 0
private Node getBottom() {
    StackPane sp = new StackPane();
    sp.setMinHeight(25);
    sp.setAlignment(Pos.TOP_RIGHT);
    ImageView image = new ImageView(new Image(getClass().getResourceAsStream("/images/mglass.gif")));
    image.setCursor(Cursor.HAND);
    image.setTranslateX(-5);
    image.setTranslateY(3);
    image.setOnMouseClicked(new EventHandler<MouseEvent>() {
        @Override
        public void handle(MouseEvent paramT) {
            ScenicView.show(scene);
        }
    });
    sp.getChildren().addAll(new Separator(),image);
    return sp;
}
PopUpPositioningDemo.java 文件源码 项目:javafx-demos 阅读 35 收藏 0 点赞 0 评论 0
private Node getBottom() {
    StackPane sp = new StackPane();
    sp.setMinHeight(25);
    sp.setAlignment(Pos.TOP_RIGHT);
    ImageView image = new ImageView(new Image(getClass().getResourceAsStream("/images/mglass.gif")));
    image.setCursor(Cursor.HAND);
    image.setTranslateX(-5);
    image.setTranslateY(3);
    image.setOnMouseClicked(new EventHandler<MouseEvent>() {
        @Override
        public void handle(MouseEvent paramT) {
            ScenicView.show(scene);
        }
    });
    sp.getChildren().addAll(new Separator(),image);
    return sp;
}
ComboBoxWithImagesDemo.java 文件源码 项目:javafx-demos 阅读 39 收藏 0 点赞 0 评论 0
private Node getBottom() {
    StackPane sp = new StackPane();
    sp.setMinHeight(25);
    sp.setAlignment(Pos.TOP_RIGHT);
    ImageView image = new ImageView(new Image(getClass().getResourceAsStream("/images/mglass.gif")));
    image.setCursor(Cursor.HAND);
    image.setTranslateX(-5);
    image.setTranslateY(3);
    image.setOnMouseClicked(new EventHandler<MouseEvent>() {
        @Override
        public void handle(MouseEvent paramT) {
            ScenicView.show(scene);
        }
    });
    sp.getChildren().addAll(new Separator(), image);
    return sp;
}


问题


面经


文章

微信
公众号

扫码关注公众号