Java 类javafx.scene.control.Separator 实例源码

项目:marathonv5    文件:CheckListView.java   
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);
}
项目:CalendarFX    文件:HelloRecurrenceView.java   
@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;
}
项目:redisfx    文件:FormDialog.java   
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);
}
项目:CSS-Editor-FX    文件:StatusBarManager.java   
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)
      );
}
项目:arma-dialog-creator    文件:HistoryListPopup.java   
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();
}
项目:openjfx-8u-dev-tests    文件:DragDropWithControls.java   
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;
}
项目:openjfx-8u-dev-tests    文件:SeparatorApp.java   
@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;
}
项目:openjfx-8u-dev-tests    文件:SeparatorApp.java   
@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;
}
项目:JttDesktop    文件:SimpleConfigurationTitle.java   
/**
 * 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 );
}
项目:drbookings    文件:UpcomingController.java   
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());
}
   }
项目:drbookings    文件:UpcomingController.java   
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());
}
   }
项目:drbookings    文件:BookingDetailsController.java   
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);

}
项目:CSS-Editor-FX    文件:StatusBarManager.java   
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)
      );
}
项目:downloadclient    文件:UIFactory.java   
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");
}
项目:iso-game-engine    文件:GlobalLocalPane.java   
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);
}
项目:mars-sim    文件:FlyoutDemo.java   
@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();
}
项目:tidbit    文件:FlyoutDemo.java   
@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();
}
项目:roda-in    文件:RuleModalPane.java   
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);
}
项目:roda-in    文件:AddMetadataPane.java   
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);
}
项目:metastone    文件:ToolboxView.java   
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);
}
项目:Elegit    文件:GitIgnoreEditor.java   
/**
 * 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;
}
项目:GRIP    文件:RectangleSocketPreviewView.java   
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);
}
项目:GRIP    文件:LinesSocketPreviewView.java   
/**
 * @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);
}
项目:GRIP    文件:BlobsSocketPreviewView.java   
/**
 * @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);
}
项目:SONDY    文件:DataCollectionUI.java   
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();
}
项目:SONDY    文件:DataManipulationUI.java   
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();
}
项目:javafx-demos    文件:WebViewAutoHeightAdjust2.java   
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;
}
项目:javafx-demos    文件:WebViewAutoHeightAdjust.java   
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;
}
项目:javafx-demos    文件:PopUpPositioningDemo.java   
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;
}
项目:javafx-demos    文件:ComboBoxWithImagesDemo.java   
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;
}
项目:javafx-demos    文件:ToggleButtonGraphicStylingDemo.java   
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;
}
项目:javafx-demos    文件:ToggleButtonNonDeselectable.java   
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;
}
项目:javafx-demos    文件:ButtonBackGroundDemo.java   
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;
}
项目:javafx-demos    文件:ProgressBarDemo.java   
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;
}
项目:javafx-demos    文件:SnapShotDemo.java   
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;
}
项目:javafx-demos    文件:CheckBoxTest.java   
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;
}
项目:javafx-demos    文件:ChoiceBoxElement.java   
@SuppressWarnings({ "rawtypes", "unchecked"})
public static Node getNode(){

    final ChoiceBox cb = new ChoiceBox(FXCollections.observableArrayList("New Document", "Open ", 
            new Separator(), "Save", "Save as"));
    cb.setTooltip(new Tooltip("Select the language"));
    cb.getStyleClass().add("my-choice-box");

    cb.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() {
        @Override
        public void changed(ObservableValue arg0, Number arg1, Number arg2) {
            if(arg2.intValue()==1){
                cb.getSelectionModel().clearSelection();
            }
        }
    });
    return cb;
}
项目:javafx-demos    文件:FreeTextFieldDemo.java   
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;
}
项目:javafx-demos    文件:JavaFXComboBoxAutoSuggestDemo.java   
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;
}
项目:javafx-demos    文件:TableHeaderListComponent.java   
public static HBox getTwoColumnSeparatorTemplate(String col1, String col2){
    HBox hb= new HBox();
    hb.setAlignment(Pos.CENTER_LEFT);
    hb.setSpacing(5);
    Separator sp =  new Separator(Orientation.VERTICAL);
    sp.getStyleClass().add("tableHeaderListSeparator");

    StackPane stkP = new StackPane();
    stkP.setAlignment(Pos.CENTER);
    stkP.setPrefWidth(20);
    stkP.setPadding(new Insets(0, 0, 0, 5));
    stkP.getChildren().add(new Label(col1));

    hb.getChildren().addAll( stkP, sp, new Label(col2));
    return hb;
}