summaryrefslogtreecommitdiff
path: root/source/com/c2kernel/gui/tabs/outcome/form/HelpPane.java
diff options
context:
space:
mode:
authorabranson <andrew.branson@cern.ch>2011-08-04 00:42:34 +0200
committerabranson <andrew.branson@cern.ch>2011-08-04 00:42:34 +0200
commit0ec8481c10cd8277d84c7c1a785483a0a739e5a0 (patch)
tree5f6e5d9ae75193e67e6f3b3dfa488960c5cde1d5 /source/com/c2kernel/gui/tabs/outcome/form/HelpPane.java
parent036cbdba66f804743c4c838ed598d6972c4b3e17 (diff)
More code cleanup:
Refactored Entity Proxy Subscription to handle generics better Rewrote RemoteMap to use TreeMap instead of the internal array for order. It now sorts its keys by number if they parse, else as strings. Removed a no-longer-in-progress outcome form class
Diffstat (limited to 'source/com/c2kernel/gui/tabs/outcome/form/HelpPane.java')
-rw-r--r--[-rwxr-xr-x]source/com/c2kernel/gui/tabs/outcome/form/HelpPane.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/com/c2kernel/gui/tabs/outcome/form/HelpPane.java b/source/com/c2kernel/gui/tabs/outcome/form/HelpPane.java
index 0f0f812..aa8e13e 100755..100644
--- a/source/com/c2kernel/gui/tabs/outcome/form/HelpPane.java
+++ b/source/com/c2kernel/gui/tabs/outcome/form/HelpPane.java
@@ -15,9 +15,9 @@ import com.c2kernel.utils.Language;
**************************************************************************/
public class HelpPane extends JEditorPane {
-
+
public static final String header = "<h2><font color=\"blue\">"+Language.translate("Help")+"</font></h2>";
-
+
public HelpPane() {
super();
setEditable(false);
@@ -25,24 +25,24 @@ public class HelpPane extends JEditorPane {
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 &&
+ while((startPos = xhtml.indexOf("<?")) != -1 &&
(endPos = xhtml.indexOf("?>")) != -1) {
xhtml = xhtml.substring(0,startPos)+xhtml.substring(endPos+2);
}