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;
|
2017-11-14 08:09:25 +00:00
|
|
|
private FlowPane parent;
|
2017-11-14 07:22:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* Constructor */
|
2017-11-14 08:09:25 +00:00
|
|
|
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);
|
2017-11-14 08:09:25 +00:00
|
|
|
// Add to parent
|
|
|
|
parent.getChildren().add(p_item);
|
2017-11-14 07:22:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|