package gui.panels.agenda;

import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.Font;
import java.util.Calendar;
import java.util.GregorianCalendar;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

@SuppressWarnings("serial")
public class DaySelectorPane extends JPanel{
	private JLabel buttonLeft, buttonRight;
	private JLabel dateLabel;
	
	public DaySelectorPane(){
		this.setLayout(new FlowLayout());
		addContent();
		this.setOpaque(true);
		this.setBackground(Color.WHITE);
	}
	
	private void addContent(){
		buttonLeft = new JLabel();
		dateLabel = new JLabel();
		dateLabel.setFont(new Font("Arial", Font.PLAIN, 11));
		dateLabel.setForeground(new Color(51,51,51));
		buttonRight = new JLabel();
		buttonLeft.setIcon(new ImageIcon("E:\\Bibliotheek\\Documenten\\Workspaces\\FestivalPlanner\\res\\left.png"));
		buttonRight.setIcon(new ImageIcon("E:\\Bibliotheek\\Documenten\\Workspaces\\FestivalPlanner\\res\\right.png"));
		this.add(buttonLeft);
		this.add(dateLabel);
		this.add(buttonRight);
	}
	
	public void setDate(GregorianCalendar date){
		dateLabel.setText(date.get(Calendar.YEAR) + "-" + (date.get(Calendar.MONTH)+1) + "-" + date.get(Calendar.DATE));
	}

	public JLabel getButtonLeft() {
		return buttonLeft;
	}

	public JLabel getButtonRight() {
		return buttonRight;
	}	
}
