Dialog.open() method packs all my Views [message #1424681] |
Tue, 16 September 2014 09:20 |
UmaShankar Subramani Messages: 194 Registered: December 2011 Location: SWEDEN |
Senior Member |
|
|
My RAP application has 3 views. When a view is displayed, the others are minimized.
Whenever I try to open a dialog from any view, it packs(same action as I have called pack() method) all the views.
When this unwanted pack happens, my some UI controls scales and grap more space than intended.
How can I solve this problem.
MessageBox dialog = new MessageBox(shell, SWT.OK);
dialog.open();
[Updated on: Tue, 16 September 2014 09:34] Report message to a moderator
|
|
|
|
|
|
Re: Dialog.open() method packs all my Views [message #1424834 is a reply to message #1424746] |
Tue, 16 September 2014 13:32 |
UmaShankar Subramani Messages: 194 Registered: December 2011 Location: SWEDEN |
Senior Member |
|
|
Hi Ivan,
Thanks for you help.
I have attached a Sample View(called TextView).
Step 1: The view is loaded with a textBox(SWT.Wrap) with a simple text.
Step 2: Click "Modify Text" . Then a Long text is set to the textBox. Since the text is too long, it wraps.
Step 3: Click "Open Dialog". When the dialog is opened, the text box expands and becomes greedy. It occupies as much space as needed. This is the problem.
When I debug the code, the change in the UI(pack) happend just after the lock.wait() call in the switchThread() method of UIThread class (During dialog.open() method call). Is that a good clue?
public void switchThread() {
Object lock = getLock();
synchronized( lock ) {
checkAndReportTerminatedUIThread();
lock.notifyAll();
boolean done = false;
while( !done ) {
try {
lock.wait();
done = true;
} catch( InterruptedException e ) {
handleInterruptInSwitchThread( e );
}
}
}
}
-
Attachment: TestView.java
(Size: 2.91KB, Downloaded 281 times) -
Attachment: Step1.png
(Size: 27.42KB, Downloaded 136 times) -
Attachment: Step2.png
(Size: 30.21KB, Downloaded 131 times) -
Attachment: Step3.png
(Size: 32.27KB, Downloaded 121 times)
[Updated on: Tue, 16 September 2014 14:03] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.25413 seconds