TAILIEUCHUNG - Introduction to Java:16 Data Transfer

Tham khảo tài liệu 'introduction to java:16 data transfer', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | In this chapter DataFlavor Transferable Interface ClipboardOwner Interface Clipboard StringSelection UnsupportedFlavorException Reading and Writing the Clipboard 16 Data Transfer One feature that was missing from Java was the ability to access the system clipboard. It was impossible to cut and paste data from one program into another. Java includes a package called that supports clipboard operations. Using this package you can cut an arbitrary object from one program and paste it into another. In theory you can cut and paste almost anything in practice you usually want to cut and paste text strings so the package provides special support for string operations. The current version allows only one object to be on the clipboard at a time. consists of three classes two interfaces and one exception. Objects that can be transferred implement the Transferable interface. The Transferable interface defines methods for working with different flavors of an object. The concept of flavors is basic to Java s clipboard model. Essentially a flavor is a MIME content type. Any object can be represented in several different ways each corresponding to a different MIME type. For example a text string could be represented by a Java String object an array of Unicode character data or some kind of rich text that contains font information. The object putting the string on the clipboard provides whatever flavors it is capable of an object pasting the string from the clipboard takes whatever flavor it can handle. Flavors are represented by the DataFlavor class and the UnsupportedFlavorException is used when an object asks for a DataFlavor that is not available. The Clipboard class represents the clipboard itself. There is a single system clipboard but you can create as many private clipboards as you want. The system clipboard lets you cut and paste between arbitrary applications for example 501 502 Chapter 16 Data Transfer Microsoft Word .

TỪ KHÓA LIÊN QUAN
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.