aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/plugin/branding/StyledHTMLEditorPane.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java/sip/communicator/plugin/branding/StyledHTMLEditorPane.java')
-rw-r--r--src/net/java/sip/communicator/plugin/branding/StyledHTMLEditorPane.java124
1 files changed, 62 insertions, 62 deletions
diff --git a/src/net/java/sip/communicator/plugin/branding/StyledHTMLEditorPane.java b/src/net/java/sip/communicator/plugin/branding/StyledHTMLEditorPane.java
index 7eb02bc..d67050e 100644
--- a/src/net/java/sip/communicator/plugin/branding/StyledHTMLEditorPane.java
+++ b/src/net/java/sip/communicator/plugin/branding/StyledHTMLEditorPane.java
@@ -1,4 +1,4 @@
-/*
+/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
* Copyright @ 2015 Atlassian Pty Ltd
@@ -15,64 +15,64 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package net.java.sip.communicator.plugin.branding;
-
-import java.io.*;
-
-import javax.swing.*;
-import javax.swing.text.*;
-import javax.swing.text.html.*;
-
-import net.java.sip.communicator.util.*;
-
-public class StyledHTMLEditorPane
- extends JEditorPane
-{
- private final Logger logger = Logger.getLogger(StyledHTMLEditorPane.class);
-
- private final HTMLDocument document;
-
- public StyledHTMLEditorPane()
- {
- this.setContentType("text/html");
-
- this.document
- = (HTMLDocument) this.getDocument();
-
- this.setDocument(document);
-
- Constants.loadSimpleStyle(document.getStyleSheet());
- }
-
- public void appendToEnd(String text)
- {
- Element root = document.getDefaultRootElement();
- try
- {
- document.insertAfterEnd(root
- .getElement(root.getElementCount() - 1), text);
- }
- catch (BadLocationException e)
- {
- logger.error("Insert in the HTMLDocument failed.", e);
- }
- catch (IOException e)
- {
- logger.error("Insert in the HTMLDocument failed.", e);
- }
- }
-
- public void insertAfterStart(String text)
- {
- Element root = this.document.getDefaultRootElement();
-
- try {
- this.document.insertBeforeStart(root
- .getElement(0), text);
- } catch (BadLocationException e) {
- logger.error("Insert in the HTMLDocument failed.", e);
- } catch (IOException e) {
- logger.error("Insert in the HTMLDocument failed.", e);
- }
- }
-}
+package net.java.sip.communicator.plugin.branding;
+
+import java.io.*;
+
+import javax.swing.*;
+import javax.swing.text.*;
+import javax.swing.text.html.*;
+
+import net.java.sip.communicator.util.*;
+
+public class StyledHTMLEditorPane
+ extends JEditorPane
+{
+ private final Logger logger = Logger.getLogger(StyledHTMLEditorPane.class);
+
+ private final HTMLDocument document;
+
+ public StyledHTMLEditorPane()
+ {
+ this.setContentType("text/html");
+
+ this.document
+ = (HTMLDocument) this.getDocument();
+
+ this.setDocument(document);
+
+ Constants.loadSimpleStyle(document.getStyleSheet());
+ }
+
+ public void appendToEnd(String text)
+ {
+ Element root = document.getDefaultRootElement();
+ try
+ {
+ document.insertAfterEnd(root
+ .getElement(root.getElementCount() - 1), text);
+ }
+ catch (BadLocationException e)
+ {
+ logger.error("Insert in the HTMLDocument failed.", e);
+ }
+ catch (IOException e)
+ {
+ logger.error("Insert in the HTMLDocument failed.", e);
+ }
+ }
+
+ public void insertAfterStart(String text)
+ {
+ Element root = this.document.getDefaultRootElement();
+
+ try {
+ this.document.insertBeforeStart(root
+ .getElement(0), text);
+ } catch (BadLocationException e) {
+ logger.error("Insert in the HTMLDocument failed.", e);
+ } catch (IOException e) {
+ logger.error("Insert in the HTMLDocument failed.", e);
+ }
+ }
+}