⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mvccomponent.java.svn-base

📁 j2me mobile application for upload file to server.
💻 SVN-BASE
字号:
package org.celllife.clforms; import javax.microedition.lcdui.Alert;import javax.microedition.lcdui.Command;import javax.microedition.lcdui.CommandListener;import javax.microedition.lcdui.Display;import javax.microedition.lcdui.Displayable;import de.enough.polish.util.Locale;public abstract class MVCComponent implements CommandListener {//  protected static Displayable screen = null;  // Set from outside at beginning  public static Display display;  // Returns the screen object from the derived class  public abstract Displayable getScreen();  public Displayable prepareScreen () throws Exception {    if ( getScreen() == null ) {      initModel();      createView();    } else {      updateView();    }    getScreen().setCommandListener ( (CommandListener) this );    return getScreen ();  }  public void showScreen() {    try {      display.setCurrent( prepareScreen());    } catch (Exception e) {      e.printStackTrace();      Alert a = new Alert(Locale.get("error.screen")); //$NON-NLS-1$      a.setString(e.getMessage());      a.setTimeout(Alert.FOREVER);      display.setCurrent(a);    }  }  // Initialize. If a data member is not backed by RMS, make sure  // it is uninitilzed (null) before you put in values.  protected abstract void initModel () throws Exception;  protected abstract void createView () throws Exception;  protected abstract void updateView () throws Exception;  public abstract void commandAction(Command c, Displayable s);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -