?? applicationcontroller.java
字號(hào):
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
package org.cesar.inmotion.util;
import java.util.Hashtable;
import javax.microedition.lcdui.*;
// Referenced classes of package org.cesar.inmotion.util:
// AbstractMIDlet
public abstract class ApplicationController
{
public static final int PRESENTATION_SCREEN = -10;
public static final int MAIN_MENU_SCREEN = -11;
public static final int NO_SCREEN = -12;
private Hashtable screenTable;
private int currentScreen;
private static ApplicationController instance;
public ApplicationController()
{
screenTable = new Hashtable();
currentScreen = -12;
}
public void setPresentation(Displayable displayable)
{
screenTable.put(new Integer(-10), displayable);
}
public void setMainMenu(Displayable displayable)
{
screenTable.put(new Integer(-11), displayable);
}
public void addScreen(int i, Displayable displayable)
throws IllegalArgumentException
{
if(i != -10 && i != -11)
screenTable.put(new Integer(i), displayable);
else
throw new IllegalArgumentException();
}
public void removeScreen(int i)
{
screenTable.remove(getScreen(i));
}
public Displayable getScreen(int i)
throws IllegalArgumentException
{
return (Displayable)screenTable.get(new Integer(i));
}
public void changeScreen(int i)
{
Displayable displayable = (Displayable)screenTable.get(new Integer(i));
if(displayable != null)
{
AbstractMIDlet.getDisplay().setCurrent(displayable);
currentScreen = i;
}
}
public static ApplicationController getInstance(String s)
{
if(instance == null)
try
{
instance = (ApplicationController)Class.forName(s).newInstance();
}
catch(ClassNotFoundException classnotfoundexception)
{
classnotfoundexception.printStackTrace();
}
catch(Exception exception)
{
exception.printStackTrace();
}
return instance;
}
public abstract void paintScreen(String s, Graphics g);
public abstract void startAppAction();
public abstract void processAction(int i);
public int getCurrentScreen()
{
return currentScreen;
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -