当前位置: 首页>>代码示例>>Java>>正文


Java GlyphsDude.createIconButton方法代码示例

本文整理汇总了Java中de.jensd.fx.glyphs.GlyphsDude.createIconButton方法的典型用法代码示例。如果您正苦于以下问题:Java GlyphsDude.createIconButton方法的具体用法?Java GlyphsDude.createIconButton怎么用?Java GlyphsDude.createIconButton使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在de.jensd.fx.glyphs.GlyphsDude的用法示例。


在下文中一共展示了GlyphsDude.createIconButton方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getStartButton

import de.jensd.fx.glyphs.GlyphsDude; //导入方法依赖的package包/类
/**
 * 
 * @return 
 */
public Button getStartButton() {
    if (startButton == null) {
        startButton = GlyphsDude.createIconButton(FontAwesomeIcon.PLAY, "", "28", "0", ContentDisplay.CENTER);
        startButton.getStyleClass().addAll("toolbar-button-transparent", "start", "dropshadow-1-5");
        TooltipBuilder.create("Start Capture", startButton);
        startButton.setOnAction((ActionEvent event) -> {
            getStartButton().setDisable(true);
            getStopButton().setDisable(false);

            try {
                GlobalScreen.addNativeKeyListener(getPrintScreenListener());
                GlobalScreen.registerNativeHook();
            } catch (NativeHookException ex) {
                FxDialogs.showErrorDialog("There was a problem registering the native hook.");
                Logger.getLogger(Main.class.getName()).log(Level.SEVERE, "There was a problem registering the native hook.", ex);
            }

        });
    }
    return startButton;
}
 
开发者ID:Simego,项目名称:FXImgurUploader,代码行数:26,代码来源:MainWindow.java

示例2: getStopButton

import de.jensd.fx.glyphs.GlyphsDude; //导入方法依赖的package包/类
/**
 * 
 * @return 
 */
public Button getStopButton() {
    if (stopButton == null) {
        stopButton = GlyphsDude.createIconButton(FontAwesomeIcon.STOP, "", "28", "0", ContentDisplay.CENTER);
        stopButton.getStyleClass().addAll("toolbar-button-transparent", "stop", "dropshadow-1-5");
        TooltipBuilder.create("Stop Capture", stopButton);
        stopButton.setDisable(true);
        stopButton.setOnAction((ActionEvent event) -> {
            getStopButton().setDisable(true);
            getStartButton().setDisable(false);

            try {
                GlobalScreen.removeNativeKeyListener(getPrintScreenListener());
                GlobalScreen.unregisterNativeHook();
            } catch (NativeHookException ex) {
                FxDialogs.showErrorDialog("There was a problem registering the native hook.");
                Logger.getLogger(Main.class.getName()).log(Level.SEVERE, "There was a problem registering the native hook.", ex);
            }
        });
    }
    return stopButton;
}
 
开发者ID:Simego,项目名称:FXImgurUploader,代码行数:26,代码来源:MainWindow.java

示例3: getUploadButton

import de.jensd.fx.glyphs.GlyphsDude; //导入方法依赖的package包/类
/**
     * 
     * @return 
     */
    public Button getUploadButton() {
        if (uploadButton == null) {
            uploadButton = GlyphsDude.createIconButton(FontAwesomeIcon.CLOUD_UPLOAD, "upload image", "24", "15", ContentDisplay.LEFT);
            uploadButton.getStyleClass().add("upload-button");
            uploadButton.setDisable(true);
//            uploadButton.disableProperty().bind(getImageTable().getSelectionModel().selectedItemProperty().isNull());
            uploadButton.setOnAction((ActionEvent event) -> {
                ImageEN image = getImageTable().getSelectionModel().getSelectedItem();
                if (image == null) {
                    return;
                }

                doImageUpload(image);
            });
        }
        return uploadButton;
    }
 
开发者ID:Simego,项目名称:FXImgurUploader,代码行数:22,代码来源:MainWindow.java

示例4: NewsPanel

import de.jensd.fx.glyphs.GlyphsDude; //导入方法依赖的package包/类
public NewsPanel() {
    getStyleClass().add("news-panel");
    getStyleClass().addAll(Style.CONTAINER.css());
    Button closeButton = GlyphsDude.createIconButton(FontAwesomeIcon.TIMES);
    closeButton.getStyleClass().addAll("close-button");
    closeButton.setOnAction(e -> eventStudio().broadcast(HideNewsPanelRequest.INSTANCE));
    Label titleLabel = new Label(DefaultI18nContext.getInstance().i18n("What's new"));
    titleLabel.setPrefWidth(Integer.MAX_VALUE);
    titleLabel.getStyleClass().add("news-panel-title");

    StackPane top = new StackPane(titleLabel, closeButton);
    top.setAlignment(Pos.TOP_RIGHT);

    scroll.getStyleClass().add("scrollable-news");
    scroll.setHbarPolicy(ScrollBarPolicy.NEVER);
    scroll.setFitToHeight(true);
    scroll.setFitToWidth(true);
    getChildren().addAll(top, scroll);

    eventStudio().addAnnotatedListeners(this);
}
 
开发者ID:torakiki,项目名称:pdfsam,代码行数:22,代码来源:NewsPanel.java

示例5: CommentPopOver

import de.jensd.fx.glyphs.GlyphsDude; //导入方法依赖的package包/类
public CommentPopOver() {
  super();
  textArea = new TextArea();
  saveButton = GlyphsDude.createIconButton(FontAwesomeIcon.SAVE);
  buttonBar = new ButtonBar();
  buttonBar.getButtons().addAll(saveButton);
  VBox content = new VBox(textArea, buttonBar);
  content.setPadding(new Insets(5));
  this.setTitle("Edit Comment");
  this.setContentNode(content);
  textArea.editableProperty().bind(editable);

}
 
开发者ID:VerifAPS,项目名称:stvs,代码行数:14,代码来源:CommentPopOver.java

示例6: FileSelectionField

import de.jensd.fx.glyphs.GlyphsDude; //导入方法依赖的package包/类
/**
 * Constructor.
 */
public FileSelectionField() {
  super();
  setSpacing(10);
  ViewUtils.setupClass(this);
  textField = new TextField();
  Button fileSelectButton = GlyphsDude.createIconButton(FontAwesomeIcon.FOLDER_OPEN);
  getChildren().add(textField);
  getChildren().add(fileSelectButton);
  fileSelectButton.setOnAction(this::onFileSelectButtonClicked);
  this.setHgrow(textField, Priority.ALWAYS);
}
 
开发者ID:VerifAPS,项目名称:stvs,代码行数:15,代码来源:FileSelectionField.java

示例7: getMinimizeButton

import de.jensd.fx.glyphs.GlyphsDude; //导入方法依赖的package包/类
/**
 * 
 * @return 
 */
public Button getMinimizeButton() {
    if (minimizeButton == null) {
        minimizeButton = GlyphsDude.createIconButton(FontAwesomeIcon.MINUS, "", "28", "0", ContentDisplay.CENTER);
        minimizeButton.getStyleClass().addAll("toolbar-button-transparent", "default-green-button");
        TooltipBuilder.create("Minimize", minimizeButton);
        minimizeButton.setOnAction((ActionEvent event) -> {
            this.setIconified(true);
        });
    }
    return minimizeButton;
}
 
开发者ID:Simego,项目名称:FXImgurUploader,代码行数:16,代码来源:MainWindow.java

示例8: getCloseButton

import de.jensd.fx.glyphs.GlyphsDude; //导入方法依赖的package包/类
/**
 * 
 * @return 
 */
public Button getCloseButton() {
    if (closeButton == null) {
        closeButton = GlyphsDude.createIconButton(FontAwesomeIcon.POWER_OFF, "", "28", "0", ContentDisplay.CENTER);
        closeButton.getStyleClass().addAll("toolbar-button-transparent", "default-green-button");
        TooltipBuilder.create("Close", closeButton);
        closeButton.setOnAction((ActionEvent event) -> {
            this.close();
        });
    }
    return closeButton;
}
 
开发者ID:Simego,项目名称:FXImgurUploader,代码行数:16,代码来源:MainWindow.java

示例9: setupToolBar

import de.jensd.fx.glyphs.GlyphsDude; //导入方法依赖的package包/类
private void setupToolBar() {
    final Button homeButton = GlyphsDude.createIconButton(FontAwesomeIcon.HOME);
    homeButton.setOnAction(event -> this.browserCore.goToHome());
    final Button refreshButton = GlyphsDude.createIconButton(FontAwesomeIcon.REFRESH);
    refreshButton.setOnAction(event -> this.browserCore.refresh());

    this.searchTextField.textProperty().addListener((obs, oldValue, newValue) -> {
        if (!"".equals(newValue)) {
            this.browserCore.filter(newValue);
        }
    });
    final Label searchLabel = new Label("Filter");
    final ComboBox<String> favouriteGameComboBox = new ComboBox<>();
    final ListProperty<String> favouriteGames = Settings.getInstance().favouriteGamesProperty();
    favouriteGameComboBox.itemsProperty().bind(favouriteGames);
    favouriteGameComboBox.getSelectionModel().selectedItemProperty().addListener((obs, oldValue, newValue) -> {
        if (newValue != null) {
            this.browserCore.openGame(newValue);
            Platform.runLater(() -> favouriteGameComboBox.setValue(null));
        }
    });

    this.qualityComboBox.getItems().add("Worst");
    this.qualityComboBox.getItems().add("Best");
    this.qualityComboBox.getSelectionModel().select(1);

    this.browserToolBar.getItems().add(homeButton);
    this.browserToolBar.getItems().add(new Separator(Orientation.VERTICAL));
    this.browserToolBar.getItems().add(refreshButton);
    this.browserToolBar.getItems().add(new Separator(Orientation.VERTICAL));
    this.browserToolBar.getItems().add(searchLabel);
    this.browserToolBar.getItems().add(this.searchTextField);
    this.browserToolBar.getItems().add(new Separator(Orientation.VERTICAL));
    this.browserToolBar.getItems().add(favouriteGameComboBox);
    this.browserToolBar.getItems().add(new Separator(Orientation.VERTICAL));
    this.browserToolBar.getItems().add(this.qualityComboBox);
}
 
开发者ID:westerwave,项目名称:livestreamer_twitch_gui,代码行数:38,代码来源:BrowserController.java

示例10: ChannelDetailPane

import de.jensd.fx.glyphs.GlyphsDude; //导入方法依赖的package包/类
public ChannelDetailPane(final MainWindow main) {

		final Button btnHide = GlyphsDude.createIconButton(FontAwesomeIcon.ANGLE_DOUBLE_RIGHT);
		btnHide.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
		btnHide.setOnAction((event) -> main.doDetailSlide(false));

		content = new ChannelDetailPaneContent(widthProperty(), btnHide.widthProperty());

		main.getDetailChannel().addListener((observable, oldValue, newValue) -> {
			if (newValue != null) {
				LOGGER.trace("detail channel changed: " + newValue);
				final ProgressIndicator pi = new ProgressIndicator();

				pi.setPrefSize(100, 100);
				pi.setMaxSize(100, 100);
				pi.setMinSize(100, 100);

				setCenter(pi);

				final DetailPaneUpdateService service = new DetailPaneUpdateService(newValue, content);
				service.setOnSucceeded(event -> setCenter(content));
				service.setOnFailed(event -> LOGGER.error("Error building Detail pane", event.getSource().getException()));
				service.start();

			}
		});

		setLeft(btnHide);
	}
 
开发者ID:JanStrauss,项目名称:skadi,代码行数:30,代码来源:ChannelDetailPane.java

示例11: Notification

import de.jensd.fx.glyphs.GlyphsDude; //导入方法依赖的package包/类
Notification(String title, Node content) {
    requireNotNull(content, "Notification content cannot be blank");
    getStyleClass().add("notification");
    getStyleClass().addAll(Style.CONTAINER.css());
    setId(UUID.randomUUID().toString());
    Button closeButton = GlyphsDude.createIconButton(FontAwesomeIcon.TIMES);
    closeButton.getStyleClass().addAll("close-button");
    closeButton.setOnAction(e -> eventStudio().broadcast(new RemoveNotificationRequestEvent(getId())));
    Label titleLabel = new Label(title);
    titleLabel.setPrefWidth(Integer.MAX_VALUE);
    titleLabel.getStyleClass().add("notification-title");
    StackPane top = new StackPane(titleLabel, closeButton);
    top.setAlignment(Pos.TOP_RIGHT);
    getChildren().addAll(top, content);
    setOpacity(0);
    setOnMouseEntered(e -> {
        fade.stop();
        setOpacity(1);
    });
    setOnMouseClicked(e -> {
        setOnMouseEntered(null);
        setOnMouseExited(null);
        fade.stop();
        eventStudio().broadcast(new RemoveNotificationRequestEvent(getId()));
    });
    fade.setFromValue(1);
    fade.setToValue(0);
}
 
开发者ID:torakiki,项目名称:pdfsam,代码行数:29,代码来源:Notification.java

示例12: PasswordFieldPopupContent

import de.jensd.fx.glyphs.GlyphsDude; //导入方法依赖的package包/类
public PasswordFieldPopupContent() {
    getStyleClass().setAll("pdfsam-input-password-content");
    passwordField.setPromptText(DefaultI18nContext.getInstance().i18n("Enter the user password"));
    Button doneButton = GlyphsDude.createIconButton(FontAwesomeIcon.UNLOCK,
            DefaultI18nContext.getInstance().i18n("Unlock"));
    doneButton.getStyleClass().addAll(Style.BUTTON.css());
    doneButton.prefHeightProperty().bind(passwordField.heightProperty());
    doneButton.setMaxHeight(USE_PREF_SIZE);
    doneButton.setMinHeight(USE_PREF_SIZE);
    doneButton.setOnAction(e -> requestLoad());
    passwordField.setOnAction(e -> requestLoad());
    getChildren().addAll(passwordField, doneButton);
}
 
开发者ID:torakiki,项目名称:pdfsam,代码行数:14,代码来源:PasswordFieldPopup.java

示例13: setupChannelInfoPanel

import de.jensd.fx.glyphs.GlyphsDude; //导入方法依赖的package包/类
private void setupChannelInfoPanel() {
	this.previewImageView = new WrappedImageView(null);
	this.rootBorderPane.setCenter(this.previewImageView);

	this.channelDescription = new Label();
	this.channelDescription.setWrapText(true);
	this.channelUptime = new Label();
	this.channelViewers = new Label();
	this.channelGame = new Label();

	final int rowSpan = 1;
	final int columnSpan = 1;
	final int column = 0;
	final int gameRow = 0;
	final int viewersRow = 1;
	final int uptimeRow = 2;
	final int descriptionRow = 3;

	this.descriptionGrid.add(this.channelGame, column, gameRow, columnSpan, rowSpan);
	this.descriptionGrid.add(this.channelViewers, column, viewersRow, columnSpan, rowSpan);
	this.descriptionGrid.add(this.channelUptime, column, uptimeRow, columnSpan, rowSpan);
	this.descriptionGrid.add(this.channelDescription, column, descriptionRow, columnSpan, rowSpan);

	this.startStreamButton = GlyphsDude.createIconButton(FontAwesomeIcon.PLAY);
	this.startStreamButton.setOnAction(event -> this.startStream());
	this.startStreamButton.setDisable(true);
	this.recordStreamButton = GlyphsDude.createIconButton(FontAwesomeIcon.DOWNLOAD);
	this.recordStreamButton.setOnAction(event -> this.recordStream());
	this.recordStreamButton.setDisable(true);
	this.openChatButton = GlyphsDude.createIconButton(FontAwesomeIcon.COMMENT);
	this.openChatButton.setOnAction(event -> this.openChat());
	this.openChatButton.setDisable(true);
	this.openChatInBrowserButton = GlyphsDude.createIconButton(FontAwesomeIcon.COMMENT_ALT);
	this.openChatInBrowserButton.setOnAction(event -> this.openChatInBrowser());
	this.openChatInBrowserButton.setDisable(true);
	this.openInBrowserButton = GlyphsDude.createIconButton(FontAwesomeIcon.TWITCH);
	this.openInBrowserButton.setOnAction(event -> this.openBrowser());
	this.openInBrowserButton.setDisable(true);

	this.buttonBox.getItems().add(this.startStreamButton);
	this.buttonBox.getItems().add(this.recordStreamButton);
	this.buttonBox.getItems().add(this.openChatButton);
	this.buttonBox.getItems().add(this.openChatInBrowserButton);
	this.buttonBox.getItems().add(this.openInBrowserButton);
}
 
开发者ID:westerwave,项目名称:livestreamer_twitch_gui,代码行数:46,代码来源:ChannelInfoPanel.java

示例14: buildAuthPane

import de.jensd.fx.glyphs.GlyphsDude; //导入方法依赖的package包/类
private GridPane buildAuthPane() {

		final GridPane pane = new GridPane();
		pane.setHgap(10);
		pane.setVgap(10);

		// Step 1: Btn
		final Button btOpenTwitchPage = GlyphsDude.createIconButton(FontAwesomeIcon.EXTERNAL_LINK, "Open Twitch Authorization Page");
		btOpenTwitchPage.setOnAction(event -> {
			final URI authUrl = TwitchUtil.buildAuthUrl();
			DesktopUtil.openWebpage(authUrl);
		});
		final Label lbStep1 = new Label("Step 1: ");
		final Label lbDesc1 = new Label("Press the Button to open the Twitch authorization page:");

		GridPane.setValignment(lbStep1, VPos.BASELINE);
		GridPane.setValignment(lbDesc1, VPos.BASELINE);

		pane.add(lbStep1, 0, 0);
		pane.add(lbDesc1, 1, 0);
		pane.add(btOpenTwitchPage, 2, 0);

		// Step 2: desc twitch auth
		final Label lbStep2 = new Label("Step 2: ");
		final Label lbDesc2 = new Label("Follow the instructions on the Twitch authorization page:");

		GridPane.setValignment(lbStep2, VPos.BASELINE);
		GridPane.setValignment(lbDesc2, VPos.BASELINE);

		pane.add(lbStep2, 0, 1);
		pane.add(lbDesc2, 1, 1);
		pane.add(new ImageView(new Image(getClass().getResourceAsStream("/images/auth_prev_0.png"))), 2, 1);

		// Step 3: Result page copy auth token#
		final Label lbStep3 = new Label("Step 3: ");
		final Label lbDesc3 = new Label("After you authorized Skadi, you will be redirected to the Skadi authorization page:");

		GridPane.setValignment(lbStep3, VPos.BASELINE);
		GridPane.setValignment(lbDesc3, VPos.BASELINE);

		pane.add(lbStep3, 0, 2);
		pane.add(lbDesc3, 1, 2);
		pane.add(new ImageView(new Image(getClass().getResourceAsStream("/images/auth_prev_1.png"))), 2, 2);

		// Step 4: Paste auth token
		final Label lbStep4 = new Label("Step 4: ");
		final Label lbDesc4 = new Label("Paste the Authorization token from the Skadi authorization page here: ");

		GridPane.setValignment(lbStep4, VPos.BASELINE);
		GridPane.setValignment(lbDesc4, VPos.BASELINE);

		pane.add(lbStep4, 0, 3);
		pane.add(lbDesc4, 1, 3);
		pane.add(tfToken, 2, 3);

		// Step 5: Verify
		//TODO
		return pane;
	}
 
开发者ID:JanStrauss,项目名称:skadi,代码行数:60,代码来源:AuthorizationDialog.java


注:本文中的de.jensd.fx.glyphs.GlyphsDude.createIconButton方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。