/** * Writes a JavaScript script tag that shows a date in the user's locale. Prints <code>&#160;</code> * if the date is <code>null</code>. * Writes to the internal <code>PrintWriter</code>. * * @see #writeDateJavaScript(long,Appendable) */ public ChainWriter writeDateJavaScript(Date date, Sequence sequence, Appendable scriptOut) throws IOException { writeDateJavaScript(date, sequence, out, scriptOut); return this; }
/** * Writes a JavaScript script tag that shows a date and time in the user's locale. Prints <code>&#160;</code> * if the date is <code>null</code>. * Writes to the internal <code>PrintWriter</code>. * @see #writeDateTimeJavaScript(long, Appendable) */ public ChainWriter writeDateTimeJavaScript(Date date, Sequence sequence, Appendable scriptOut) throws IOException { writeDateTimeJavaScript(date, sequence, out, scriptOut); return this; }
/** * @deprecated Please use writeHtmlColor instead. */ public ChainWriter printHTMLColor(int color) throws IOException { return writeHtmlColor(color); }
/** * @deprecated Please use writeHtmlImagePreloadJavaScript instead. */ public ChainWriter printImagePreloadJS(String url) throws IOException { return writeHtmlImagePreloadJavaScript(url); }
/** * Prints a color in HTML format #xxxxxx, where xxxxxx is the hex code. */ public static void writeHtmlColor(int color, Appendable out) throws IOException { out.append('#'); out.append(getHex(color>>>20)); out.append(getHex(color>>>16)); out.append(getHex(color>>>12)); out.append(getHex(color>>>8)); out.append(getHex(color>>>4)); out.append(getHex(color)); }
/** * Writes a JavaScript script tag that a time in the user's locale. Prints <code>&#160;</code> * if the date is <code>null</code>. * Writes to the internal <code>PrintWriter</code>. * * @see #writeTimeJavaScript(long,Appendable) */ public ChainWriter writeTimeJavaScript(Date date, Sequence sequence, Appendable scriptOut) throws IOException { writeTimeJavaScript(date, sequence, out, scriptOut); return this; } // </editor-fold>
/** * Prints a JavaScript script that will preload the image at the provided URL. */ public ChainWriter writeHtmlImagePreloadJavaScript(String url) throws IOException { writeHtmlImagePreloadJavaScript(url, out); return this; }
/** * Prints a value that may be placed in a URL. * * @deprecated Use URLEncoder instead. * @see URLEncoder */ @Deprecated public ChainWriter printEU(String value) { int len = value.length(); for (int c = 0; c < len; c++) { char ch = value.charAt(c); if (ch == ' ') out.print('+'); else { if ((ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) out.print(ch); else { out.print('%'); out.print(getHex(ch >>> 4)); out.print(getHex(ch)); } } } return this; } // </editor-fold>
/** * Writes a JavaScript script tag that a time in the user's locale. Prints <code>&#160;</code> * if the date is <code>-1</code>. * Writes to the internal <code>PrintWriter</code>. * * @deprecated * @see #writeTimeJavaScript(long) */ @Deprecated public ChainWriter printTimeJS(long date, Sequence sequence, Appendable scriptOut) throws IOException { return writeTimeJavaScript(date==-1 ? null : new Date(date), sequence, scriptOut); }
/** * Prints a color in HTML format #xxxxxx, where xxxxxx is the hex code. */ public ChainWriter writeHtmlColor(int color) throws IOException { writeHtmlColor(color, out); return this; }
/** * Writes a JavaScript script tag that shows a date and time in the user's locale. Prints <code>&#160;</code> * if the date is <code>-1</code>. * Writes to the internal <code>PrintWriter</code>. * * @deprecated * @see #writeDateTimeJavaScript(long) */ @Deprecated public ChainWriter printDateTimeJS(long date, Sequence sequence, Appendable scriptOut) throws IOException { return writeDateTimeJavaScript(date==-1 ? null : new Date(date), sequence, scriptOut); }
/** * Prints a JavaScript script tag that shows a date in the user's locale. Prints <code>&#160;</code> * if the date is <code>-1</code>. * Writes to the internal <code>PrintWriter</code>. * * @deprecated * @see #writeDateJavaScript(long) */ @Deprecated public ChainWriter printDateJS(long date, Sequence sequence, Appendable scriptOut) throws IOException { return writeDateJavaScript(date==-1 ? null : new Date(date), sequence, scriptOut); }