All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.factoryfx.javafx.view.ViewDescription Maven / Gradle / Ivy

There is a newer version: 4.0.1
Show newest version
package io.github.factoryfx.javafx.view;

import io.github.factoryfx.factory.util.LanguageText;
import io.github.factoryfx.javafx.util.UniformDesign;
import javafx.scene.control.MenuItem;
import javafx.scene.control.Tab;
import javafx.stage.Stage;
import org.controlsfx.glyphfont.FontAwesome;

public class ViewDescription {
    private final LanguageText text;
    private final FontAwesome.Glyph icon;
    private final UniformDesign uniformDesign;

    public ViewDescription(LanguageText text, FontAwesome.Glyph icon, UniformDesign uniformDesign) {
        this.text = text;
        this.icon = icon;
        this.uniformDesign = uniformDesign;
    }

    public void describeMenuItem(MenuItem menuItem){
        menuItem.setText(uniformDesign.getText(text));
        uniformDesign.addIcon(menuItem,icon);
    }

    public void describeTabView(Tab tab) {
        tab.setText(uniformDesign.getText(text));
        uniformDesign.addIcon(tab,icon);
    }

    public void describeStageView(Stage stage) {
        stage.setTitle(uniformDesign.getText(text));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy