www.pudn.com > 20061029005.rar > Presentation.java


// 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.io.PrintStream; 
import javax.microedition.lcdui.*; 
 
// Referenced classes of package org.cesar.inmotion.util: 
//            ResourceBundle, AbstractMIDlet, ApplicationController 
 
public class Presentation extends Canvas 
    implements CommandListener 
{ 
 
    private AbstractMIDlet midlet; 
    private String filePath; 
    private Command exitCommand; 
    private Command startCommand; 
    public static final int PANTHER2_PHONE = 1; 
    public static final int PHONIX_PHONE = 2; 
    public static final int IDENI85_PHONE = 3; 
    public static int PHONE = 1; 
    public static boolean COLOR_PHONE = true; 
    public static int NUM_COLORS; 
    public static int SCREEN_WIDTH; 
    public static int SCREEN_HEIGHT; 
    public static int IDEN_SK_HEIGHT = 11; 
 
    public Presentation(AbstractMIDlet abstractmidlet, String s, String s1, String s2, String s3) 
    { 
        filePath = null; 
        midlet = abstractmidlet; 
        filePath = s; 
        SCREEN_WIDTH = getWidth(); 
        SCREEN_HEIGHT = getHeight(); 
        System.out.println("Width " + SCREEN_WIDTH); 
        System.out.println("Height " + SCREEN_HEIGHT); 
        if(SCREEN_WIDTH == 111 && SCREEN_HEIGHT == 100) 
        { 
            PHONE = 3; 
            SCREEN_HEIGHT -= IDEN_SK_HEIGHT; 
        } else 
        if(SCREEN_WIDTH >= 100) 
            PHONE = 1; 
        else 
            PHONE = 2; 
        exitCommand = new Command(ResourceBundle.getString(s3, s1), 7, 2); 
        startCommand = new Command(ResourceBundle.getString(s3, s2), 1, 1); 
        addCommand(startCommand); 
        addCommand(exitCommand); 
        setCommandListener(this); 
        COLOR_PHONE = AbstractMIDlet.getDisplay().isColor(); 
        NUM_COLORS = AbstractMIDlet.getDisplay().numColors(); 
    } 
 
    protected void paint(Graphics g) 
    { 
        ApplicationController.getInstance(AbstractMIDlet.getAppClassName()).paintScreen(filePath, g); 
    } 
 
    public void commandAction(Command command, Displayable displayable) 
    { 
        if(command == exitCommand) 
            midlet.exit(); 
        else 
        if(command == startCommand) 
            ApplicationController.getInstance(AbstractMIDlet.getAppClassName()).changeScreen(-11); 
    } 
 
}