Changeset 22 for mymrc

Show
Ignore:
Timestamp:
07/09/07 00:42:55 (5 years ago)
Author:
ciro
Message:

Added key-binding in the playback canvas for up, down, '#' and '*'.

Location:
mymrc/trunk/Java-client/src/org/myMRC
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • mymrc/trunk/Java-client/src/org/myMRC/Util.java

    r10 r22  
    44 * 
    55 * Created on April 2, 2007, 11:22 AM 
    6  * 
    7  * To change this template, choose Tools | Template Manager 
    8  * and open the template in the editor. 
    96 */ 
    10 import java.io.DataInputStream; 
    11 import java.io.IOException; 
    12 import javax.microedition.io.Connector; 
    13 import javax.microedition.io.file.FileConnection; 
    14 import javax.microedition.lcdui.Image; 
    15 //import org.myMRC.settings.Configuration; 
    167 
    178 
    189/** 
     10 * Helper class for some commonly used util functions. 
     11 * However, so far there is only a C-style atoi() function here. 
    1912 * 
    2013 * @author Sven Gregori 
     
    5043        return ret; 
    5144    } 
    52      
    53      
    54     /** 
    55      * Creates an Image object from the file at the given Path. 
    56      * The path is relative to the configuration path. 
    57      * @param path Path to the image file 
    58      * @return Image object on success, null otherwise 
    59      */ 
    60     public static Image createImage(String path) { 
    61         Image img = null; 
    62         String fullPath = "file:///myMRC/" + path; // FIXME: make path dynamic 
    63 //        String fullPath = "file://";// + Configuration.getInstance().getPath()  
    64 //                        //+ "/" + path; 
    65         try { 
    66             FileConnection fcon = (FileConnection) Connector.open(fullPath); 
    67             DataInputStream istream = fcon.openDataInputStream(); 
    68             img = Image.createImage(istream); 
    69             istream.close(); 
    70             fcon.close(); 
    71         } catch (IOException e) { 
    72             e.printStackTrace(); 
    73         } 
    74          
    75         return img; 
    76     } 
    77      
    78      
    79     /** 
    80      * Creates an Image object for a Theme from the given image name. 
    81      * The given name must be in <path>/themes/<current theme>/<name>.png 
    82      * @param name Name of the image for the theme. 
    83      * @return Image object on success, null otherwise 
    84      */ 
    85     public static Image createThemeImage(String name) { 
    86         //Configuration config = Configuration.getInstance(); 
    87         //String path = config.getThemesDir() + "/" + config.getTheme() 
    88                     //+ "/" + name + ".png"; 
    89          
    90         return null;//Util.createImage(path); 
    91     } 
    9245} 
  • mymrc/trunk/Java-client/src/org/myMRC/myMRC.java

    r20 r22  
    3737        } catch (IOException ioe) {  
    3838            ioe.printStackTrace(); 
    39         } catch (ConfigParserException cpe){ 
     39        } catch (ConfigParserException cpe) { 
    4040            cpe.printStackTrace(); 
    4141        } 
  • mymrc/trunk/Java-client/src/org/myMRC/settings/ConfigParserException.java

    r10 r22  
    88 
    99/** 
     10 * Exception that will be thrown in case of configuration file parsing errors. 
    1011 * 
    1112 * @author Sven Gregori