Đang chuẩn bị liên kết để tải về tài liệu:
Oracle XSQL- P29

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Oracle XSQL- P29Welcome to the exciting world of eXtended Structured Query Language (XSQL) development! What’s so exciting? Efficiency and ease of use. XSQL isn’t some razzle-dazzle technology to wow your users. It also isn’t the latest X standard du jour that no one can stop talking about until you ask, “But what does it do for me today?” The problem with all of the great stuff out there is that no one technology does it all. | 540 Chapter 19 XSQL Datagram Client Figure 19.7 Architecture for the AWT custom serializer. At this point you know what your serializer should accept as input so you can go ahead and start coding it. Here is the requisite class information and the serialize method import oracle.xml.xsql.XSQLPageRequest import oracle.xml.xsql.XSQLDocumentSerializer import oracle.xml.parser.v2.XMLElement import java.io.OutputStream import java.io.PrintWriter import com.sun.image.codec.jpeg.JPEGCodec import com.sun.image.codec.jpeg.JPEGImageEncoder import java.awt.image.BufferedImage import java.awt.Graphics2D import java.awt.geom.Rectangle2D import java.awt.geom.Line2D import java.awt.Color Serializers 541 import org.w3c.dom.Document import org.w3c.dom.NodeList import org.w3c.dom.Node public class JpegGraphSerializer implements XSQLDocumentSerializer float scale 1 Takes an XML document that behaves the previously defined schema and outputs a JPEG image created using AWT public void serialize Document doc XSQLPageRequest env String mimeType image jpeg try XMLElement rootElem XMLElement doc.getDocumentElement Get the top level information scale getScale rootElem int width getWidth rootElem int height getHeight rootElem Node colorNode rootElem.selectSingleNode . image background Color bgcolor getColor XMLElement colorNode Create an image and get the graphics used to draw with BufferedImage img new BufferedImage width height BufferedImage.TYPE_INT_RGB Graphics2D g img.createGraphics Set up the Image g.setPaint bgcolor Rectangle2D allRect new Rectangle2D.Float 0 0 width height g.fill allRect Draw the bars based on the input XML doc NodeList elems rootElem.getElementsByTagName bar drawBars g elems Write the data env.setContentType mimeType Outputstream out env.getOutputStream JPEGImageEncoder encoder JPEGCodec.createJPEGEncoder out encoder.encode img out.close catch Exception e 542 Chapter 19 env.setContentType text html Printwriter out env.getWriter out.println An error has occurred .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.