package TodoListApp.GUI_UserInterface;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.Color;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.SwingConstants;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.Font;

public class RemoveTask extends JFrame {

	private static final long serialVersionUID = 1L;
	private JPanel contentPane;
	private JTextField removeTaskEingabe;
	private JButton removeTaskButton;

	public RemoveTask() {
		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 Löschen");
		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);
		
		removeTaskEingabe = new JTextField();
		removeTaskEingabe.setBounds(128, 67, 114, 21);
		panel.add(removeTaskEingabe);
		removeTaskEingabe.setColumns(10);
		
		removeTaskButton = new JButton("Submit");
		removeTaskButton.setBounds(65, 121, 105, 27);
		panel.add(removeTaskButton);
		setLocationRelativeTo(null); 
	}
	
	public void zeigeFenster() {
		this.setVisible(true);
	}

	public JTextField getRemoveTaskEingabe() {
		return removeTaskEingabe;
	}

	public void setRemoveTaskEingabe(JTextField removeTaskEingabe) {
		this.removeTaskEingabe = removeTaskEingabe;
	}

	public JButton getRemoveTaskButton() {
		return removeTaskButton;
	}
	
	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);
	}
	
}