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


Java IconNode类代码示例

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


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

示例1: StartDialogOpenTabElement

import jiconfont.javafx.IconNode; //导入依赖的package包/类
@SuppressWarnings("LeakingThisInConstructor")
public StartDialogOpenTabElement(String name, StartDialogOpenTabActionListener al) {
    super();
    elementAL = al;
    dbName = name;
    
    this.setAlignment(Pos.CENTER);
    
    final TopPanelButton navigateToImg = new TopPanelButton("dialog_db_select_icon", "Открыть БД", c -> {
        if (c.getClickCount() == 1) elementAL.OnSelect(dbName);
    });
    
    final IconNode iconNode = new IconNode();
    iconNode.getStyleClass().addAll("dialog_db_element_icon");

    this.getChildren().addAll(iconNode, title, navigateToImg);

    title.setText(name);
    title.setAlignment(Pos.CENTER_LEFT);
    title.getStyleClass().addAll("main_window_max_width", "main_window_max_height", "main_window_null_pane", "dialog_db_font");

    setSelected(false);
}
 
开发者ID:konachan700,项目名称:JNekoImageDB,代码行数:24,代码来源:StartDialogOpenTabElement.java

示例2: TopPanelInfobox

import jiconfont.javafx.IconNode; //导入依赖的package包/类
public TopPanelInfobox(String iconStyle) {
    super();
    this.setAlignment(Pos.CENTER_LEFT);
    this.getStyleClass().addAll("panel_max_width", "panel_max_height", "panel_null_pane");
    
    final VBox container = new VBox();
    container.setAlignment(Pos.CENTER_LEFT);
    container.getStyleClass().addAll("panel_max_width", "panel_max_height", "panel_null_pane");
    
    final Label icon = new Label();
    icon.getStyleClass().addAll("panel_button_width", "panel_max_height", "panel_null_pane");
    final IconNode iconNode = new IconNode();
    iconNode.getStyleClass().add(iconStyle);
    icon.setGraphic(iconNode);
    
    this.getChildren().addAll(icon, container);
    
    title.setAlignment(Pos.CENTER_LEFT);
    title.getStyleClass().addAll("panel_max_width", "panel_info_title_height", "panel_null_pane");
    text.setAlignment(Pos.TOP_LEFT);
    text.getStyleClass().addAll("panel_max_width", "panel_info_text_height", "panel_null_pane");
    
    container.getChildren().addAll(title, text);
}
 
开发者ID:konachan700,项目名称:JNekoImageDB,代码行数:25,代码来源:TopPanelInfobox.java

示例3: ThreadsListElement

import jiconfont.javafx.IconNode; //导入依赖的package包/类
public ThreadsListElement() {
    super();
    
    this.setAlignment(Pos.CENTER);
    this.getStyleClass().addAll("albums_max_width", "previews_element_height", "previews_element_root_pane", "albums_element_root_pane_non_selected");
    
    final IconNode iconNode = new IconNode();
    iconNode.getStyleClass().addAll("threads_list_element_icon");
    
    text.setAlignment(Pos.CENTER_LEFT);
    text.setWrapText(true);
    text.getStyleClass().addAll("albums_max_width", "albums_max_height", "previews_element_text");
    text.setText("");
    
    this.getChildren().addAll(
            iconNode,
            text
    );
}
 
开发者ID:konachan700,项目名称:JNekoImageDB,代码行数:20,代码来源:ThreadsListElement.java

示例4: MenuGroup

import jiconfont.javafx.IconNode; //导入依赖的package包/类
public MenuGroup(String groupName, String colorStyle, String iconStyle, MenuItem ... node) {
    super();
    
    this.getStyleClass().addAll("menu_group_container", "menu_max_width", colorStyle);
    this.setAlignment(Pos.CENTER_LEFT);
            
    final Label header = new Label(groupName);
    this.getChildren().addAll(header);
    header.getStyleClass().addAll("menu_group_header", "menu_max_width", "menu_element_height", colorStyle);
    final IconNode iconNode = new IconNode();
    iconNode.getStyleClass().add(iconStyle);
    header.setGraphic(iconNode); 
    
    for (MenuItem mi : node) {
        mi.registerServiceAL(serviceALX);
        items.add(mi);
        this.getChildren().add(mi);
    }
}
 
开发者ID:konachan700,项目名称:JNekoImageDB,代码行数:20,代码来源:MenuGroup.java

示例5: MenuItem

import jiconfont.javafx.IconNode; //导入依赖的package包/类
public MenuItem(String text, MenuActionListener m) {
    super(text);
    mil = m;
    this.getStyleClass().addAll("menu_item", "menu_max_width", "menu_element_height");
    this.setAlignment(Pos.CENTER_LEFT);
    final IconNode iconNode = new IconNode();
    iconNode.getStyleClass().add("menu_item_icon");
    this.setGraphic(iconNode); 
    this.setOnMouseClicked(c -> {
        if (!selected) {
            mil.OnClick(c);
            serviceAL.forEach(x -> {
                x.OnClick(c); 
            });
            setSelected(true);
        }
    });
}
 
开发者ID:konachan700,项目名称:JNekoImageDB,代码行数:19,代码来源:MenuItem.java

示例6: generateIconNode

import jiconfont.javafx.IconNode; //导入依赖的package包/类
public IconNode generateIconNode() {
    final IconNode iconNode = new IconNode();

    final Tooltip tooltip = new Tooltip(message);
    Tooltip.install(iconNode, tooltip);

    // Set the style of the icon
    iconNode.setFill(Color.GRAY);
    iconNode.iconCodeProperty().set(getIcon());

    // The icon should only be visible when it is present
    iconNode.visibleProperty().bind(presentProperty);

    return iconNode;
}
 
开发者ID:ulriknyman,项目名称:H-Uppaal,代码行数:16,代码来源:Issue.java

示例7: createFlyout

import jiconfont.javafx.IconNode; //导入依赖的package包/类
/**
 * Creates and returns a {@link Flyout}
 * 
 * @return a new {@link Flyout}
 */
public JFXPopup createFlyout() {
	marsNetBtn = new JFXButton();
	// marsNetBtn.getStyleClass().add("menu-button");//"button-raised");
	marsNetIcon = new IconNode(FontAwesome.COMMENTING_O);
	marsNetIcon.setIconSize(20);
	// marsNetButton.setPadding(new Insets(0, 0, 0, 0)); // Warning : this
	// significantly reduce the size of the button image
	setQuickToolTip(marsNetBtn, "Click to open MarsNet Chat Box");

	marsNetBox = new JFXPopup(createChatBox());
	marsNetBox.setOpacity(.9);

	marsNetBtn.setOnAction(e -> {
		if (!flag)
			chatBox.update();

		if (marsNetBox.isShowing()) {// .isVisible()) {
			marsNetBox.hide();// .close();
		} else {
			openChatBox();
		}
		e.consume();
	});

	return marsNetBox;
}
 
开发者ID:mars-sim,项目名称:mars-sim,代码行数:32,代码来源:MainScene.java

示例8: setDeleteMode

import jiconfont.javafx.IconNode; //导入依赖的package包/类
public final AlbumsElement setDeleteMode() {
    buttonsEnable = false;
    
    final IconNode iconNode = new IconNode();
    iconNode.getStyleClass().addAll("albums_delete_element_icon");
    navigateToImg.setGraphic(iconNode); 
    
    titleContainer.getChildren().clear();
    titleContainer.getChildren().addAll(title);
    return this;
}
 
开发者ID:konachan700,项目名称:JNekoImageDB,代码行数:12,代码来源:AlbumsElement.java

示例9: setSelectMode

import jiconfont.javafx.IconNode; //导入依赖的package包/类
public final AlbumsElement setSelectMode() {
    buttonsEnable = false;
    
    final IconNode iconNode = new IconNode();
    iconNode.getStyleClass().addAll("albums_add_to_element_icon");
    navigateToImg.setGraphic(iconNode); 
    
    titleContainer.getChildren().clear();
    titleContainer.getChildren().addAll(title);
    return this;
}
 
开发者ID:konachan700,项目名称:JNekoImageDB,代码行数:12,代码来源:AlbumsElement.java

示例10: setDir

import jiconfont.javafx.IconNode; //导入依赖的package包/类
public final void setDir() {
    final IconNode iconFolder = new IconNode();
    iconFolder.getStyleClass().addAll("pil_folder_item_icon");
    
    this.getChildren().clear();
    
    this.getChildren().addAll(iconFolder, selectedIcon, imageName);
    iconFolder.relocate(0, 0);
    selectedIcon.relocate(10, 10);
    imageName.relocate(0, itemSizeV - 23);
    
    this.getStyleClass().clear();
    this.getStyleClass().addAll("pil_item_root_pane");
}
 
开发者ID:konachan700,项目名称:JNekoImageDB,代码行数:15,代码来源:PagedFileListElement.java

示例11: addMenuItemBold

import jiconfont.javafx.IconNode; //导入依赖的package包/类
public MenuItem addMenuItemBold(String imageStyle, String title, EventHandler<ActionEvent> al) {
    final MenuItem mi = addMenuItemBold(title, al);
    final IconNode iconNode = new IconNode();
    iconNode.getStyleClass().addAll("menuitem_icon_color", imageStyle);
    mi.setGraphic(iconNode);
    return mi;
}
 
开发者ID:konachan700,项目名称:JNekoImageDB,代码行数:8,代码来源:TopPanelMenuButton.java

示例12: PreviewTypesElement

import jiconfont.javafx.IconNode; //导入依赖的package包/类
@SuppressWarnings("LeakingThisInConstructor")
public PreviewTypesElement(DSPreviewSize sz, PreviewTypesElementActionListener al) {
    super();
    thisSize = sz;
    eAL = al;
    
    this.setAlignment(Pos.CENTER);
    this.getStyleClass().addAll("albums_max_width", "previews_element_height", "albums_element_root_pane");
    
    final IconNode iconNode = new IconNode();
    iconNode.getStyleClass().addAll("previews_element_icon");
    
    textPreviews.setAlignment(Pos.CENTER_LEFT);
    textPreviews.setWrapText(true);
    textPreviews.getStyleClass().addAll("albums_max_width", "albums_max_height", "previews_element_text");
    textPreviews.setText("Ширина: "+sz.getWidth()+"px; Высота: "+sz.getHeight()+"px; "
            +((sz.isSquared()) ? "Квадратные; " : "Без обрезки; ")+
            ((sz.isPrimary()) ? "Используется;" : ""));
    
    this.getChildren().addAll(
            iconNode,
            textPreviews
    );
    
    if (!sz.isPrimary())
        this.getChildren().addAll(
                new PreviewTypesElementButton("previews_element_set_default_icon", "Установить как размер по-умолчанию", c -> {
                        eAL.OnSetDefault(this, sz); 
                }),
                new PreviewTypesElementButton("previews_element_delete_icon", "Удалить", c -> {
                        eAL.OnDelete(this, sz); 
                })
        );
    
    setSelected(false);
}
 
开发者ID:konachan700,项目名称:JNekoImageDB,代码行数:37,代码来源:PreviewTypesElement.java

示例13: PagedImageListElement

import jiconfont.javafx.IconNode; //导入依赖的package包/类
public PagedImageListElement(int itemSizeX, int itemSizeY, PagedImageListElementActionListener al) {
    super();
    actionListener = al;

    selectedIcon = new IconNode();
    selectedIcon.getStyleClass().add("pil_selected_item_icon");

    this.getStyleClass().addAll("pil_item_root_pane");
    this.setMaxSize(itemSizeX, itemSizeY);
    this.setPrefSize(itemSizeX, itemSizeY);

    this.setOnMouseClicked((MouseEvent event) -> {
        if (event.getClickCount() == 1) {
            if (event.getButton() == MouseButton.SECONDARY) {
                setSelected(!getSelected());
                actionListener.OnSelect(getSelected(), img);
            }
        } else {
            actionListener.OnOpen(img, this);
        }
        event.consume();
    });

    imageContainer.setPreserveRatio(true);
    imageContainer.setSmooth(true);
    imageContainer.setCache(false);
    imageContainer.setImage(GUITools.loadIcon("dummy-128"));

    imageVBox.setAlignment(Pos.CENTER);    
    imageVBox.getStyleClass().addAll("pil_item_null_pane");
    imageVBox.getChildren().add(imageContainer);

    selectedIcon.setVisible(false);

    addAll();
}
 
开发者ID:konachan700,项目名称:JNekoImageDB,代码行数:37,代码来源:PagedImageListElement.java

示例14: AlbumsElement

import jiconfont.javafx.IconNode; //导入依赖的package包/类
@SuppressWarnings("LeakingThisInConstructor")
public AlbumsElement(DSAlbum d, AlbumsElementActionListener al) {
    super();
    dsAlbum = d;
    elementAL = al;
    
    this.setAlignment(Pos.CENTER);
    
    navigateToImg = new TopPanelButton("albums_element_to_img_icon", "Перейти к просмотру альбома", c -> {
        if (c.getClickCount() == 1) elementAL.OnToImagesButtonClick(dsAlbum, c);
    });
    this.setOnMouseClicked(c -> {
        if (c.getClickCount() == 2) elementAL.OnDoubleClick(this, dsAlbum, c); 
        if (c.getClickCount() == 1) elementAL.OnClick(this, dsAlbum, c);
    });
    
    final IconNode iconNode = new IconNode();
    iconNode.getStyleClass().addAll("albums_element_icon");
    
    rootContainer.setAlignment(Pos.CENTER);
    rootContainer.getStyleClass().addAll("albums_max_width", "albums_max_height", "albums_null_pane");
    this.getChildren().addAll(iconNode, rootContainer, navigateToImg);
    
    titleContainer.setAlignment(Pos.CENTER);
    titleContainer.getStyleClass().addAll("albums_max_width", "albums_title_conainer_height", "albums_null_pane");
    
    titleEditorContainer.setAlignment(Pos.CENTER);
    titleEditorContainer.getStyleClass().addAll("albums_max_width", "albums_title_conainer_height", "albums_null_pane");
    
    title.setText(d.getAlbumName());
    title.setAlignment(Pos.CENTER_LEFT);
    title.getStyleClass().addAll("albums_max_width", "albums_title_conainer_height", "albums_null_pane", "album_element_title_font");
    
    titleEditor.setAlignment(Pos.CENTER_LEFT);
    titleEditor.getStyleClass().addAll("albums_max_width", "albums_title_conainer_height", "albums_null_pane", "album_element_title_font");
    
    text.setText(d.getAlbumText());
    text.setAlignment(Pos.TOP_LEFT);
    text.setWrapText(true);
    text.getStyleClass().addAll("albums_max_width", "albums_max_height", "albums_null_pane", "album_element_text_font");
    
    albumText.getStyleClass().addAll("albums_max_width", "albums_max_height", "albums_element_textarera");
    
    deleteBtn = new TagElementButton("albums_element_button_icon_delete", "Удалить элемент", el -> {
        elementAL.OnDelete(dsAlbum);
    });
    
    saveBtn = new TagElementButton("albums_element_button_icon_save", "Сохранить изменения", el -> {
        elementAL.OnEdit(dsAlbum, titleEditor.getText(), albumText.getText());
        editModeOff();
    });
    
    editBtn = new TagElementButton("albums_element_button_icon_edit", "Редактировать элемент", el -> {
        editModeOn();
    });
    
    titleContainer.getChildren().addAll(title,/* deleteBtn,*/ editBtn);
    titleEditorContainer.getChildren().addAll(titleEditor, saveBtn);
    
    editModeOff();
    setSelected(false);
}
 
开发者ID:konachan700,项目名称:JNekoImageDB,代码行数:63,代码来源:AlbumsElement.java


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