01: /* AjaxDevice.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Mon May 14 19:13:07 2007, Created by tomyeh
10: }}IS_NOTE
11:
12: Copyright (C) 2007 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: This program is distributed under GPL Version 2.0 in the hope that
16: it will be useful, but WITHOUT ANY WARRANTY.
17: }}IS_RIGHT
18: */
19: package org.zkoss.zk.device;
20:
21: /**
22: * Represents a Web browser with the Ajax support.
23: *
24: * @author tomyeh
25: * @since 2.4.0
26: */
27: public class AjaxDevice extends GenericDevice {
28: /** It supports {@link #RESEND}.
29: */
30: public boolean isSupported(int func) {
31: return func == RESEND;
32: }
33:
34: /** Return false to indicate it is not cacheable.
35: */
36: public boolean isCacheable() {
37: return false;
38: }
39:
40: /** Returns <code>text/html;charset=UTF-8</code>
41: */
42: public String getContentType() {
43: return "text/html;charset=UTF-8";
44: }
45:
46: /** Returns <code><!DOCTYPE html ...XHTML 1.0 Transitional...></code>.
47: */
48: public String getDocType() {
49: return "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" "
50: + "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
51: }
52: }
|