/*
 * This is part of Geomajas, a GIS framework, http://www.geomajas.org/.
 *
 * Copyright 2008-2015 Geosparc nv, http://www.geosparc.com/, Belgium.
 *
 * The program is available in open source according to the Apache
 * License, Version 2.0. All contributions in this program are covered
 * by the Geomajas Contributors License Agreement. For full licensing
 * details, see LICENSE.txt in the project root.
 */
package org.geomajas.codemirror.client;

import org.geomajas.codemirror.client.widget.CodeMirrorPanel;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.PopupPanel;
import com.google.gwt.user.client.ui.RootLayoutPanel;

/**
 * Entry point of Example Codemirror GWT wrapper.
 * 
 * @author Kristof Heirwegh
 */
public class ExampleEntryPoint implements EntryPoint {

	public void onModuleLoad() {
		// -- show some background
		String contents = 
			"<div style='margin-left: 5px; font-size: 100pt; font-weight: bold; color:#DDFFDD'>GEOMAJAS</div>"
			+ "<div style='margin-left: 10px; margin-top:-70px; font-size: 50pt; color:#CCCCCC'>Codemirror</div>"
			+ "<div style='margin-left: 10px; margin-top:-15px; font-size: 28pt; color:#DDDDDD'>GWT wrapper</div>";
		HTMLPanel html = new HTMLPanel(contents);
		html.setSize("100%", "100%");
		
		RootLayoutPanel.get().add(html);
		
		// -- show a codemirror panel
		String initialContent = 
			"<html>\n\t<head>\n\t\t<title>Geomajas GWT Codemirror wrapper sample</title>\n\t</head>\n" +
			"\n\t<body>\n\t\tRead more here: <a href=\"http://www.geomajas.org/documentation/main\">" +
			"Geomajas</a><br />\n\t\tand here: <a href=\"http://codemirror.net/\">CodeMirror</a><br />\n\t" +
			"</body>\n</html>";

		final PopupPanel popup = new PopupPanel(false);
		popup.setSize("800px", "450px");
		popup.setWidget(new CodeMirrorPanel(initialContent));
		popup.center();
	}
}

@@ -854,16 +854,120 @@
 oint %7B%0A%0A
+%09private final String geomajasCodemirrorGwtDocumentatonUrl = %22http://www.geomajas.org/codemirror-gwt%22;%0A%0A
 %09public 
@@ -1656,24 +1656,30 @@
  more here: 
+%5Cn%5Ct%5Ct
 %3Ca href=%5C%22ht
@@ -1680,33 +1680,34 @@
 f=%5C%22
-http://www.geomajas.org/d
+%22 + geomajasCodemirrorGwtD
 ocum
@@ -1715,16 +1715,17 @@
 ntat
-i
 on
-/main
+Url + %22
 %5C%22%3E%22
@@ -1739,26 +1739,51 @@
 Geomajas
-%3C/a%3E%3Cbr /%3E
+ Codemirror GWT%3C/a%3E%3Cbr /%3E%22 +%0A%09%09%09%09%09%22
 %5Cn%5Ct%5Ctan

update geomajas codemirror gwt documenation url