--- a/javauis/lcdui_qt/src/javax/microedition/lcdui/CanvasKeypad.java Fri Jun 11 13:33:44 2010 +0300
+++ b/javauis/lcdui_qt/src/javax/microedition/lcdui/CanvasKeypad.java Wed Jun 23 18:07:10 2010 +0300
@@ -189,10 +189,9 @@
* Constructs a canvas kepad based on the JAD attribute
*
* @param canvas - canvas for which the keypad is required.
- * @param canvasComp - Composite corresponding to the canvas.
* @param mode- the jad attribute as a string.
*/
- CanvasKeypad(Canvas canvas, Composite canvasComp, String mode)
+ CanvasKeypad(Canvas canvas, String mode)
{
this.canvas = canvas;
@@ -244,7 +243,7 @@
canvasData.left = new FormAttachment(0);
canvasData.top = new FormAttachment(0);
canvasData.bottom = new FormAttachment(keypadComposite);
- canvasComp.setLayoutData(canvasData);
+ canvas.getContentComp().setLayoutData(canvasData);
FormData navKeyData = new FormData();
navKeyData.right = new FormAttachment(100);
@@ -438,6 +437,7 @@
gameKeysComposite.layout();
}
+
/**
* Handles orientation changes.
*/
@@ -448,6 +448,16 @@
/**
+ * Sets the currect Canvas for Key events.
+ * @param canvas - Current Canvas to which the key events needs to be delivered.
+ */
+ void setCurrentCanvas(Canvas canvas)
+ {
+ this.canvas = canvas;
+ }
+
+
+ /**
* Adds LSk and RSK keys to navigation keypad if the canvas is set to full screen mode.
* @param mode- Indicates if the canvas is in fullscreen mode or not. True if fullscreen, False otherwise.
*/