TAILIEUCHUNG - Programming java 2 micro edition for symbian os phần 5

ShowAlert () phương pháp (xem dưới đây) được gọi là các ví dụ AudioPlayer trong trường hợp của một ngoại lệ được ném vào bất kỳ giai đoạn nào của vòng đời Thủ. public void showAlert (String title, String message) {Alert cảnh báo = new Alert (tiêu đề, tin nhắn, null, ) (cảnh báo, initialView); (); (playCommand); } | 172 ANDTHEJTWI public void itemStateChanged Item item if item instanceof Gauge Gauge volumeIndicator Gauge item int level level The itemStateChanged method obtains the value requested by the user and invokes the setVolume method to adjust the audio playback volume via the Player s VolumeControl. The showAlert method see below is called by the AudioPlayer instance in the event of an Exception being thrown at any stage of the Player lifecycle. public void showAlert String title String message Alert alert new Alert title message null alert initialView playCommand After displaying an error Alert the current Displayable is set to the InitialView allowing the user to try either the same URL again or a different URL. The MIDletController class also provides a couple of callback methods updateProgressGauge and removeVolumeControl. The first updates the InitialView progress gauge as the Player progresses through its lifecycle. The second removes the interactive volume indicator Gauge from the PlayerView in the event that the implementation of Player does not support a VolumeControl. The full source code and JAR and JAD files for the Audio Player MIDlet can be downloaded from the Symbian website at . com books. Working with Video We shall now illustrate how to play a video with code highlights taken from a simple Video Player MIDlet see Figure . The architecture of the Video Player MIDlet see Figure is very similar to that of the Audio Player. The MIDlet contains four classes MIDletController InitialView VideoPlayer and VideoCanvas. The VideoCanvas is used for rendering the video playback as well as providing controls similar to those found in the PlayerView of the Audio Player MIDlet. The other classes fulfill very similar roles to their equivalents in the Audio Player MIDlet. OPTIONAL J2ME APIS IN .

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.