package TodoListApp.GUI_UserInterface;

import java.awt.*;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
import javax.swing.table.DefaultTableModel;

import TodoListApp.Domain.*;

public class GUI_UserInterface extends JFrame {
	
    private JPanel contentPane;
    private JButton addTask;
    private JButton zeigeAlleTasks;
    private JTextArea AllTasksArea;
    private JButton clear;
    private JButton removeTask;
    private JButton taskDone;
    private JButton zeigeAlleGemachteTasks;
    
    public GUI_UserInterface() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE );
        setBounds(100, 100, 696, 661);
        contentPane = new JPanel();
        contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));

        setContentPane(contentPane);
        contentPane.setLayout(null);
        
        JPanel panel = new JPanel();
        panel.setBackground(new Color(0, 128, 255));
        panel.setBounds(0, 0, 680, 622);
        contentPane.add(panel);
        panel.setLayout(null);
        
        JLabel lblNewLabel = new JLabel("TO DO List");
        lblNewLabel.setForeground(new Color(255, 255, 255));
        lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
        lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 22));
        lblNewLabel.setBounds(152, 24, 340, 57);
        panel.add(lblNewLabel);
        
        JPanel panel_1 = new JPanel();
        panel_1.setBounds(10, 97, 660, 398);
        panel.add(panel_1);
        panel_1.setLayout(null);
        
        AllTasksArea = new JTextArea();
        AllTasksArea.setEditable(false);
        AllTasksArea.setForeground(new Color(0, 0, 0));
        AllTasksArea.setFont(new Font("Arial", Font.BOLD, 14));
        AllTasksArea.setBounds(10, 11, 640, 376);
        panel_1.add(AllTasksArea);
        
        addTask = new JButton("Task hinzufügen");
        addTask.setBounds(10, 506, 159, 29);
        panel.add(addTask);
        
        zeigeAlleTasks = new JButton("Alle Taks");
        zeigeAlleTasks.setBounds(193, 506, 159, 29);
        panel.add(zeigeAlleTasks);
        
        clear = new JButton("Clear TextArea");
        clear.setBounds(384, 506, 159, 29);
        panel.add(clear);
        
        removeTask = new JButton("Task Löschen");
        removeTask.setBounds(10, 547, 159, 27);
        panel.add(removeTask);
        
        taskDone = new JButton("Gemacht!");
        taskDone.setBounds(193, 549, 159, 25);
        panel.add(taskDone);
        
        zeigeAlleGemachteTasks = new JButton("Zeige Alle gemachte Taks");
        zeigeAlleGemachteTasks.setBounds(384, 546, 159, 29);
        panel.add(zeigeAlleGemachteTasks);
        setLocationRelativeTo(null); 
        this.setVisible(true);

    }

	public JButton getAddTask() {
		return addTask;
	}

	public JButton getZeigeAlleTasks() {
		return zeigeAlleTasks;
	}

	public JTextArea getAllTasksArea() {
		return AllTasksArea;
	}

	public void setAllTasksArea(JTextArea allTasksArea) {
		AllTasksArea = allTasksArea;
	}
	public void showInfo(String message) {
		  JOptionPane.showMessageDialog(null, message, "Studen angemeldet", JOptionPane.INFORMATION_MESSAGE);
	}

	public JButton getClear() {
		return clear;
	}

	public JButton getRemoveTask() {
		return removeTask;
	}

	public JButton getTaskDone() {
		return taskDone;
	}

	public JButton getZeigeAlleGemachteTasks() {
		return zeigeAlleGemachteTasks;
	}
	
	
	
}