]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.debug.browser/src/org/simantics/debug/browser/sections/PageHeaderSection.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.debug.browser / src / org / simantics / debug / browser / sections / PageHeaderSection.java
1 /*******************************************************************************\r
2  * Copyright (c) 2016 Association for Decentralized Information Management\r
3  * in Industry THTH ry.\r
4  * All rights reserved. This program and the accompanying materials\r
5  * are made available under the terms of the Eclipse Public License v1.0\r
6  * which accompanies this distribution, and is available at\r
7  * http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  * Contributors:\r
10  *     THTH ry - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.debug.browser.sections;\r
13 \r
14 import java.io.PrintWriter;\r
15 import java.io.StringWriter;\r
16 \r
17 import org.simantics.db.ReadGraph;\r
18 \r
19 public class PageHeaderSection implements ResourceBrowserSection {\r
20 \r
21     private StringWriter stringWriter = new StringWriter();\r
22     private PrintWriter headWriter = new PrintWriter(stringWriter);\r
23 \r
24     @Override\r
25     public double getPriority() {\r
26         return Double.NEGATIVE_INFINITY;\r
27     }\r
28 \r
29     public PrintWriter getHeadWriter() {\r
30         return headWriter;\r
31     }\r
32 \r
33     @Override\r
34     public void toHtml(ReadGraph graph, PrintWriter out) {\r
35         out.println("<!DOCTYPE html>");\r
36         out.println("<html lang=\"en\">");\r
37         out.println("<head>");\r
38         out.println("<meta charset=\"utf-8\">");\r
39         out.println("<title>Resource Browser</title>");\r
40         //out.println("<link rel=\"stylesheet\" type=\"text/css\" href=\"/css/jquery.dataTables.css\" />");\r
41         //out.println("<script type=\"text/javascript\" charset=\"utf8\" src=\"/js/jquery-1.10.2.min.js\"></script>");\r
42         //out.println("<script type=\"text/javascript\" charset=\"utf8\" src=\"/js/jquery-ui.min.js\"></script>");\r
43         //out.println("<script type=\"text/javascript\" charset=\"utf8\" src=\"/js/jquery.dataTables.min.js\"></script>");\r
44         out.write(stringWriter.toString());\r
45         out.println("</head>");\r
46         out.println("<body>");\r
47     }\r
48 \r
49 }\r