com.github.athi.athifx.gui.menu.item.AMenuItem 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.item;
import com.github.athi.athifx.gui.font_awesome.FontAwesome;
import com.github.athi.athifx.gui.navigation.navigator.Navigator;
import javafx.geometry.Pos;
import javafx.scene.control.Button;
/**
* Created by Athi
*/
public class AMenuItem extends Button {
public AMenuItem(Item item, Navigator navigator) {
setPrefWidth(200);
prefHeight(20);
setAlignment(Pos.CENTER_LEFT);
setText(item.caption());
setId(item.itemId());
setOnAction(event -> navigator.navigateTo(item));
setGraphic(FontAwesome.labelIcon(item.icon(), 16));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy