]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.message/src/org/simantics/message/util/HtmlUtil.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.message / src / org / simantics / message / util / HtmlUtil.java
index 04f301297922964e368b86af62ff34e8cf7b288a..a6b4ba41b47c59ba1004ecae0a304d7ebb17b318 100644 (file)
@@ -1,86 +1,86 @@
-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- *     VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.message.util;\r
-\r
-import java.net.URI;\r
-\r
-/**\r
- * @author Tuukka Lehtonen\r
- */\r
-public final class HtmlUtil {\r
-\r
-    /**\r
-     * Encloses the specified text within a <code>&lt;form&gt;</code> tag.\r
-     * \r
-     * @param text the text to enclose\r
-     * @return the enclosed text \r
-     */\r
-    public static String html(String text) {\r
-        return TagUtil.tag(TagUtil.tag("", "head") + TagUtil.tag(TagUtil.tag(text, "pre"), "body"), "html");\r
-    }\r
-\r
-    /**\r
-     * Produces a standard HTML <code>&lt;a&gt;</code> anchor tag with the specified\r
-     * contents.\r
-     * \r
-     * @param href the <code>href</code> attribute value of the produced anchor\r
-     *        (&lt;a href="<code>href</code>"&gt;&lt;/a&gt;)\r
-     * @param text the <code>text</code> inside the anchor element (&lt;a&gt;\r
-     *        <code>text</code>&lt;/a&gt;)\r
-     * @return the anchor\r
-     */\r
-    public static String a(String href, String text) {\r
-        return TagUtil.tag(text, "a", "href", href);\r
-    }\r
-\r
-    /**\r
-     * Produces a standard HTML <code>&lt;a&gt;</code> anchor tag with the specified\r
-     * contents.\r
-     * \r
-     * @param href the <code>href</code> attribute value of the produced anchor\r
-     *        (&lt;a href="<code>href</code>"&gt;&lt;/a&gt;)\r
-     * @param text the <code>text</code> inside the anchor element (&lt;a&gt;\r
-     *        <code>text</code>&lt;/a&gt;)\r
-     * @return the anchor\r
-     */\r
-    public static String a(URI href, String text) {\r
-        return a(href.toASCIIString(), text);\r
-    }\r
-\r
-    /**\r
-     * Produces a standard HTML <code>&lt;a&gt;</code> anchor tag with the\r
-     * specified contents.\r
-     * \r
-     * @param scheme the <code>&lt;scheme&gt;</code> part of the URI of form\r
-     *        <code>&ltscheme&gt:&lt;scheme-specific-part&gt;</code>\r
-     * @param identifier the <code>&lt;scheme-specific-part&gt;</code> part of\r
-     *        the URI of form\r
-     *        <code>&ltscheme&gt:&lt;scheme-specific-part&gt;</code>\r
-     * @param text the <code>text</code> inside the anchor element (&lt;a&gt;\r
-     *        <code>text</code>&lt;/a&gt;)\r
-     * @return the anchor\r
-     */\r
-    public static String a(String scheme, String identifier, String text) {\r
-        return TagUtil.tag(text, "a", "href", scheme +  ":" + identifier);\r
-    }\r
-\r
-    /**\r
-     * Encloses the specified text within a <code>&lt;p&gt;</code> tag.\r
-     * \r
-     * @param text the text to enclose\r
-     * @return the enclosed text\r
-     */\r
-    public static String p(String text) {\r
-        return TagUtil.tag(text, "p");\r
-    }\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.message.util;
+
+import java.net.URI;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+public final class HtmlUtil {
+
+    /**
+     * Encloses the specified text within a <code>&lt;form&gt;</code> tag.
+     * 
+     * @param text the text to enclose
+     * @return the enclosed text 
+     */
+    public static String html(String text) {
+        return TagUtil.tag(TagUtil.tag("", "head") + TagUtil.tag(TagUtil.tag(text, "pre"), "body"), "html");
+    }
+
+    /**
+     * Produces a standard HTML <code>&lt;a&gt;</code> anchor tag with the specified
+     * contents.
+     * 
+     * @param href the <code>href</code> attribute value of the produced anchor
+     *        (&lt;a href="<code>href</code>"&gt;&lt;/a&gt;)
+     * @param text the <code>text</code> inside the anchor element (&lt;a&gt;
+     *        <code>text</code>&lt;/a&gt;)
+     * @return the anchor
+     */
+    public static String a(String href, String text) {
+        return TagUtil.tag(text, "a", "href", href);
+    }
+
+    /**
+     * Produces a standard HTML <code>&lt;a&gt;</code> anchor tag with the specified
+     * contents.
+     * 
+     * @param href the <code>href</code> attribute value of the produced anchor
+     *        (&lt;a href="<code>href</code>"&gt;&lt;/a&gt;)
+     * @param text the <code>text</code> inside the anchor element (&lt;a&gt;
+     *        <code>text</code>&lt;/a&gt;)
+     * @return the anchor
+     */
+    public static String a(URI href, String text) {
+        return a(href.toASCIIString(), text);
+    }
+
+    /**
+     * Produces a standard HTML <code>&lt;a&gt;</code> anchor tag with the
+     * specified contents.
+     * 
+     * @param scheme the <code>&lt;scheme&gt;</code> part of the URI of form
+     *        <code>&ltscheme&gt:&lt;scheme-specific-part&gt;</code>
+     * @param identifier the <code>&lt;scheme-specific-part&gt;</code> part of
+     *        the URI of form
+     *        <code>&ltscheme&gt:&lt;scheme-specific-part&gt;</code>
+     * @param text the <code>text</code> inside the anchor element (&lt;a&gt;
+     *        <code>text</code>&lt;/a&gt;)
+     * @return the anchor
+     */
+    public static String a(String scheme, String identifier, String text) {
+        return TagUtil.tag(text, "a", "href", scheme +  ":" + identifier);
+    }
+
+    /**
+     * Encloses the specified text within a <code>&lt;p&gt;</code> tag.
+     * 
+     * @param text the text to enclose
+     * @return the enclosed text
+     */
+    public static String p(String text) {
+        return TagUtil.tag(text, "p");
+    }
+
+}