tailieunhanh - Intro to Java Programming phần 9

Chịu trách nhiệm bố trí của các nút điều khiển ba hình ảnh. Chúng tôi tạo ra lớp bên trong để xử lý các sự kiện năm nay và bản thân chúng ta hành động như là một đăng ký | Implementing the Slide Show protected void registerMRJHandlers Register MRJ handlers for open about and quit. Insert SlideShow registerMRJHandlers Locate the SlideShow registerMRJHandlers clipping in the SlideShow folder and drag it directly below the last line of code shown above. Your code should now look like this protected void registerMRJHandlers Register MRJ handlers for open about and quit. Insert SlideShow registerMRJHandlers MRJI IMRJI new MRJI IMRJI IMRJI IMRJI This code may look a little strange at first but it will make more sense if we examine the next code block in tandem. IMRJI Inner class defining the MRJ Interface Insert SlideShow MRJI Locate the SlideShow MRJI clipping in the SlideShow folder and drag it directly below the last line of code shown above. Your code should now look like this IMRJI Inner class defining the MRJ Interface Insert SlideShow MRJI Implementing the Slide Show class MRJI implements MRJOpenDocumentHandler MRJQuitHandler MRJAboutHandler This gets called by MRJ for each file folder dropped onto the application. If the file is a directory this recurses through the directory structure collecting image files. @param the file to add to the list of image files to display or the File object to recurse to look for image files to add to the list. public void handleOpenFile File file if file null if String directory if directory String fileList for int fileInd 0 fileInd fileInd new File directory fileList fileInd else String upperCaseName .toUpperCase if .JPG .JPEG .gif file This gets called when the application receives a Implementing the

TỪ KHÓA LIÊN QUAN