diff -r 4ad59aaee882 -r 2f468c1958d0 javauis/lcdui_qt/src/javax/microedition/lcdui/TextBox.java --- a/javauis/lcdui_qt/src/javax/microedition/lcdui/TextBox.java Fri Sep 17 08:28:21 2010 +0300 +++ b/javauis/lcdui_qt/src/javax/microedition/lcdui/TextBox.java Mon Oct 04 00:10:53 2010 +0300 @@ -36,6 +36,8 @@ private TextWrapper textWrapper; private int numLines; + private Shell topShell; + private boolean firstDisplayable = false; /** * Constructor. @@ -59,24 +61,13 @@ */ Shell eswtConstructShell(int style) { - Shell topShell = super.eswtConstructShell(style); - // TextBox with null title and ANY constraint, should be Full-Screen - if(getTitle() == null && TextWrapper.getTypeConstraint( - textWrapper.getConstraints()) == TextField.ANY) - { - return topShell; - } - else + topShell = super.eswtConstructShell(style); + Shell currentShell = topShell; + if(super.isPopup()) { - if(JadAttributeUtil.isValue(JadAttributeUtil.ATTRIB_NOKIA_UI_ENHANCEMENT, JadAttributeUtil.VALUE_FULLSCREEN_TEXTBOX)) - { - return topShell; - } - else - { - return new Shell(topShell, style | SWT.DIALOG_TRIM | SWT.RESIZE); - } + currentShell = new Shell(topShell, style | SWT.DIALOG_TRIM | SWT.RESIZE); } + return currentShell; } /* (non-Javadoc) @@ -94,6 +85,13 @@ */ void eswtHandleShowCurrentEvent() { + // If it is popuptextbox and there is no active displayable + // behind textbox default displayable should be shown + if(super.isPopup() && topShell != null && + topShell.isVisible() == false && firstDisplayable == true) + { + topShell.setVisible(true); + } super.eswtHandleShowCurrentEvent(); textWrapper.setModifyListener(modListener); eswtSetPreferredContentSize(-1, textWrapper @@ -118,6 +116,13 @@ textWrapper.setBounds(getContentComp().getClientArea()); } + /* (non-Javadoc) + */ + void setFirstDisplayable(boolean first) + { + firstDisplayable = first; + } + /** * Get current caret position. *