انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة
الكلية كلية تكنولوجيا المعلومات
القسم قسم شبكات المعلومات
المرحلة 3
أستاذ المادة علاء الدين عباس عبد الحسن
14/01/2013 10:32:17
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package hello;
import javax.microedition.lcdui.*; import javax.microedition.midlet.*;
/** * @author wesam */ public class Midlet extends MIDlet implements CommandListener {
Display desplay; Form form1 = new Form("photo Alpoum"); Form form3 = new Form("Freinds"); Command photo = new Command("Photo Alboum", Command.EXIT, 0); Command cmdexit = new Command("Exit", Command.EXIT, 0); Command cmdshow = new Command("Show", Command.SCREEN, 1); Command cmdback = new Command("Back", Command.BACK, 1); Command cmdnext = new Command("Next", Command.SCREEN, 1); Alert al = new Alert(""); int z; int x = 0, k = 0, y = 1; String[] mayArray = {"friends photos", "college photos", "natur photos"}; List list1 = new List("photo list", List.EXCLUSIVE, mayArray, null); public void startApp() { desplay = Display.getDisplay(this); // desplay.setCurrent(form0); form1.setCommandListener(this); form1.addCommand(cmdback); desplay.setCurrent(list1); list1.setCommandListener(this); list1.addCommand(cmdexit); list1.addCommand(cmdshow); form1.addCommand(cmdnext); form3.addCommand(cmdback); form3.addCommand(cmdnext); form3.setCommandListener(this); }
public void pauseApp() { }
public void destroyApp(boolean unconditional) { }
public void commandAction(Command c, Displayable d) { if (( d == list1) && c == cmdexit) { destroyApp(false); notifyDestroyed();
} if (d == list1 && c == cmdshow) { z = 1; String str = list1.getString(list1.getSelectedIndex()); if (str .equals("natur photos") ) { desplay.setCurrent(form1); try { Image img = Image.createImage("/Natur/photo0.jpg"); form1.deleteAll(); form1.append(img); } catch (java.io.IOException e) { Alert alert = new Alert("Error: Load Image"); alert.setString(e.getMessage()); desplay.setCurrent(alert); } } else if (str.equals("friends photos") ) { desplay.setCurrent(form3); try { Image img = Image.createImage("/Friend/0.jpg"); form3.deleteAll(); form3.append(img); } catch (java.io.IOException e) { Alert alert = new Alert("Error: Load Image"); alert.setString(e.getMessage()); desplay.setCurrent(alert); } } } if (d == form1) { if (c == cmdback) { desplay.setCurrent(list1); z = 1; }
if (c == cmdnext) { form1.deleteAll(); try { Image img2 = Image.createImage("/Natur/photo" + z + ".jpg"); form1.append(img2); } catch (java.io.IOException e) { Alert alert = new Alert("Error: Load Image"); alert.setString(e.getMessage()); desplay.setCurrent(alert); } z++; if (z == 43) { z = 1; } } } if (d == form3) { if (c == cmdback) { desplay.setCurrent(list1); y = 1; } if (c == cmdnext) { form3.deleteAll(); try { Image img3 = Image.createImage("/Friend/" + y + ".jpg"); form3.append(img3); } catch (java.io.IOException e) { Alert alert = new Alert("Error: Load Image"); alert.setString(e.getMessage()); desplay.setCurrent(alert); } y++; if (y == 15) { y = 1; } } } }//commandAction end }//class end
المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .
|