--- a/javauis/lcdui_qt/src/javax/microedition/lcdui/Displayable.java Fri Jun 11 13:33:44 2010 +0300
+++ b/javauis/lcdui_qt/src/javax/microedition/lcdui/Displayable.java Tue Jul 06 20:36:19 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009, 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -21,11 +21,11 @@
import javax.microedition.lcdui.EventDispatcher.LCDUIEvent;
-import org.eclipse.ercp.swt.mobile.MobileShell;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.internal.extension.CompositeExtension;
+import org.eclipse.swt.internal.extension.MobileShellExtension;
import org.eclipse.swt.widgets.*;
import com.nokia.mj.impl.rt.support.ApplicationUtils;
import com.nokia.mj.impl.rt.support.ApplicationInfo;
@@ -126,7 +126,7 @@
{
public void run()
{
- shell = eswtConstructShell(SWT.SYSTEM_MODAL);
+ shell = eswtConstructShell(SWT.SHELL_TRIM | SWT.PRIMARY_MODAL);
eswtSetTitle();
contentComp = eswtConstructContent(SWT.NONE);
contentArea = eswtLayoutShellContent();
@@ -166,7 +166,7 @@
*/
Shell eswtConstructShell(int style)
{
- return new MobileShell(ESWTUIThreadRunner.getInstance().getDisplay(), style);
+ return new MobileShellExtension(ESWTUIThreadRunner.getInstance().getDisplay(), style);
}
/**
@@ -191,6 +191,10 @@
if(!shell.isDisposed())
{
eswtUpdateSizes();
+ if(ticker != null)
+ {
+ ticker.start();
+ }
shell.addShellListener(eswtShellListener);
shell.addDisposeListener(eswtDisposeListener);
shell.addControlListener(eswtControlListener);
@@ -343,6 +347,7 @@
if(tickerLabel != null)
{
int tickerHeight = tickerLabel.getBounds().height;
+
contentComp.setBounds(0, tickerHeight,
shellArea.width, shellArea.height - tickerHeight);
}
@@ -620,6 +625,26 @@
}
/**
+ * Gets the commands array.
+ *
+ * @return the commands
+ */
+ Vector getCommands()
+ {
+ return commands;
+ }
+
+ /**
+ * Gets the command listener.
+ *
+ * @return the eswt command listener.
+ */
+ final EswtCommandListener getCommandListener()
+ {
+ return eswtCommandListener;
+ }
+
+ /**
* Gets width.
*
* @return Width of the Displayable in pixels.
@@ -690,10 +715,13 @@
});
if(ticker != null)
{
- // Start to scroll the ticker. Ticker may be already running
- // if it exists in some other displayable already, but
- // calling this again wont do any harm:
- ticker.start();
+ if(isLcduiVisible)
+ {
+ // Start to scroll the ticker. Ticker may be already running
+ // if it exists in some other displayable already, but
+ // calling this again wont do any harm:
+ ticker.start();
+ }
}
}
@@ -746,7 +774,7 @@
/**
* Creates singleton Label instance used by Ticker.
*/
- private Label getTickerLabel()
+ Label getTickerLabel()
{
if(tickerLabel == null)
{
@@ -859,10 +887,14 @@
public void shellActivated(ShellEvent e)
{
- if(!isShellActive)
+ ESWTUIThreadRunner.getInstance().getDisplay()
+ .asyncExec(new Runnable()
{
- handleShellActivatedEvent();
- }
+ public void run()
+ {
+ handleShellActivatedEvent();
+ }
+ });
}
public void shellDeactivated(ShellEvent e)
@@ -907,6 +939,7 @@
*/
class EswtControlListener implements ControlListener
{
+
public void controlResized(ControlEvent e)
{
eswtUpdateSizes();