package PieContext;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Polygon;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.LinkedList;
import java.util.List;
@SuppressWarnings("serial")
public class PieMenu extends PieItem {
protected List<PieItem> items;
protected boolean clicked;
public PieMenu(){
super();
clicked = false;
items = new LinkedList<PieItem>();
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
System.out.println("clicked");
clicked = true;
repaint();
}
});
}
public void paintComponent(Graphics g){
super.paintComponent(g);
Graphics2D g2d = (Graphics2D)g;
g2d.setColor(Color.DARK_GRAY);
g2d.fillOval(240, 140, 10, 10);
/*if(clicked){
for(int i=0;i<items.size();i++){
System.out.println(getParent());
getParent().add(items.get(i), new Integer(2));
}
clicked = false;
} */
}
public void addPieItem(PieItem item){
items.add(item);
}
}