diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2012-05-30 08:37:45 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2012-05-30 08:37:45 +0200 |
| commit | b086f57f56bf0eb9dab9cf321a0f69aaaae84347 (patch) | |
| tree | 8e6e26e8b7eed6abad7a17b093bdbb55c5e6b1ba /source/com/c2kernel/gui/tabs/outcome/form/HelpPane.java | |
| parent | 22088ae8d2d5ff390518dbe1c4372325ffb3a647 (diff) | |
Initial Maven Conversion
Diffstat (limited to 'source/com/c2kernel/gui/tabs/outcome/form/HelpPane.java')
| -rw-r--r-- | source/com/c2kernel/gui/tabs/outcome/form/HelpPane.java | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/source/com/c2kernel/gui/tabs/outcome/form/HelpPane.java b/source/com/c2kernel/gui/tabs/outcome/form/HelpPane.java deleted file mode 100644 index aa8e13e..0000000 --- a/source/com/c2kernel/gui/tabs/outcome/form/HelpPane.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.c2kernel.gui.tabs.outcome.form;
-
-import javax.swing.JEditorPane;
-import javax.swing.text.html.HTMLEditorKit;
-
-import com.c2kernel.utils.Language;
-
-/**************************************************************************
- *
- * $Revision: 1.3 $
- * $Date: 2004/08/24 12:44:02 $
- *
- * Copyright (C) 2003 CERN - European Organization for Nuclear Research
- * All rights reserved.
- **************************************************************************/
-
-public class HelpPane extends JEditorPane {
-
- public static final String header = "<h2><font color=\"blue\">"+Language.translate("Help")+"</font></h2>";
-
- public HelpPane() {
- super();
- setEditable(false);
- setEditorKit(new HTMLEditorKit());
- setContentType("text/html");
- setPreferredSize(new java.awt.Dimension(200,400));
- }
-
- public void setHelp(String title, String helpText) {
- setText(header+"<h3>"+title+"</h3><br>"+toHTML(helpText));
- }
-
-
- /**
- * Unfortunately JEditorPane will only display HTML3.2, whereas to embed HTML in an xsd we must
- * use XHTML so it will be valid XML. This method does a quick and dirty removal of stuff that
- * the JEditorPane cannot display
- *
- * @param xhtml
- * @return
- */
- public static String toHTML(String xhtml) {
- int startPos, endPos;
- //remove xml header
- while((startPos = xhtml.indexOf("<?")) != -1 &&
- (endPos = xhtml.indexOf("?>")) != -1) {
- xhtml = xhtml.substring(0,startPos)+xhtml.substring(endPos+2);
- }
- // remove slash in <tags/>
- while ((startPos = xhtml.indexOf("/>")) != -1) {
- xhtml = xhtml.substring(0, startPos)+xhtml.substring(startPos+1);
- }
- return xhtml;
- }
-}
|
