Dialog.open() method packs all my Views [message #1424681] |
Tue, 16 September 2014 05:20  |
Eclipse User |
|
|
|
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 05:34] by Moderator
|
|
|
|
|
|
Re: Dialog.open() method packs all my Views [message #1424834 is a reply to message #1424746] |
Tue, 16 September 2014 09:32   |
Eclipse User |
|
|
|
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 317 times)
Attachment: Step1.png
(Size: 27.42KB, Downloaded 159 times)
Attachment: Step2.png
(Size: 30.21KB, Downloaded 167 times)
Attachment: Step3.png
(Size: 32.27KB, Downloaded 143 times)
[Updated on: Tue, 16 September 2014 10:03] by Moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05050 seconds