package TodoListApp.GUI_UserInterface;

import java.awt.Color;
import java.awt.Font;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.SwingConstants;
import javax.swing.border.EmptyBorder;

public class MarkTask extends JFrame {
	private static final long serialVersionUID = 1L;
	private JPanel contentPane;
	private JTextField markTaskEingabe;
	private JButton markTaskButton;

	public MarkTask() {
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		setBounds(100, 100, 417, 424);
		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, 192));
		panel.setBounds(40, 48, 333, 263);
		contentPane.add(panel);
		panel.setLayout(null);
		
		JLabel lblNewLabel = new JLabel("Task markieren");
		lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 14));
		lblNewLabel.setForeground(new Color(255, 255, 255));
		lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
		lblNewLabel.setBounds(28, 11, 256, 29);
		panel.add(lblNewLabel);
		
		JLabel lblNewLabel_1 = new JLabel("Title: ");
		lblNewLabel_1.setFont(new Font("Tahoma", Font.BOLD, 12));
		lblNewLabel_1.setForeground(new Color(255, 255, 255));
		lblNewLabel_1.setBounds(65, 69, 77, 17);
		panel.add(lblNewLabel_1);
		
		markTaskEingabe = new JTextField();
		markTaskEingabe.setBounds(128, 67, 114, 21);
		panel.add(markTaskEingabe);
		markTaskEingabe.setColumns(10);
		
		markTaskButton = new JButton("Submit");
		markTaskButton.setBounds(65, 121, 105, 27);
		panel.add(markTaskButton);
		setLocationRelativeTo(null); 
	}
	
	public void zeigeFenster() {
		this.setVisible(true);
	}

	
	
	public JTextField getMarkTaskEingabe() {
		return markTaskEingabe;
	}

	public void setMarkTaskEingabe(JTextField markTaskEingabe) {
		this.markTaskEingabe = markTaskEingabe;
	}

	public JButton getMarkTaskButton() {
		return markTaskButton;
	}

	public void showInfo(String message) {
		  JOptionPane.showMessageDialog(null, message, "Task gelöscht", JOptionPane.INFORMATION_MESSAGE);
	}
	public void showError(String message) {
		  JOptionPane.showMessageDialog(null, message, "Task gelöscht", JOptionPane.ERROR_MESSAGE);
	}
}
