JavaFX/controller/HeaderMenu.java

29 lines
500 B
Java
Raw Normal View History

2017-11-14 07:22:26 +00:00
package controller;
import java.util.ArrayList;
import javafx.scene.layout.FlowPane;
import model.HeaderMenuItem;
public class HeaderMenu{
/* Data */
private ArrayList<HeaderMenuItem> items;
private FlowPane parent;
2017-11-14 07:22:26 +00:00
/* Constructor */
public HeaderMenu(FlowPane p_parent){
this.parent = p_parent;
2017-11-14 07:22:26 +00:00
this.items = new ArrayList<HeaderMenuItem>();
}
public void addItem(HeaderMenuItem p_item) {
this.items.add(p_item);
// Add to parent
parent.getChildren().add(p_item);
2017-11-14 07:22:26 +00:00
}
}