Error
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.

final

FxFactory 2.5
Wednesday, 28 July 2010 07:00
About FxFactory
A revolutionary visual effects package for Final Cut Studio, Final Cut Express and Adobe After Effects, powering hundreds of GPU-accelerated plug-ins. FxFactory is based on FxPlug, Apple’s new plug-in architecture which guarantees the best integration with Final Cut Pro, Motion and Final Cut Express.

FxFactory uses the graphics card in your system to provide hardware-accelerated previews and rendering. FxFactory is a free plug-in management system that lets you install and try a vast collection of plug-ins. Some plug-ins are absolutely free. Others are available in trial mode and may be purchased as needed.

Read more: http://www.apple.com/downloads/macosx/video/fxfactory.html

 
TitleExchange 1.9.42
Tuesday, 20 July 2010 07:00
About TitleExchange
If you ever wished to get your titles out of Final Cut Pro into DVD Studio Pro (or another DVD authoring application), as text file for a translation bureau, get titles into Final Cut Pro from another source like DVD Studio Pro, Avid or STL, create titles with Motion Templates or create a QT movie with all your FCP subtitles without the need of rendering or just “equalize” your titles within Final Cut Pro - TitleExchange will be your “one stop” tool.

Read more: http://www.apple.com/downloads/macosx/finalcutstudio/titleexchange.html

 
Loader 2.0.1
Tuesday, 20 July 2010 07:00
About Loader
The smart way to copy and import music, sound effects, graphics and movies into Final Cut Pro. Simply drag items from iTunes or the Finder onto the Loader tab and it slides out to reveal a list of currently open Final Cut Pro projects. Drop the items onto the desired project and Loader handles the rest.

Features:
- Copies items from iTunes or Finder to a media folder linked with each project.
- Converts .caf, m4a and mp3 files into AIFF for reliable playback in Final Cut Pro.
- Custom audio conversion settings for sample rate, bit depth and mono/stereo configuration.
- Sends copied media to the desired Final Cut Pro project.
- Keeps media together for each project - useful if you need to move projects between systems.
- Ability to sort by file extension into named subfolders within the designated media folder.
- Launches and quits automatically alongside Final Cut Pro.

Read more: http://www.apple.com/downloads/macosx/finalcutstudio/loader.html

 
Preference Manager 2.0.9
Wednesday, 14 July 2010 07:00
About Preference Manager
Allows you to trash, lock, backup and restore Final Cut Studio preference files. These files contain user settings and preferences but can cause problems if they become corrupted. Trashing the files allows you to restore operability to your Final Cut Studio machine.

Preference Manager can also backup and restore not only preference files, but Final Cut Pro button bars, keyboard layouts, column layouts, window layouts, track layouts, custom settings, user plugins and Compressor settings and destinations. Backups are stored in a single self-contained file, allowing you to easily copy them from one machine to another.

Unlike many other applications on the market, Preference Manager allows you to trash, lock, backup and restore preferences for all Final Cut Studio applications, not just Final Cut Pro.

Read more: http://www.apple.com/downloads/macosx/finalcutstudio/preferencemanager.html

 
KeyCodeAdapter
Friday, 18 June 2010 09:22
// description of your code here
the keycode class to get keystroke values

// insert code here..
package mobilePackage;


import javax.microedition.lcdui.Canvas;

/**
* Class redefines codes of mobile phone to our constant values.
* Class can give to developers following information:
*

    *
  • defined platform name

    * In case if device vendor not defined we'll recieve PLATFORM_NOT_DEFINED like platform name.
    * Same in this case keyCodes will be setted like for Nokia and SE. It's done for work on emulators,
    * because on some of them it's impossible to define platform name.
    *
  • adopted to our constants key code value
    *
  • for test returns defined real code of left softkey
    *

*/
public final class KeyCodeAdaptor {

/**
* instance on this class
*/
private static final KeyCodeAdaptor instance = new KeyCodeAdaptor();
/**
* canvas used for definig codes
*/
private final Canvas adaptorCanvas;
/**
* constants for platforms names
*/
public static final String PLATFORM_MOTOROLA = "motorola";
public static final String PLATFORM_NOKIA = "nokia";
public static final String PLATFORM_SONY_ERICSSON = "SE";
public static final String PLATFORM_SIEMENS = "siemens";
public static final String PLATFORM_SAMSUNG = "samsung";
public static final String PLATFORM_LG = "LG";
public static final String PLATFORM_NOT_DEFINED = "NA";
/**
* constants for keycodes
*/
public static final int SOFT_KEY_LEFT = -201;
public static final int SOFT_KEY_RIGHT = -202;
public static final int SOFT_KEY_MIDDLE_INTERNET = -203;
/**
* this key is present on Nokia s60
*/
public static final int PENCIL_KEY = -207;
public static final int DELETE_KEY = -204;
public static final int BACK_KEY = -205;
// public static final int SEND_KEY = -206; //constant will be used in future for green key start dialling
public static final int KEY_1 = 201;
public static final int KEY_2 = 202;
public static final int KEY_3 = 203;
public static final int KEY_4 = 204;
public static final int KEY_5 = 205;
public static final int KEY_6 = 206;
public static final int KEY_7 = 207;
public static final int KEY_8 = 208;
public static final int KEY_9 = 209;
public static final int KEY_0 = 200;
public static final int KEY__POUND = 211;
public static final int KEY__STAR = 212;
/**
* KEYS on JOISTICK
*/
public static final int UP_KEY = 221;
public static final int DOWN_KEY = 222;
public static final int LEFT_KEY = 223;
public static final int RIGHT_KEY = 224;
public static final int CENTER_KEY = 225;

public static final int NOT_DEFINED_KEY = 254;

// QWERTY NUMERIC
public static final int QKEY_1 = 49;
public static final int QKEY_2 = 50;
public static final int QKEY_3 = 51;
public static final int QKEY_4 = 52;
public static final int QKEY_5 = 53;
public static final int QKEY_6 = 54;
public static final int QKEY_7 = 55;
public static final int QKEY_8 = 56;
public static final int QKEY_9 = 57;
public static final int QKEY_0 = 48;





/**
* current platform name
*/
private final String PLATFORM_NAME;
/**
* current platform codeofSoftkey
*/
private final int SOFTKEY_LEFT;
private final int SOFTKEY_RIGHT;
private final int SOFTKEY_MIDDLE_INTERNET;
private final int SOFTKEY_DELETE;
private final int SOFTKEY_BACK;

/**
* standart values for softkeys of different platforms
* used only in predefining
*/
private static final int SOFT_KEY_LEFT_SE = -6;
private static final int SOFT_KEY_RIGHT_SE = -7;
private static final int DELETE_KEY_SE = -8;
private static final int INTERNET_KEY_SE = -10;
private static final int BACK_KEY_SE = -11;
private static final int SOFT_KEY_LEFT_SAMSUNG = -6;
private static final int SOFT_KEY_RIGHT_SAMSUNG = -7;
private static final int DELETE_KEY_SAMSUNG = -8;
private static final int SOFT_KEY_LEFT_SIEMENS = -1;
private static final int SOFT_KEY_RIGHT_SIEMENS = -4;
private static final int SOFT_KEY_LEFT_NOKIA = -6;
private static final int SOFT_KEY_RIGHT_NOKIA = -7;
private static final int DELETE_KEY_NOKIA = -8;
private static final int PENCIL_KEY_NOKIA = -50;
private static final int SOFT_KEY_LEFT_MOTOROLA = -21;
private static final int SOFT_KEY_RIGHT_MOTOROLA = -22;
private static final int SOFT_KEY_LEFT_MOTOROLA2 = -20;
private static final int SOFT_KEY_LEFT_MOTOROLA1 = 21;
private static final int SOFT_KEY_RIGHT_MOTOROLA1 = 22;
private static final int SOFT_KEY_MIDLE_MOTOROLA = -23;
private static final int SOFT_KEY_MIDLE_NOKIA = -5;

private static final String SOFT_WORD = "SOFT";

/**
* constructor.
* here is predefining of special keys and platform made
*/
private KeyCodeAdaptor() {
adaptorCanvas = MobileOrder.canvas;
PLATFORM_NAME = getPlatform();
SOFTKEY_LEFT = getLeftSoftkeyCode();
SOFTKEY_RIGHT = getRightSoftkeyCode();
SOFTKEY_MIDDLE_INTERNET = getMidleORInternetSoftkeyCode();
SOFTKEY_DELETE = getDeleteKeyCode();
SOFTKEY_BACK = getBackKeyCode();
}

/**
* return platform keycode of left softkey
* if it's defined
* default value -6
*
* @return SOFTKEY_LEFT
*/
public int getPlatformSoftkeyLeftCode() {
return SOFTKEY_LEFT;
}

/**
* Returns mobile phone platform
*
* @return name mobile phone platform
*/
private String getPlatform() {
// detecting NOKIA or SonyEricsson
try {
final String currentPlatform = System.getProperty("microedition.platform");
if (currentPlatform.indexOf("Nokia") != -1) {
return PLATFORM_NOKIA;
} else if (currentPlatform.indexOf("SonyEricsson") != -1) {
return PLATFORM_SONY_ERICSSON;
}
} catch (Throwable ex) {
}
// detecting SAMSUNG
try {
Class.forName("com.samsung.util.Vibration");
return PLATFORM_SAMSUNG;
} catch (Throwable ex) {
}
// detecting MOTOROLA
try {
Class.forName("com.motorola.multimedia.Vibrator");
return PLATFORM_MOTOROLA;
} catch (Throwable ex) {
try {
Class.forName("com.motorola.graphics.j3d.Effect3D");
return PLATFORM_MOTOROLA;
} catch (Throwable ex2) {
try {
Class.forName("com.motorola.multimedia.Lighting");
return PLATFORM_MOTOROLA;
} catch (Throwable ex3) {
try {
Class.forName("com.motorola.multimedia.FunLight");
return PLATFORM_MOTOROLA;
} catch (Throwable ex4) {
}
}
}
}
try {
if (adaptorCanvas.getKeyName(SOFT_KEY_LEFT_MOTOROLA).toUpperCase().indexOf(SOFT_WORD) > -1) {
return PLATFORM_MOTOROLA;
}
} catch (Throwable e) {
try {
if (adaptorCanvas.getKeyName(SOFT_KEY_LEFT_MOTOROLA1).toUpperCase().indexOf(SOFT_WORD) > -1) {
return PLATFORM_MOTOROLA;
}
} catch (Throwable e1) {
try {
if (adaptorCanvas.getKeyName(SOFT_KEY_LEFT_MOTOROLA2).toUpperCase().indexOf(SOFT_WORD) > -1) {
return PLATFORM_MOTOROLA;
}
} catch (Throwable e2) {
}
}
}
// detecting SIEMENS
try {
Class.forName("com.siemens.mp.io.File");
return PLATFORM_SIEMENS;
} catch (Throwable ex) {
}
// detecting LG
try {
Class.forName("mmpp.media.MediaPlayer");
return PLATFORM_LG;
} catch (Throwable ex) {
try {
Class.forName("mmpp.phone.Phone");
return PLATFORM_LG;
} catch (Throwable ex1) {
try {
Class.forName("mmpp.lang.MathFP");
return PLATFORM_LG;
} catch (Throwable ex2) {
try {
Class.forName("mmpp.media.BackLight");
return PLATFORM_LG;
} catch (Throwable ex3) {
}
}
}
}
return PLATFORM_NOT_DEFINED;
}

/**
* define real left soft key code by platform
*
* @return code
*/
private int getLeftSoftkeyCode() {
int keyCode = 0;
try {
if (PLATFORM_NAME.equals(PLATFORM_MOTOROLA)) {
String softkeyLeftMoto = "";
try {
softkeyLeftMoto = adaptorCanvas.getKeyName(SOFT_KEY_LEFT_MOTOROLA).toUpperCase();
} catch (IllegalArgumentException ilae) {
// ilae.printStackTrace();
}
String softkeyLeftMoto1 = "";
try {
softkeyLeftMoto1 = adaptorCanvas.getKeyName(SOFT_KEY_LEFT_MOTOROLA1).toUpperCase();
} catch (IllegalArgumentException ilae) {
// ilae.printStackTrace();
}
String softkeyLeftMoto2 = "";
try {
softkeyLeftMoto2 = adaptorCanvas.getKeyName(SOFT_KEY_LEFT_MOTOROLA2).toUpperCase();
} catch (IllegalArgumentException ilae) {
// ilae.printStackTrace();
}
if (softkeyLeftMoto.indexOf(SOFT_WORD) >= 0 && softkeyLeftMoto.indexOf("1") >= 0) {
return SOFT_KEY_LEFT_MOTOROLA;
} else if (softkeyLeftMoto1.indexOf(SOFT_WORD) >= 0 && softkeyLeftMoto1.indexOf("1") >= 0) {
return SOFT_KEY_LEFT_MOTOROLA1;
} else if (softkeyLeftMoto2.indexOf(SOFT_WORD) >= 0 && softkeyLeftMoto2.indexOf("1") >= 0) {
return SOFT_KEY_LEFT_MOTOROLA2;
} else if (softkeyLeftMoto.indexOf(SOFT_WORD) >= 0 && softkeyLeftMoto.indexOf("LEFT") >= 0) {
return SOFT_KEY_LEFT_MOTOROLA;
} else if (softkeyLeftMoto1.indexOf(SOFT_WORD) >= 0 && softkeyLeftMoto1.indexOf("LEFT") >= 0) {
return SOFT_KEY_LEFT_MOTOROLA1;
} else if (softkeyLeftMoto2.indexOf(SOFT_WORD) >= 0 && softkeyLeftMoto2.indexOf("LEFT") >= 0) {
return SOFT_KEY_LEFT_MOTOROLA2;
}

} else if (PLATFORM_NAME.equals(PLATFORM_NOKIA)) {
return SOFT_KEY_LEFT_NOKIA;
} else if (PLATFORM_NAME.equals(PLATFORM_SAMSUNG)) {
// String leftkeySamsungName = adaptorCanvas.getKeyName(SOFT_KEY_LEFT_SAMSUNG).toUpperCase();
// if (leftkeySamsungName.indexOf(SOFT_WORD) >= 0) {
// if (leftkeySamsungName.indexOf("1") >= 0) {
return SOFT_KEY_LEFT_SAMSUNG;
// } else if (leftkeySamsungName.indexOf("LEFT") >= 0) {
// return SOFT_KEY_LEFT_SAMSUNG;
// }
// }
} else if (PLATFORM_NAME.equals(PLATFORM_SIEMENS)) {
String leftKeySiemensName = adaptorCanvas.getKeyName(SOFT_KEY_LEFT_SIEMENS).toUpperCase();
if (leftKeySiemensName.indexOf(SOFT_WORD) >= 0) {
if (leftKeySiemensName.indexOf("1") >= 0) {
return SOFT_KEY_LEFT_SIEMENS;
} else if (leftKeySiemensName.indexOf("LEFT") >= 0) {
return SOFT_KEY_LEFT_SIEMENS;
}
}
} else if (PLATFORM_NAME.equals(PLATFORM_SONY_ERICSSON)) {
return SOFT_KEY_LEFT_SE;
} else if (PLATFORM_NAME.equals(PLATFORM_NOT_DEFINED)) {
//
for (int i = -125; i <= 125; i++) {
if (i == 0) {
i++;
}
// System.out.println(getKeyName(i).toUpperCase());
final String s = adaptorCanvas.getKeyName(i).toUpperCase();
if (s.indexOf(SOFT_WORD) >= 0) {
if (s.indexOf("1") >= 0) {
keyCode = i;
break;
}
if (s.indexOf("LEFT") >= 0) {
keyCode = i;
break;
}
}
}
}
if (keyCode == 0) {
//#if emulator
//# return SOFT_KEY_LEFT_NOKIA;
//#endif
}
} catch (Throwable iaEx) {
//#if emulator
//# return SOFT_KEY_LEFT_NOKIA;
//#endif
}
return keyCode;
}

/**
* define real right soft key code for current platform
*
* @return code
*/
private int getRightSoftkeyCode() {
int keyCode = 0;
try {
if (PLATFORM_NAME.equals(PLATFORM_MOTOROLA)) {

String rightSoftMoto1 = "";
try {
rightSoftMoto1 = adaptorCanvas.getKeyName(SOFT_KEY_LEFT_MOTOROLA1).toUpperCase();
} catch (IllegalArgumentException ilae) {
// ilae.printStackTrace();
}
String rightSoftMoto = "";
try {
rightSoftMoto = adaptorCanvas.getKeyName(SOFT_KEY_RIGHT_MOTOROLA).toUpperCase();
} catch (IllegalArgumentException ilae) {
// ilae.printStackTrace();
}
String rightSoftMoto2 = "";
try {
rightSoftMoto2 = adaptorCanvas.getKeyName(SOFT_KEY_RIGHT_MOTOROLA1).toUpperCase();
} catch (IllegalArgumentException ilae) {
// ilae.printStackTrace();
}
if (rightSoftMoto.indexOf(SOFT_WORD) >= 0 && rightSoftMoto.indexOf("2") >= 0) {
return SOFT_KEY_RIGHT_MOTOROLA;
} else if (rightSoftMoto1.indexOf(SOFT_WORD) >= 0 && rightSoftMoto1.indexOf("2") >= 0) {
return SOFT_KEY_RIGHT_MOTOROLA;
} else if (rightSoftMoto2.indexOf(SOFT_WORD) >= 0 && rightSoftMoto2.indexOf("2") >= 0) {
return SOFT_KEY_RIGHT_MOTOROLA1;
} else if (rightSoftMoto.indexOf(SOFT_WORD) >= 0 && rightSoftMoto.indexOf("RIGHT") >= 0) {
return SOFT_KEY_LEFT_MOTOROLA;
} else if (rightSoftMoto1.indexOf(SOFT_WORD) >= 0 && rightSoftMoto1.indexOf("RIGHT") >= 0) {
return SOFT_KEY_RIGHT_MOTOROLA1;
} else if (rightSoftMoto2.indexOf(SOFT_WORD) >= 0 && rightSoftMoto2.indexOf("RIGHT") >= 0) {
return SOFT_KEY_RIGHT_MOTOROLA;
}

} else if (PLATFORM_NAME.equals(PLATFORM_NOKIA)) {
return SOFT_KEY_RIGHT_NOKIA;
} else if (PLATFORM_NAME.equals(PLATFORM_SAMSUNG)) {
// String rightSoftSamsung = adaptorCanvas.getKeyName(SOFT_KEY_RIGHT_SAMSUNG).toUpperCase();
// if (rightSoftSamsung.indexOf(SOFT_WORD) >= 0) {
// if (rightSoftSamsung.indexOf("2") >= 0) {
return SOFT_KEY_RIGHT_SAMSUNG;
// } else if (rightSoftSamsung.indexOf("RIGHT") >= 0) {
// return SOFT_KEY_RIGHT_SAMSUNG;
// }
// }
} else if (PLATFORM_NAME.equals(PLATFORM_SIEMENS)) {
String rightSoftSiemens = adaptorCanvas.getKeyName(SOFT_KEY_RIGHT_SIEMENS).toUpperCase();
if (rightSoftSiemens.indexOf(SOFT_WORD) >= 0) {
if (rightSoftSiemens.indexOf("4") >= 0) {
return SOFT_KEY_RIGHT_SIEMENS;
} else if (rightSoftSiemens.indexOf("RIGHT") >= 0) {
return SOFT_KEY_RIGHT_SIEMENS;
}
}
} else if (PLATFORM_NAME.equals(PLATFORM_SONY_ERICSSON)) {
return SOFT_KEY_RIGHT_SE;
} else if (PLATFORM_NAME.equals(PLATFORM_NOT_DEFINED)) {
for (int i = -125; i <= 125; i++) {
if (i == 0) {
i++;
}
String keyName = adaptorCanvas.getKeyName(i).toUpperCase();
if (keyName.indexOf(SOFT_WORD) >= 0) {
if (keyName.indexOf("2") >= 0) {
keyCode = i;
break;
} else if (keyName.indexOf("4") >= 0) {
keyCode = i;
break;
} else if (keyName.indexOf("RIGHT") >= 0) {
keyCode = i;
break;
}
}
}
}
} catch (Throwable iaEx) {
//#if emulator
//# return SOFT_KEY_RIGHT_NOKIA;
//#endif
}
return keyCode;
}

/**
* define real middle soft key code for current platform
*
* @return code
*/
private int getMidleORInternetSoftkeyCode() {
try {
if (PLATFORM_NAME.equals(PLATFORM_MOTOROLA)) {
if (adaptorCanvas.getKeyName(SOFT_KEY_MIDLE_MOTOROLA).toUpperCase().indexOf("SOFT") >= 0) {
return SOFT_KEY_MIDLE_MOTOROLA;
}
} else if (PLATFORM_NAME.equals(PLATFORM_NOKIA)) {
if (adaptorCanvas.getKeyName(SOFT_KEY_MIDLE_NOKIA).toUpperCase().indexOf("SOFT") >= 0) {
return SOFT_KEY_MIDLE_NOKIA;
}
} else if (PLATFORM_NAME.equals(PLATFORM_SAMSUNG)) {
} else if (PLATFORM_NAME.equals(PLATFORM_SIEMENS)) {
} else if (PLATFORM_NAME.equals(PLATFORM_SONY_ERICSSON)) {
return INTERNET_KEY_SE;
}
} catch (Throwable e) {
}
return 0;
}

/**
* define real key's C or DELETE code for current platform
*
* @return code
*/
private int getDeleteKeyCode() {
try {
if (PLATFORM_NAME.equals(PLATFORM_MOTOROLA)) {

} else if (PLATFORM_NAME.equals(PLATFORM_NOKIA)) {
if (adaptorCanvas.getKeyName(DELETE_KEY_SE).toUpperCase().indexOf("CLEAR") >= 0) {
return DELETE_KEY_NOKIA;
} else {
return DELETE_KEY_NOKIA;
}
} else if (PLATFORM_NAME.equals(PLATFORM_SAMSUNG)) {
if (adaptorCanvas.getKeyName(DELETE_KEY_SAMSUNG).toUpperCase().indexOf("CLEAR") >= 0) {
return DELETE_KEY_SAMSUNG;
}
} else if (PLATFORM_NAME.equals(PLATFORM_SIEMENS)) {
} else if (PLATFORM_NAME.equals(PLATFORM_SONY_ERICSSON)) {
if (adaptorCanvas.getKeyName(DELETE_KEY_SE).toUpperCase().indexOf("CLEAR") >= 0) {
return DELETE_KEY_SE;
} else if (adaptorCanvas.getKeyName(DELETE_KEY_SE).toUpperCase().indexOf("C") >= 0) {
return DELETE_KEY_SE;
} else {
return DELETE_KEY_SE;
}
}
} catch (Throwable e) {
return DELETE_KEY_SE;
}
return 0;
}


/**
* define real key's BACK code for current platform
*
* @return code
*/
private int getBackKeyCode() {
try {
if (PLATFORM_NAME.equals(PLATFORM_MOTOROLA)) {

} else if (PLATFORM_NAME.equals(PLATFORM_NOKIA)) {

} else if (PLATFORM_NAME.equals(PLATFORM_SAMSUNG)) {
} else if (PLATFORM_NAME.equals(PLATFORM_SIEMENS)) {
} else if (PLATFORM_NAME.equals(PLATFORM_SONY_ERICSSON)) {
return BACK_KEY_SE;
}
} catch (Throwable e) {
}
return 0;
}

/**
* name of curent platform
*
* @return PLATFORM_NAME
*/
public String getPlatformName() {
return PLATFORM_NAME;
}

/**
* Used to adopt key kode to predefined constances, which are platform independent.
*


* You can use this method in any kind of canvas, but better at first time to call
* getInstance() method at the beginning of midlet work, because initialisation takes time.
*


* Best variant for usage is calling adoptKeyCode() to use keyPressed() method in Canvas:
*

 

* protected void keyPressed(int keyCode) {
* keyCode = KeyCodeAdaptor.getInstance().adoptKeyCode(keyCode);
* }
*

* and then you can use it:
*
 

* switch (keyCode) {
* case KeyCodeAdaptor.UP_KEY:
* break;
* case KeyCodeAdaptor.SOFT_KEY_LEFT:
* break;
* }

* or send this code to any other clesses.
*
* @param keycode This code is sent by platform to canvas and redirected here
* @return this keycode is equal to one of our constants declared in this class
*/
public int adoptKeyCode(int keycode, boolean isNumeric) {

switch (keycode) {
case Canvas.KEY_NUM0:
return KEY_0;
case Canvas.KEY_NUM1:
return KEY_1;
case Canvas.KEY_NUM2:
return KEY_2;
case Canvas.KEY_NUM3:
return KEY_3;
case Canvas.KEY_NUM4:
return KEY_4;
case Canvas.KEY_NUM5:
return KEY_5;
case Canvas.KEY_NUM6:
return KEY_6;
case Canvas.KEY_NUM7:
return KEY_7;
case Canvas.KEY_NUM8:
return KEY_8;
case Canvas.KEY_NUM9:
return KEY_9;
case Canvas.KEY_STAR:
return KEY__STAR;
case Canvas.KEY_POUND:
return KEY__POUND;
default:
if (keycode == SOFTKEY_LEFT) {
return SOFT_KEY_LEFT;
} else if (keycode == SOFTKEY_RIGHT) {
return SOFT_KEY_RIGHT;
} else if (keycode == SOFTKEY_DELETE) {
return DELETE_KEY;
} else if (keycode == SOFTKEY_BACK) {
return BACK_KEY;
} else if (keycode == SOFTKEY_MIDDLE_INTERNET) {
return SOFT_KEY_MIDDLE_INTERNET;
} else if (keycode == PENCIL_KEY_NOKIA) {
return PENCIL_KEY;
} else {
try {
final int gameAction;
gameAction = adaptorCanvas.getGameAction(keycode);
if (gameAction == Canvas.UP) {
return UP_KEY;
} else if (gameAction == Canvas.DOWN) {
return DOWN_KEY;
} else if (gameAction == Canvas.LEFT) {
return LEFT_KEY;
} else if (gameAction == Canvas.RIGHT) {
return RIGHT_KEY;
} else if (gameAction == Canvas.FIRE) {
return CENTER_KEY;
}
} catch (IllegalArgumentException e) {
// e.printStackTrace();
}
}
break;
}
if (isNumeric)
{
if (keycode == QKEY_0){
return KEY_0;
} else if (keycode == QKEY_1){
return KEY_1;
} else if (keycode == QKEY_2){
return KEY_2;
} else if (keycode == QKEY_3){
return KEY_3;
} else if (keycode == QKEY_4){
return KEY_4;
} else if (keycode == QKEY_5){
return KEY_5;
} else if (keycode == QKEY_6){
return KEY_6;
} else if (keycode == QKEY_7){
return KEY_7;
} else if (keycode == QKEY_8){
return KEY_8;
} else if (keycode == QKEY_9){
return KEY_9;
}
}

//#if debug
//# return keycode;
//#else
return NOT_DEFINED_KEY;
//#endif
}

/**
* return instance of class
*
* @return instance
*/
public static KeyCodeAdaptor getInstance() {
return instance;
}
}

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/z-I7wC2kTDo/11669

 
2


Page 2 of 3
Taxonomy by Zaragoza Online