|
Lines 17-22
Link Here
|
| 17 |
import org.eclipse.jface.util.Geometry; |
17 |
import org.eclipse.jface.util.Geometry; |
| 18 |
import org.eclipse.jface.util.IPropertyChangeListener; |
18 |
import org.eclipse.jface.util.IPropertyChangeListener; |
| 19 |
import org.eclipse.jface.util.PropertyChangeEvent; |
19 |
import org.eclipse.jface.util.PropertyChangeEvent; |
|
|
20 |
import org.eclipse.rwt.internal.service.ContextProvider; |
| 21 |
import org.eclipse.rwt.service.ISessionStore; |
| 20 |
import org.eclipse.swt.SWT; |
22 |
import org.eclipse.swt.SWT; |
| 21 |
import org.eclipse.swt.events.ShellAdapter; |
23 |
import org.eclipse.swt.events.ShellAdapter; |
| 22 |
import org.eclipse.swt.events.ShellEvent; |
24 |
import org.eclipse.swt.events.ShellEvent; |
|
Lines 83-88
Link Here
|
| 83 |
*/ |
85 |
*/ |
| 84 |
public abstract class Window implements IShellProvider { |
86 |
public abstract class Window implements IShellProvider { |
| 85 |
|
87 |
|
|
|
88 |
// RAP [if] Session scoped defaultModalParent |
| 89 |
private static final String DEFAULT_MODAL_PARENT |
| 90 |
= Window.class.getName() + "#defaultModalParent"; //$NON-NLS-1$ |
| 91 |
|
| 86 |
/** |
92 |
/** |
| 87 |
* Standard return code constant (value 0) indicating that the window was |
93 |
* Standard return code constant (value 0) indicating that the window was |
| 88 |
* opened. |
94 |
* opened. |
|
Lines 641-647
Link Here
|
| 641 |
if ((getShellStyle() & modal) != 0) { |
647 |
if ((getShellStyle() & modal) != 0) { |
| 642 |
// If this is a modal shell with no parent, pick a shell using defaultModalParent. |
648 |
// If this is a modal shell with no parent, pick a shell using defaultModalParent. |
| 643 |
if (parent == null) { |
649 |
if (parent == null) { |
| 644 |
parent = defaultModalParent.getShell(); |
650 |
// RAP [if] Session scoped defaultModalParent |
|
|
651 |
// parent = defaultModalParent.getShell(); |
| 652 |
parent = getDefaultModalParent().getShell(); |
| 645 |
} |
653 |
} |
| 646 |
} |
654 |
} |
| 647 |
|
655 |
|
|
Lines 1048-1054
Link Here
|
| 1048 |
* @since 1.0 |
1056 |
* @since 1.0 |
| 1049 |
*/ |
1057 |
*/ |
| 1050 |
public static void setDefaultModalParent(IShellProvider provider) { |
1058 |
public static void setDefaultModalParent(IShellProvider provider) { |
| 1051 |
defaultModalParent = provider; |
1059 |
// RAP [if] Session scoped defaultModalParent |
|
|
1060 |
// defaultModalParent = provider; |
| 1061 |
ISessionStore session = ContextProvider.getSession(); |
| 1062 |
session.setAttribute( DEFAULT_MODAL_PARENT, provider ); |
| 1063 |
} |
| 1064 |
|
| 1065 |
// RAP [if] Session scoped defaultModalParent |
| 1066 |
private static IShellProvider getDefaultModalParent() { |
| 1067 |
ISessionStore session = ContextProvider.getSession(); |
| 1068 |
IShellProvider result = ( IShellProvider )session.getAttribute( DEFAULT_MODAL_PARENT ); |
| 1069 |
if( result == null ) { |
| 1070 |
result = defaultModalParent; |
| 1071 |
} |
| 1072 |
return result; |
| 1052 |
} |
1073 |
} |
| 1053 |
|
1074 |
|
| 1054 |
// RAP [bm]: SWT.RIGHT_TO_LEFT |
1075 |
// RAP [bm]: SWT.RIGHT_TO_LEFT |