com.github.athi.athifx.gui.menu.group.AMenuGroup Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of athi-fx-gui Show documentation
Show all versions of athi-fx-gui Show documentation
AthiFX project for creating JavaFX simple application GUI.
The newest version!
package com.github.athi.athifx.gui.menu.group;
import com.github.athi.athifx.gui.font_awesome.FontAwesome;
import com.github.athi.athifx.gui.menu.item.AMenuItem;
import javafx.geometry.Insets;
import javafx.scene.control.TitledPane;
import javafx.scene.layout.VBox;
import java.util.List;
/**
* Created by Athi
*/
public class AMenuGroup extends TitledPane {
public AMenuGroup(Group group, List items) {
setPadding(Insets.EMPTY);
setId(group.itemId());
setText(group.caption());
setGraphic(FontAwesome.labelIcon(group.icon(), 16));
VBox groupContent = new VBox();
groupContent.setPadding(Insets.EMPTY);
items.forEach(item -> groupContent.getChildren().add(item));
setContent(groupContent);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy