// Path: gameManager/src/org/dipgame/gameManager/utils/JTextPaneAppend.java
// public class JTextPaneAppend extends JTextPane{
// 	
// 	private static final long serialVersionUID = 1L;
// 
// 	public void append(String s,Color color, Boolean bold) {
// 		   try {
// 		      StyledDocument doc = (StyledDocument) this.getDocument();
// 		      Style style=doc.addStyle("name", null);
// 		      StyleConstants.setForeground(style, color);
// 		      StyleConstants.setBold(style, bold);
// 		      doc.insertString(doc.getLength(), s, style);
// 		   } catch(BadLocationException exc) {
// 		      exc.printStackTrace();
// 		   }
// 		}
// 	
// 	public void append2(String s, Color color, Boolean bold){
// 		StyledDocument doc = super.getStyledDocument();
// 		SimpleAttributeSet sa = new SimpleAttributeSet();
// 		StyleConstants.setAlignment(sa, StyleConstants.ALIGN_JUSTIFIED);
// 		StyleConstants.setLeftIndent(sa, 5);
// 		StyleConstants.setRightIndent(sa, 5);
// 		Style style = doc.addStyle("name", null);
// 		StyleConstants.setForeground(style, color);
// 		StyleConstants.setBold(style, bold);
// 		try {
// 			doc.insertString(doc.getLength(), s, style);
// 		} catch (BadLocationException e) {
// 			e.printStackTrace();
// 		}
// 		doc.setParagraphAttributes(0, doc.getLength(), sa, false);
// 	}
// 	
// 	  }
// 
// Path: gameManager/src/org/dipgame/gameManager/utils/TextBox.java
// public class TextBox extends JTextPane {
// 
// 	public TextBox(Color background) {
// 		this.setBackground(background);
// 		this.setAutoscrolls(true);
// 		this.setEditable(false);
// 	}
// 
// 	public TextBox(String description, Color background) {
// 		this(background);
// 		append(description, Color.black, false);
// 	}
// 
// 	public String getText() {
// 		return this.getText();
// 	}
// 
// 	public void append(String s, Color color, Boolean bold) {
// 		try {
// 			StyledDocument doc = super.getStyledDocument();
// 			SimpleAttributeSet sa = new SimpleAttributeSet();
// 			StyleConstants.setAlignment(sa, StyleConstants.ALIGN_JUSTIFIED);
// 			StyleConstants.setLeftIndent(sa, 10);
// 			StyleConstants.setRightIndent(sa, 10);
// 			StyleConstants.setSpaceAbove(sa, 5);
// 			StyleConstants.setSpaceBelow(sa, 5);
// 			Style style = doc.addStyle("name", null);
// 			StyleConstants.setForeground(style, color);
// 			StyleConstants.setBold(style, bold);
// 			doc.insertString(doc.getLength(), s, style);
// 			doc.setParagraphAttributes(0, doc.getLength(), sa, false);
// 		} catch (BadLocationException exc) {
// 			exc.printStackTrace();
// 		}
// 	}
// 
// 	public void revalidateAll() {
// 		this.revalidate();
// 	}
// }


import java.awt.Color;
import java.awt.Dimension;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.List;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import org.dipgame.gameManager.utils.JTextPaneAppend;
import org.dipgame.gameManager.utils.TextBox;
package org.dipgame.gameManager;




/**
 * AlertsFrame
 * 
 * @author Angela Fabregues, IIIA-CSIC, fabregues@iiia.csic.es
 */
public class AlertsFrame extends JFrame {
	
	private List<String> alerts;

	public AlertsFrame(List<String> alerts, int applicationHeight){
		this.alerts = alerts;
		
		this.setTitle("Game Manager alerts");
		this.setBackground(Utils.CYAN);
		
		JPanel alertMainPanel = new JPanel();
		alertMainPanel.setBackground(Utils.CYAN);
		BoxLayout boxLayout = new BoxLayout(alertMainPanel, BoxLayout.Y_AXIS);
		alertMainPanel.setLayout(boxLayout);
		alertMainPanel.add(MainPanel.createHeader());
		
		
		
		
		JPanel footer = new JPanel();
		footer.setBackground(Utils.CYAN);
		
		JPanel footerContent = new JPanel();
		footerContent.setBackground(Utils.BLUE);
		footerContent.setPreferredSize(new Dimension(325, 20));
		footerContent.add(Utils.getText("Game Manager outputs the following alerts:", new MouseAdapter() {
		
		}));
		
		footer.add(Utils.addBordersToLine(footerContent));
		alertMainPanel.add(footer);
		
		
		
			
		JPanel descriptionPanel = new JPanel();
		descriptionPanel.setBackground(Utils.CYAN);

		String description="";
		for(String alert: this.alerts){
			description+=alert+"\n\n";
		}
		
// Path: gameManager/src/org/dipgame/gameManager/utils/JTextPaneAppend.java
// public class JTextPaneAppend extends JTextPane{
// 	
// 	private static final long serialVersionUID = 1L;
// 
// 	public void append(String s,Color color, Boolean bold) {
// 		   try {
// 		      StyledDocument doc = (StyledDocument) this.getDocument();
// 		      Style style=doc.addStyle("name", null);
// 		      StyleConstants.setForeground(style, color);
// 		      StyleConstants.setBold(style, bold);
// 		      doc.insertString(doc.getLength(), s, style);
// 		   } catch(BadLocationException exc) {
// 		      exc.printStackTrace();
// 		   }
// 		}
// 	
// 	public void append2(String s, Color color, Boolean bold){
// 		StyledDocument doc = super.getStyledDocument();
// 		SimpleAttributeSet sa = new SimpleAttributeSet();
// 		StyleConstants.setAlignment(sa, StyleConstants.ALIGN_JUSTIFIED);
// 		StyleConstants.setLeftIndent(sa, 5);
// 		StyleConstants.setRightIndent(sa, 5);
// 		Style style = doc.addStyle("name", null);
// 		StyleConstants.setForeground(style, color);
// 		StyleConstants.setBold(style, bold);
// 		try {
// 			doc.insertString(doc.getLength(), s, style);
// 		} catch (BadLocationException e) {
// 			e.printStackTrace();
// 		}
// 		doc.setParagraphAttributes(0, doc.getLength(), sa, false);
// 	}
// 	
// 	  }
// 
// Path: gameManager/src/org/dipgame/gameManager/utils/TextBox.java
// public class TextBox extends JTextPane {
// 
// 	public TextBox(Color background) {
// 		this.setBackground(background);
// 		this.setAutoscrolls(true);
// 		this.setEditable(false);
// 	}
// 
// 	public TextBox(String description, Color background) {
// 		this(background);
// 		append(description, Color.black, false);
// 	}
// 
// 	public String getText() {
// 		return this.getText();
// 	}
// 
// 	public void append(String s, Color color, Boolean bold) {
// 		try {
// 			StyledDocument doc = super.getStyledDocument();
// 			SimpleAttributeSet sa = new SimpleAttributeSet();
// 			StyleConstants.setAlignment(sa, StyleConstants.ALIGN_JUSTIFIED);
// 			StyleConstants.setLeftIndent(sa, 10);
// 			StyleConstants.setRightIndent(sa, 10);
// 			StyleConstants.setSpaceAbove(sa, 5);
// 			StyleConstants.setSpaceBelow(sa, 5);
// 			Style style = doc.addStyle("name", null);
// 			StyleConstants.setForeground(style, color);
// 			StyleConstants.setBold(style, bold);
// 			doc.insertString(doc.getLength(), s, style);
// 			doc.setParagraphAttributes(0, doc.getLength(), sa, false);
// 		} catch (BadLocationException exc) {
// 			exc.printStackTrace();
// 		}
// 	}
// 
// 	public void revalidateAll() {
// 		this.revalidate();
// 	}
// }


// Path: gameManager/src/org/dipgame/gameManager/AlertsFrame.java
import java.awt.Color;
import java.awt.Dimension;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.List;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import org.dipgame.gameManager.utils.JTextPaneAppend;
import org.dipgame.gameManager.utils.TextBox;

package org.dipgame.gameManager;




/**
 * AlertsFrame
 * 
 * @author Angela Fabregues, IIIA-CSIC, fabregues@iiia.csic.es
 */
public class AlertsFrame extends JFrame {
	
	private List<String> alerts;

	public AlertsFrame(List<String> alerts, int applicationHeight){
		this.alerts = alerts;
		
		this.setTitle("Game Manager alerts");
		this.setBackground(Utils.CYAN);
		
		JPanel alertMainPanel = new JPanel();
		alertMainPanel.setBackground(Utils.CYAN);
		BoxLayout boxLayout = new BoxLayout(alertMainPanel, BoxLayout.Y_AXIS);
		alertMainPanel.setLayout(boxLayout);
		alertMainPanel.add(MainPanel.createHeader());
		
		
		
		
		JPanel footer = new JPanel();
		footer.setBackground(Utils.CYAN);
		
		JPanel footerContent = new JPanel();
		footerContent.setBackground(Utils.BLUE);
		footerContent.setPreferredSize(new Dimension(325, 20));
		footerContent.add(Utils.getText("Game Manager outputs the following alerts:", new MouseAdapter() {
		
		}));
		
		footer.add(Utils.addBordersToLine(footerContent));
		alertMainPanel.add(footer);
		
		
		
			
		JPanel descriptionPanel = new JPanel();
		descriptionPanel.setBackground(Utils.CYAN);

		String description="";
		for(String alert: this.alerts){
			description+=alert+"\n\n";
		}
		
		TextBox text = new TextBox(Color.white);