diff options
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.java | 12 |
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);
}
|
