本文整理汇总了Java中de.jensd.fx.glyphs.GlyphsDude类的典型用法代码示例。如果您正苦于以下问题:Java GlyphsDude类的具体用法?Java GlyphsDude怎么用?Java GlyphsDude使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GlyphsDude类属于de.jensd.fx.glyphs包,在下文中一共展示了GlyphsDude类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addTab
import de.jensd.fx.glyphs.GlyphsDude; //导入依赖的package包/类
private SpecificationController addTab(HybridSpecification hybridSpecification, int index) {
final SpecificationController controller =
new SpecificationController(typeContext, ioVariables, hybridSpecification, this.state,
Bindings.isEmpty(scenario.getCode().syntaxErrorsProperty()).not(), globalConfig);
Tab tab = new Tab();
tab.setOnCloseRequest(e -> onTabCloseRequest(e, tab));
if (hybridSpecification.isEditable()) {
tab.setContextMenu(createTabContextMenu());
}
tab.textProperty().bind(hybridSpecification.nameProperty());
tab.setContent(controller.getView());
if (hybridSpecification.isEditable()) {
tab.setGraphic(GlyphsDude.createIcon(FontAwesomeIcon.EDIT));
} else {
tab.setGraphic(GlyphsDude.createIcon(FontAwesomeIcon.LOCK));
}
view.getTabs().add(index, tab);
controllers.put(tab, controller);
view.getTabPane().getSelectionModel().select(tab);
scenario.setActiveSpec(hybridSpecification);
return controller;
}
示例2: setIcons
import de.jensd.fx.glyphs.GlyphsDude; //导入依赖的package包/类
private void setIcons()
{
newButton.setGraphic(GlyphsDude.createIcon(FontAwesomeIcon.PLUS_SQUARE, "16px"));
openButton.setGraphic(GlyphsDude.createIcon(FontAwesomeIcon.FOLDER_OPEN, "16px"));
saveButton.setGraphic(GlyphsDude.createIcon(FontAwesomeIcon.FLOPPY_ALT, "16px"));
removeButton.setGraphic(GlyphsDude.createIcon(FontAwesomeIcon.TRASH, "16px"));
cutButton.setGraphic(GlyphsDude.createIcon(FontAwesomeIcon.CUT, "16px"));
copyButton.setGraphic(GlyphsDude.createIcon(FontAwesomeIcon.COPY, "16px"));
pasteButton.setGraphic(GlyphsDude.createIcon(FontAwesomeIcon.PASTE, "16px"));
undoButton.setGraphic(GlyphsDude.createIcon(FontAwesomeIcon.UNDO, "16px"));
redoButton.setGraphic(GlyphsDude.createIcon(FontAwesomeIcon.REPEAT, "16px"));
dataMapButton.setGraphic(GlyphsDude.createIcon(FontAwesomeIcon.CUBES, "16px"));
dataNodeButton.setGraphic(GlyphsDude.createIcon(FontAwesomeIcon.SERVER, "16px"));
}
示例3: 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;
}
示例4: 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;
}
示例5: 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;
}
示例6: handleAddButton
import de.jensd.fx.glyphs.GlyphsDude; //导入依赖的package包/类
public void handleAddButton() {
String fileName = fileField.getText();
// Don't allow adding the same file more than once
if (fileNames.contains(fileName)) {
notificationPaneController.addNotification(fileName+" has already been added.");
return;
}
if(!fileName.equals("")){
Label line = new Label(fileName);
line.setWrapText(true);
line.setId("notification");
line.setGraphic(GlyphsDude.createIcon(FontAwesomeIcon.TIMES_CIRCLE));
line.setOnMouseClicked(event -> {
if (event.getTarget().equals(line.getGraphic()))
fileNames.remove(fileName);
filesToCheckout.getChildren().remove(line);
});
fileNames.add(fileName);
filesToCheckout.getChildren().add(0,line);
}else {
notificationPaneController.addNotification("You need to type a file name first");
return;
}
}
示例7: initialize
import de.jensd.fx.glyphs.GlyphsDude; //导入依赖的package包/类
public void initialize() {
commitInfoNameCopyButton.setMinSize(Control.USE_PREF_SIZE, Control.USE_PREF_SIZE);
commitInfoGoToButton.setMinSize(Control.USE_PREF_SIZE, Control.USE_PREF_SIZE);
Text clipboardIcon = GlyphsDude.createIcon(FontAwesomeIcon.CLIPBOARD);
this.commitInfoNameCopyButton.setGraphic(clipboardIcon);
Text goToIcon = GlyphsDude.createIcon(FontAwesomeIcon.ARROW_CIRCLE_LEFT);
this.commitInfoGoToButton.setGraphic(goToIcon);
this.commitInfoGoToButton.setTooltip(new Tooltip(
"Go to selected commit"
));
this.commitInfoNameCopyButton.setTooltip(new Tooltip(
"Copy commit ID"
));
}
示例8: initialize
import de.jensd.fx.glyphs.GlyphsDude; //导入依赖的package包/类
public void initialize() {
openRepoDirButton.setMinSize(Control.USE_PREF_SIZE, Control.USE_PREF_SIZE);
Text openExternallyIcon = GlyphsDude.createIcon(FontAwesomeIcon.EXTERNAL_LINK);
this.openRepoDirButton.setGraphic(openExternallyIcon);
this.openRepoDirButton.setTooltip(new Tooltip("Open repository directory"));
final int REPO_DROPDOWN_MAX_WIDTH = 147;
repoDropdownSelector.setMaxWidth(REPO_DROPDOWN_MAX_WIDTH);
Text plusIcon = GlyphsDude.createIcon(FontAwesomeIcon.PLUS);
this.loadNewRepoButton.setGraphic(plusIcon);
Text minusIcon = GlyphsDude.createIcon(FontAwesomeIcon.MINUS);
this.removeRecentReposButton.setGraphic(minusIcon);
this.removeRecentReposButton.setTooltip(new Tooltip("Clear shortcuts to recently opened repos"));
Text downloadIcon = GlyphsDude.createIcon(FontAwesomeIcon.CLOUD_DOWNLOAD);
cloneOption.setGraphic(downloadIcon);
Text folderOpenIcon = GlyphsDude.createIcon(FontAwesomeIcon.FOLDER_OPEN);
existingOption.setGraphic(folderOpenIcon);
}
示例9: bindToTwitchChannel
import de.jensd.fx.glyphs.GlyphsDude; //导入依赖的package包/类
private void bindToTwitchChannel(final TwitchChannel selectedChannel) {
this.previewImageView.imageProperty().bind((selectedChannel).getPreviewImageLarge());
this.channelDescription.textProperty().bind((selectedChannel).getTitle());
this.channelUptime.textProperty().bind((selectedChannel).getUptimeString());
this.channelUptime.setGraphic(GlyphsDude.createIcon(FontAwesomeIcon.CLOCK_ALT));
this.channelViewers.textProperty().bind((selectedChannel).getViewersString());
this.channelViewers.setGraphic(GlyphsDude.createIcon(FontAwesomeIcon.USER));
this.channelGame.textProperty().bind((selectedChannel).getGame());
this.channelGame.setGraphic(GlyphsDude.createIcon(FontAwesomeIcon.GAMEPAD));
this.openChatButton.setDisable(false);
this.openChatInBrowserButton.setDisable(false);
this.openInBrowserButton.setDisable(false);
this.startStreamButton.disableProperty()
.bind(selectedChannel.isOnline().not().or(selectedChannel.getIsPlaylist()));
this.recordStreamButton.disableProperty()
.bind(selectedChannel.isOnline().not().or(selectedChannel.getIsPlaylist()));
}
示例10: 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);
}
示例11: createIconLabel
import de.jensd.fx.glyphs.GlyphsDude; //导入依赖的package包/类
public static Label createIconLabel(GlyphIcons icon, String iconSize, String text, ContentDisplay contentDisplay, Paint colour, String style)
{
Text iconLabel = GlyphsDude.createIcon(icon, iconSize);
iconLabel.setFill(colour);
Label label = new Label(text);
label.setTextFill(colour);
label.setStyle(style);
label.setGraphic(iconLabel);
label.setContentDisplay(contentDisplay);
return label;
}
示例12: setVerificationButtonPlay
import de.jensd.fx.glyphs.GlyphsDude; //导入依赖的package包/类
/**
* Set verification button to a state that signals that the verification can be started.
*/
public void setVerificationButtonPlay() {
Text icon = GlyphsDude.createIcon(FontAwesomeIcon.PLAY);
icon.setFill(Color.MEDIUMSEAGREEN);
startVerificationButton.setText("Verify");
startVerificationButton.setGraphic(icon);
startVerificationButton.getStyleClass().addAll("action", "action-verification");
}
示例13: setVerificationButtonStop
import de.jensd.fx.glyphs.GlyphsDude; //导入依赖的package包/类
/**
* Set verification button to a state that signals that the verification can be stopped.
*/
public void setVerificationButtonStop() {
Text icon = GlyphsDude.createIcon(FontAwesomeIcon.STOP);
icon.setFill(Color.INDIANRED);
startVerificationButton.setText("Stop Verification");
startVerificationButton.setGraphic(icon);
}
示例14: setConcretizerButtonStart
import de.jensd.fx.glyphs.GlyphsDude; //导入依赖的package包/类
/**
* Set concretizer button to a state that signals that the concretizer can be started.
*/
public void setConcretizerButtonStart() {
Text icon = GlyphsDude.createIcon(FontAwesomeIcon.LINE_CHART);
icon.setFill(Color.MEDIUMSEAGREEN);
startConcretizerButton.setText("Concretize");
startConcretizerButton.getStyleClass().addAll("action", "action-concretize");
startConcretizerButton.setGraphic(icon);
}
示例15: setConcretizerButtonStop
import de.jensd.fx.glyphs.GlyphsDude; //导入依赖的package包/类
/**
* Set concretizer button to a state that signals that the concretizer can be stopped.
*/
public void setConcretizerButtonStop() {
Text icon = GlyphsDude.createIcon(FontAwesomeIcon.STOP);
icon.setFill(Color.INDIANRED);
startConcretizerButton.setText("Stop Concretization");
startConcretizerButton.setGraphic(icon);
}