// Path: gameManager/src/org/dipgame/gameManager/utils/BareBonesBrowserLaunch.java
// public class BareBonesBrowserLaunch {
// 
// 	static final String[] browsers = { "google-chrome", "firefox", "opera",
// 			"epiphany", "konqueror", "conkeror", "midori", "kazehakase",
// 			"mozilla" };
// 	static final String errMsg = "Error attempting to launch web browser";
// 
// 	public static void openURL(String url) {
// 		try { // attempt to use Desktop library from JDK 1.6+
// 			Class<?> d = Class.forName("java.awt.Desktop");
// 			d.getDeclaredMethod("browse", new Class[] { java.net.URI.class })
// 					.invoke(d.getDeclaredMethod("getDesktop").invoke(null),
// 							new Object[] { java.net.URI.create(url) });
// 			// above code mimicks: java.awt.Desktop.getDesktop().browse()
// 		} catch (Exception ignore) { // library not available or failed
// 			String osName = System.getProperty("os.name");
// 			try {
// 				if (osName.startsWith("Mac OS")) {
// 					Class.forName("com.apple.eio.FileManager")
// 							.getDeclaredMethod("openURL",
// 									new Class[] { String.class })
// 							.invoke(null, new Object[] { url });
// 				} else if (osName.startsWith("Windows"))
// 					Runtime.getRuntime().exec(
// 							"rundll32 url.dll,FileProtocolHandler " + url);
// 				else { // assume Unix or Linux
// 					String browser = null;
// 					for (String b : browsers)
// 						if (browser == null
// 								&& Runtime.getRuntime()
// 										.exec(new String[] { "which", b })
// 										.getInputStream().read() != -1)
// 							Runtime.getRuntime().exec(
// 									new String[] { browser = b, url });
// 					if (browser == null)
// 						throw new Exception(Arrays.toString(browsers));
// 				}
// 			} catch (Exception e) {
// 				JOptionPane.showMessageDialog(null,
// 						errMsg + "\n" + e.toString());
// 			}
// 		}
// 	}
// 
// }
// 
// 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);
// 	}
// 	
// 	  }


import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.BoxLayout;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;
import org.dipgame.gameManager.utils.BareBonesBrowserLaunch;
import org.dipgame.gameManager.utils.JTextPaneAppend;
package org.dipgame.gameManager;




/**
 * Utils
 * 
 * @author Angela Fabregues, IIIA-CSIC, fabregues@iiia.csic.es
 */
public class Utils {
	
	final static Color CYAN = new Color(99, 158, 255);
	final static String IP = "localhost";
	final static int PORT = 16713;
	final static String LOG_FOLDER = "logs";
	public final static Color BLUE = new Color(49, 97, 206);
	static final int FULL_SIZE = 768;
	static final int MIN_SIZE = 550;
	public static final int NEGO_PORT = 16714;
	public static final String LEAVE_EMPTY = "empty";
	public static final String URL = "http://www.dipgame.org";
	
// Path: gameManager/src/org/dipgame/gameManager/utils/BareBonesBrowserLaunch.java
// public class BareBonesBrowserLaunch {
// 
// 	static final String[] browsers = { "google-chrome", "firefox", "opera",
// 			"epiphany", "konqueror", "conkeror", "midori", "kazehakase",
// 			"mozilla" };
// 	static final String errMsg = "Error attempting to launch web browser";
// 
// 	public static void openURL(String url) {
// 		try { // attempt to use Desktop library from JDK 1.6+
// 			Class<?> d = Class.forName("java.awt.Desktop");
// 			d.getDeclaredMethod("browse", new Class[] { java.net.URI.class })
// 					.invoke(d.getDeclaredMethod("getDesktop").invoke(null),
// 							new Object[] { java.net.URI.create(url) });
// 			// above code mimicks: java.awt.Desktop.getDesktop().browse()
// 		} catch (Exception ignore) { // library not available or failed
// 			String osName = System.getProperty("os.name");
// 			try {
// 				if (osName.startsWith("Mac OS")) {
// 					Class.forName("com.apple.eio.FileManager")
// 							.getDeclaredMethod("openURL",
// 									new Class[] { String.class })
// 							.invoke(null, new Object[] { url });
// 				} else if (osName.startsWith("Windows"))
// 					Runtime.getRuntime().exec(
// 							"rundll32 url.dll,FileProtocolHandler " + url);
// 				else { // assume Unix or Linux
// 					String browser = null;
// 					for (String b : browsers)
// 						if (browser == null
// 								&& Runtime.getRuntime()
// 										.exec(new String[] { "which", b })
// 										.getInputStream().read() != -1)
// 							Runtime.getRuntime().exec(
// 									new String[] { browser = b, url });
// 					if (browser == null)
// 						throw new Exception(Arrays.toString(browsers));
// 				}
// 			} catch (Exception e) {
// 				JOptionPane.showMessageDialog(null,
// 						errMsg + "\n" + e.toString());
// 			}
// 		}
// 	}
// 
// }
// 
// 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.java
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.BoxLayout;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JPanel;
import org.dipgame.gameManager.utils.BareBonesBrowserLaunch;
import org.dipgame.gameManager.utils.JTextPaneAppend;

package org.dipgame.gameManager;




/**
 * Utils
 * 
 * @author Angela Fabregues, IIIA-CSIC, fabregues@iiia.csic.es
 */
public class Utils {
	
	final static Color CYAN = new Color(99, 158, 255);
	final static String IP = "localhost";
	final static int PORT = 16713;
	final static String LOG_FOLDER = "logs";
	public final static Color BLUE = new Color(49, 97, 206);
	static final int FULL_SIZE = 768;
	static final int MIN_SIZE = 550;
	public static final int NEGO_PORT = 16714;
	public static final String LEAVE_EMPTY = "empty";
	public static final String URL = "http://www.dipgame.org";
	
	static JTextPaneAppend getText(String text, final String url) {