• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java MaterialDesignIcon类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon的典型用法代码示例。如果您正苦于以下问题:Java MaterialDesignIcon类的具体用法?Java MaterialDesignIcon怎么用?Java MaterialDesignIcon使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MaterialDesignIcon类属于de.jensd.fx.glyphs.materialdesignicons包,在下文中一共展示了MaterialDesignIcon类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setState

import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; //导入依赖的package包/类
/**
 * GUI Method to switch the displayed panes.
 *
 * @param state A state from the defined Enum
 */
public void setState(final State state) {
    switch (state) {

        case LOGINACTIVE:
            this.getChildren().clear();
            this.getChildren().addAll(loginLayout);
            this.statusIcon.getChildren().clear();
            this.statusIcon.getChildren().addAll(new SVGIcon(MaterialDesignIcon.LOGIN, Constants.MIDDLE_ICON,
                    true));
            break;

        case LOGOUT:
            this.getChildren().clear();
            this.getChildren().addAll(logoutLayout);
            this.statusIcon.getChildren().clear();
            this.statusIcon.getChildren().addAll(new SVGIcon(MaterialDesignIcon.LOGOUT, Constants.MIDDLE_ICON,
                    true));
            break;

    }
}
 
开发者ID:openbase,项目名称:bco.bcozy,代码行数:27,代码来源:LoginPane.java


示例2: setupTable

import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; //导入依赖的package包/类
private void setupTable() {
    colFile.setCellValueFactory(cellData -> cellData.getValue().getFile());
    colMessage.setCellValueFactory(cellData -> cellData.getValue().getMessage());
    colStatus.setCellValueFactory(cellData -> cellData.getValue().getIcon());

    colFile.setCellFactory(new ValueTableCellFactory<CopyFilesResultItemViewModel, String>().withText(item -> item).withTooltip(item -> item));
    colStatus.setCellFactory(new ValueTableCellFactory<CopyFilesResultItemViewModel, MaterialDesignIcon>().withGraphic(item -> {

        Text icon = MaterialDesignIconFactory.get().createIcon(item);
        if (item == MaterialDesignIcon.CHECK) {
            icon.setFill(Color.GREEN);
        }
        if (item == MaterialDesignIcon.ALERT) {
            icon.setFill(Color.RED);
        }
        return icon;
    }));

    tvResult.setItems(viewModel.copyFilesResultListProperty());
    tvResult.setColumnResizePolicy((param) -> true);
}
 
开发者ID:JabRef,项目名称:jabref,代码行数:22,代码来源:CopyFilesDialogController.java


示例3: resolve

import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; //导入依赖的package包/类
@Override
public GlyphIcons resolve(final String fontIconName) {
    final ObservableList<GlyphIcons> glyphIcons = FXCollections.observableArrayList();
    glyphIcons.addAll(MaterialDesignIcon.values());
    
    final Optional<GlyphIcons> oGlyphIcons = glyphIcons
            .stream()
            .filter((gi) ->  gi.name().equals(fontIconName) )
            .findFirst();
    if (oGlyphIcons.isPresent()) {
        return oGlyphIcons.get();
    }
    
    return null;
}
 
开发者ID:Naoghuman,项目名称:Incubator,代码行数:16,代码来源:MaterialDesignFontAwesomeFXHandler.java


示例4: testGlyphIconsIsFound

import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; //导入依赖的package包/类
@Test
public void testGlyphIconsIsFound() {
    final String fontIconName = "ACCOUNT_ALERT";
    final GlyphIcons actualGlyphIcons = handler.resolve(fontIconName);

    assertNotNull("actualGlyphIcons can't be NULL", actualGlyphIcons);

    final GlyphIcons expectedGlyphIcons = MaterialDesignIcon.ACCOUNT_ALERT;
    assertEquals("actualGlyphIcons.ACCOUNT_ALERT must be MaterialDesignIcon.ACCOUNT_ALERT", expectedGlyphIcons, actualGlyphIcons);
}
 
开发者ID:Naoghuman,项目名称:Incubator,代码行数:11,代码来源:MaterialDesignFontAwesomeFXHandlerTest.java


示例5: makeIcon

import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; //导入依赖的package包/类
/**
 * Create icon for whatever, sized for zest writer menu
 * @param type code name of material design icon
 * @param cssClass css class for override standard
 * @return material icon
 */
public static MaterialDesignIconView makeIcon(MaterialDesignIcon type, String cssClass) {
    MaterialDesignIconView icon = new MaterialDesignIconView(type);
    icon.setSize("1.8em");
    icon.setStyleClass(cssClass);
    return icon;
}
 
开发者ID:firm1,项目名称:zest-writer,代码行数:13,代码来源:IconFactory.java


示例6: setFoundIcon

import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; //导入依赖的package包/类
private void setFoundIcon(CacheListEntry cache) {
    if (cache.getFound()) {
        foundIcon.setText(MaterialDesignIcon.CHECK.characterToString());
    } else {
        foundIcon.setText("");
    }
}
 
开发者ID:frosch95,项目名称:GeoFroggerFX,代码行数:8,代码来源:CacheListCell.java


示例7: setLogLinkButton

import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; //导入依赖的package包/类
private void setLogLinkButton() {
    Button logLink = MaterialDesignIconFactory.get().createIconButton(MaterialDesignIcon.LINK_VARIANT);
    logLink.setStyle("-fx-background-color: transparent;");
    logButtonPane.getChildren().add(logLink);


    logLink.setOnAction(event -> {
        Cache cache = (Cache) sessionContext.getData(CURRENT_CACHE);
        if (cache != null) {
            showLogPopOver(logLink, cache);
        }
    });
}
 
开发者ID:frosch95,项目名称:GeoFroggerFX,代码行数:14,代码来源:DetailsController.java


示例8: createPalette

import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; //导入依赖的package包/类
private Text createPalette(String styleClass) {
    Text t = GlyphsDude.createIcon(MaterialDesignIcon.PALETTE);
    if (styleClass != null) {
        t.getStyleClass().add(styleClass);
    }
    return t;
}
 
开发者ID:dejv78,项目名称:jfx.radialmenu,代码行数:8,代码来源:DemoFXMLController.java


示例9: CenterPane

import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; //导入依赖的package包/类
/**
 * Constructor for the center pane.
 */
public CenterPane(final double height, final ForegroundPane foregroundPane) {
    this.foregroundPane = foregroundPane;

    appStateProperty = new SimpleObjectProperty<>(CenterPaneController.State.MOVEMENT);

    // Initializing components
    this.settingsMenu = loadSettingsMenu(height);

    // Initializing view mode switch
    final FloatingPopUp viewModes = new FloatingPopUp(Pos.BOTTOM_RIGHT);
    viewModes.addParentElement(MaterialIcon.WEEKEND, () -> {
        appStateProperty.set(CenterPaneController.State.MOVEMENT);
    });
    viewModes.addElement(MaterialDesignIcon.THERMOMETER_LINES, () -> {
        appStateProperty.set(CenterPaneController.State.TEMPERATURE);
    });
    viewModes.addElement(MaterialIcon.VISIBILITY, () -> {
        appStateProperty.set(CenterPaneController.State.SETTINGS);
    });

    //final FloatingButton settingsBtn = new FloatingButton(new SVGIcon(MaterialDesignIcon.SETTINGS, Constants.MIDDLE_ICON, true));
    //this.setAlignment(settingsBtn, Pos.TOP_RIGHT);
    //settingsBtn.setOnAction(e -> toggleSettings());
    // Styling components with CSS
    this.getStyleClass().addAll("padding-small");

    this.setPickOnBounds(false);
    this.getChildren().addAll(viewModes);

    this.setMinHeight(height);
    this.setPrefHeight(height);
}
 
开发者ID:openbase,项目名称:bco.bcozy,代码行数:36,代码来源:CenterPane.java


示例10: updateDynamicContent

import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; //导入依赖的package包/类
@Override
public void updateDynamicContent() {
    super.updateDynamicContent();
    try {
        switch (getUnitRemote().getData().getContactState().getValue()) {
            case CLOSED:
                setIcon(MaterialIcon.RADIO_BUTTON_CHECKED, MaterialIcon.LENS);
                getIcon().setForegroundIconColor(Color.BLACK);
                getIcon().setBackgroundIconColor(Color.WHITE);
                break;
            case OPEN:
                setIcon(MaterialIcon.RADIO_BUTTON_UNCHECKED, MaterialIcon.LENS);
                getIcon().setForegroundIconColor(Color.BLACK);
                getIcon().setBackgroundIconColor(Color.WHITE);
                break;
            case UNKNOWN:
            default:
                setIcon(MaterialDesignIcon.HELP_CIRCLE, MaterialDesignIcon.CHECKBOX_BLANK_CIRCLE);
                getIcon().setForegroundIconColor(Color.ORANGE);
                getIcon().setBackgroundIconColor(Color.BLACK);
                break;
        }
    } catch (CouldNotPerformException ex) {
        setIcon(MaterialDesignIcon.HELP_CIRCLE, MaterialDesignIcon.CHECKBOX_BLANK_CIRCLE);
        getIcon().setForegroundIconColor(Color.RED);
        getIcon().setBackgroundIconColor(Color.BLACK);
    }
}
 
开发者ID:openbase,项目名称:bco.bcozy,代码行数:29,代码来源:ReedContactPane.java


示例11: updateDynamicContent

import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; //导入依赖的package包/类
@Override
public void updateDynamicContent() {
    super.updateDynamicContent();

    State state = State.UNKNOWN;

    try {
        state = getUnitRemote().getData().getTamperState().getValue();
    } catch (CouldNotPerformException ex) {
        ExceptionPrinter.printHistory(ex, LOGGER, LogLevel.DEBUG);
    }

    switch (state) {
        case NO_TAMPER:
            getIcon().setForegroundIcon(MaterialDesignIcon.CHECKBOX_MARKED_CIRCLE_OUTLINE);
            setInfoText("noTamper");
            break;
        case TAMPER:
            getIcon().setForegroundIcon(MaterialDesignIcon.ALERT_CIRCLE, Color.RED);
            getIcon().startForegroundIconColorFadeAnimation(Animation.INDEFINITE);
            setInfoText("tamper");
            break;
        default:
            setInfoText("unknown");
            break;
    }
}
 
开发者ID:openbase,项目名称:bco.bcozy,代码行数:28,代码来源:TamperDetectorPane.java


示例12: AvailableUsersPane

import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; //导入依赖的package包/类
/**
 * Constructor for the AvailableUsersPane.
 */
public AvailableUsersPane() {
    searchField = new CustomTextField();
    searchField.setRight(new SVGIcon(FontAwesomeIcon.SEARCH, Constants.EXTRA_SMALL_ICON, true));

    searchField.textProperty().addListener((observable, oldValue, newValue) -> search(newValue));

    userPanes = new VBox(Constants.INSETS);
    statusIcon = new BorderPane(new SVGIcon(MaterialDesignIcon.ACCOUNT_CIRCLE, Constants.MIDDLE_ICON, true));

    final ScrollPane verticalScrollPane = new ScrollPane();
    verticalScrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
    verticalScrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);

    final ScrollBar scrollBar = new ScrollBar();
    scrollBar.setOrientation(Orientation.VERTICAL);
    this.hiddenSidesPane = new HiddenSidesPane();
    hiddenSidesPane.setContent(verticalScrollPane);
    hiddenSidesPane.setRight(scrollBar);
    //hiddenSidesPane.setTriggerDistance(Constants.TRIGGER_DISTANCE);

    scrollBar.maxProperty().bind(verticalScrollPane.vmaxProperty());
    scrollBar.minProperty().bind(verticalScrollPane.vminProperty());

    verticalScrollPane.setContent(userPanes);
    verticalScrollPane.setFitToWidth(true);
    enableSearchField(false);

    hoverProperty().addListener((observable, oldValue, newValue) -> {
        enableSearchField(newValue);
    });
}
 
开发者ID:openbase,项目名称:bco.bcozy,代码行数:35,代码来源:AvailableUsersPane.java


示例13: start

import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; //导入依赖的package包/类
@Override
public void start(Stage primaryStage) throws Exception {
    BorderPane pane = new BorderPane();
    Scene scene = new Scene(pane, 300, 300);
    primaryStage.setScene(scene);


    /*
    CenterPane centerPane = new CenterPane();
    pane.setCenter(centerPane);
    centerPane.setViewSwitchingButtonsVisible(true);
    new CenterPaneController(centerPane);
    */

    popUp = new FloatingPopUp(Pos.TOP_CENTER);
    popUp.addParentElement(MaterialIcon.SETTINGS, this::setMaximizeAction);
    popUp.addElement(MaterialDesignIcon.THERMOMETER_LINES, this::setMaximizeAction);
    popUp.addElement(MaterialIcon.VISIBILITY, this::setMaximizeAction);

    popUp.addElement(MaterialIcon.ACCESS_ALARM, event -> System.out.println("ACCESS_ALARM"));
    pane.setLeft(popUp);


    popUp = new FloatingPopUp(Pos.TOP_CENTER);
    popUp.addElement(MaterialIcon.FULLSCREEN, this::setMaximizeAction);
    popUp.addParentElement(MaterialIcon.FULLSCREEN_EXIT, this::setMaximizeAction);
    pane.setRight(popUp);

    primaryStage.show();

}
 
开发者ID:openbase,项目名称:bco.bcozy,代码行数:32,代码来源:CenterPaneTest.java


示例14: createFileDisplay

import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; //导入依赖的package包/类
private static Node createFileDisplay(LinkedFileViewModel linkedFile) {
    Text icon = MaterialDesignIconFactory.get().createIcon(linkedFile.getTypeIcon());
    icon.setOnMouseClicked(event -> linkedFile.open());
    Text link = new Text(linkedFile.getLink());
    Text desc = new Text(linkedFile.getDescription());

    ProgressBar progressIndicator = new ProgressBar();
    progressIndicator.progressProperty().bind(linkedFile.downloadProgressProperty());
    progressIndicator.visibleProperty().bind(linkedFile.downloadOngoingProperty());

    Button acceptAutoLinkedFile = MaterialDesignIconFactory.get().createIconButton(MaterialDesignIcon.BRIEFCASE_CHECK);
    acceptAutoLinkedFile.setTooltip(new Tooltip(Localization.lang("This file was found automatically. Do you want to link it to this entry?")));
    acceptAutoLinkedFile.visibleProperty().bind(linkedFile.isAutomaticallyFoundProperty());
    acceptAutoLinkedFile.setOnAction(event -> linkedFile.acceptAsLinked());
    acceptAutoLinkedFile.getStyleClass().setAll("flatButton");

    Button writeXMPMetadata = MaterialDesignIconFactory.get().createIconButton(MaterialDesignIcon.IMPORT);
    writeXMPMetadata.setTooltip(new Tooltip(Localization.lang("Write BibTeXEntry as XMP-metadata to PDF.")));
    writeXMPMetadata.visibleProperty().bind(linkedFile.canWriteXMPMetadataProperty());
    writeXMPMetadata.setOnAction(event -> linkedFile.writeXMPMetadata());
    writeXMPMetadata.getStyleClass().setAll("flatButton");

    HBox container = new HBox(10);
    container.setPrefHeight(Double.NEGATIVE_INFINITY);

    if (desc.getText().isEmpty()) {
        container.getChildren().addAll(icon, link, progressIndicator, acceptAutoLinkedFile, writeXMPMetadata);
    } else {
        container.getChildren().addAll(icon, desc, link, progressIndicator, acceptAutoLinkedFile, writeXMPMetadata);
    }

    return container;
}
 
开发者ID:JabRef,项目名称:jabref,代码行数:34,代码来源:LinkedFilesEditor.java


示例15: withIcon

import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; //导入依赖的package包/类
public ViewModelTreeTableCellFactory<S, T> withIcon(Callback<S, MaterialDesignIcon> toIcon, Callback<S, Paint> toColor) {
    this.toGraphic = viewModel -> {
        Text graphic = MaterialDesignIconFactory.get().createIcon(toIcon.call(viewModel));
        graphic.setFill(toColor.call(viewModel));
        return graphic;
    };
    return this;
}
 
开发者ID:JabRef,项目名称:jabref,代码行数:9,代码来源:ViewModelTreeTableCellFactory.java


示例16: CopyFilesResultItemViewModel

import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; //导入依赖的package包/类
public CopyFilesResultItemViewModel(Path file, boolean success, String message) {
    this.file.setValue(file.toString());
    this.message.setValue(message);
    if (success) {
        this.icon.setValue(MaterialDesignIcon.CHECK);
    }
}
 
开发者ID:JabRef,项目名称:jabref,代码行数:8,代码来源:CopyFilesResultItemViewModel.java


示例17: ConfirmationDialogContent

import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; //导入依赖的package包/类
ConfirmationDialogContent(MaterialDesignIcon icon) {
    getStyleClass().addAll(Style.CONTAINER.css());
    messageTitle.getStyleClass().add("-pdfsam-dialog-title");
    messageContent.getStyleClass().add("-pdfsam-dialog-message");
    VBox messages = new VBox(messageTitle, messageContent);
    messages.getStyleClass().add("-pdfsam-dialog-messages");
    getChildren().addAll(GlyphsDude.createIcon(icon, "42.0"), messages);
    getStyleClass().addAll("-pdfsam-dialog-content");
}
 
开发者ID:torakiki,项目名称:pdfsam,代码行数:10,代码来源:ConfirmationDialogContent.java


示例18: ModulesDashboardTile

import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; //导入依赖的package包/类
ModulesDashboardTile(Module module) {
    super(module.descriptor().getName(), module.descriptor().getDescription(), module.graphic());
    this.id = module.id();
    setOnAction(e -> eventStudio().broadcast(activeteModule(id)));

    module.descriptor().getSupportURL().ifPresent(url -> {
        UrlButton helpButton = UrlButton.urlButton(null, url, null, "pdfsam-toolbar-button");
        helpButton.setGraphic(GlyphsDude.createIcon(MaterialDesignIcon.HELP_CIRCLE, "1.4em"));
        toolButtons.getChildren().add(helpButton);
        toolButtons.getStyleClass().add("dashboard-modules-toolbar");
        addBottomPanel(toolButtons);
    });
    setOnDragOver(e -> dragConsume(e, this.onDragOverConsumer()));
    setOnDragDropped(e -> dragConsume(e, this.onDragDropped()));
}
 
开发者ID:torakiki,项目名称:pdfsam,代码行数:16,代码来源:ModulesDashboardTile.java


示例19: LogButton

import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; //导入依赖的package包/类
LogButton() {
    super(MaterialDesignIcon.COMMENT_ALERT_OUTLINE);
    setOnAction(e -> eventStudio().broadcast(action, "LogStage"));
    setTooltip(new Tooltip(DefaultI18nContext.getInstance().i18n("Application messages")));
    anim = Animations.shake(this);
    eventStudio().addAnnotatedListeners(this);
}
 
开发者ID:torakiki,项目名称:pdfsam,代码行数:8,代码来源:LogButton.java


示例20: NewsButton

import de.jensd.fx.glyphs.materialdesignicons.MaterialDesignIcon; //导入依赖的package包/类
NewsButton() {
    super(MaterialDesignIcon.NEWSPAPER);
    setOnAction(e -> {
        eventStudio().broadcast(action);
        action = switchAction();
    });
    setTooltip(new Tooltip(DefaultI18nContext.getInstance().i18n("What's new")));
    anim = Animations.shake(this);
    eventStudio().addAnnotatedListeners(this);
}
 
开发者ID:torakiki,项目名称:pdfsam,代码行数:11,代码来源:NewsButton.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ErrorsException类代码示例发布时间:2022-05-22
下一篇:
Java GetQueueUserAclsInfoRequestProto类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap