KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > services > htmleditors > MSHTMLCompatibilityTester


1 package org.jahia.services.htmleditors;
2
3 /**
4  * <p>Title: Tester for the MS HTML Editing capability</p>
5  * <p>Description: </p>
6  * <p>Copyright: Copyright (c) 2002</p>
7  * <p>Company: Jahia Ltd</p>
8  * @author Serge Huber
9  * @version 1.0
10  */

11
12 public class MSHTMLCompatibilityTester implements EditorCompatibilityTesteable {
13
14     public MSHTMLCompatibilityTester() {
15     }
16
17     public boolean isCompatible(ClientCapabilities clientCapabilities) {
18         String JavaDoc clientAgent = clientCapabilities.getClientAgent();
19         if (!(clientAgent.indexOf("MSIE") != -1)) {
20             return false;
21         }
22         if (!(clientAgent.indexOf("Windows") != -1)) {
23             return false;
24         }
25         return true;
26     }
27
28 }
Popular Tags