|
@@ -15,40 +15,42 @@ |
15 |
15 |
|
*/ |
16 |
16 |
|
package com.google.gwt.widgetideas.client.impl; |
17 |
17 |
|
|
18 |
|
- |
import com.google.gwt.user.client.ui.AbsolutePanel; |
19 |
|
- |
import com.google.gwt.widgetideas.client.GlassPanel; |
|
18 |
+ |
import com.google.gwt.user.client.ui.*; |
|
19 |
+ |
import com.google.gwt.widgetideas.client.*; |
20 |
20 |
|
|
21 |
21 |
|
/** |
22 |
22 |
|
* Deferred binding implementation of {@link GlassPanel}. |
23 |
23 |
|
*/ |
24 |
|
- |
public abstract class GlassPanelImpl { |
25 |
|
- |
/** |
26 |
|
- |
* TODO Replace with Window.getScrollHeight() when GWT issue 2068 is addressed |
27 |
|
- |
*/ |
28 |
|
- |
protected static native int getWindowScrollHeight() |
29 |
|
- |
/*-{ |
30 |
|
- |
return @com.google.gwt.user.client.impl.DocumentRootImpl::documentRoot.scrollHeight; |
31 |
|
- |
}-*/; |
32 |
|
- |
|
33 |
|
- |
/** |
34 |
|
- |
* TODO Replace with Window.getScrollWidth() when GWT issue 2068 is addressed |
35 |
|
- |
*/ |
36 |
|
- |
protected static native int getWindowScrollWidth() |
37 |
|
- |
/*-{ |
38 |
|
- |
return @com.google.gwt.user.client.impl.DocumentRootImpl::documentRoot.scrollWidth; |
39 |
|
- |
}-*/; |
40 |
|
- |
|
41 |
|
- |
// TODO remove once GWT issue 1981 is fixed |
42 |
|
- |
// http://code.google.com/p/google-web-toolkit/issues/detail?id=1981 |
43 |
|
- |
public native boolean isCSS1Compat() |
44 |
|
- |
/*-{ |
45 |
|
- |
return $doc.compatMode == 'CSS1Compat'; |
46 |
|
- |
}-*/; |
47 |
|
- |
|
48 |
|
- |
public abstract void matchDocumentSize(GlassPanel glassPanel, boolean dueToResize); |
49 |
|
- |
|
50 |
|
- |
public void matchParentSize(GlassPanel glassPanel, AbsolutePanel parent) { |
51 |
|
- |
glassPanel.getElement().getStyle().setProperty("bottom", "0px"); |
52 |
|
- |
glassPanel.getElement().getStyle().setProperty("right", "0px"); |
53 |
|
- |
} |
|
24 |
+ |
public abstract class GlassPanelImpl |
|
25 |
+ |
{ |
|
26 |
+ |
/** |
|
27 |
+ |
* TODO Replace with Window.getScrollHeight() when GWT issue 2068 is addressed |
|
28 |
+ |
*/ |
|
29 |
+ |
protected static native int getWindowScrollHeight() |
|
30 |
+ |
/*-{ |
|
31 |
+ |
return @com.google.gwt.user.client.impl.DocumentRootImpl::documentRoot.scrollHeight; |
|
32 |
+ |
}-*/; |
|
33 |
+ |
|
|
34 |
+ |
/** |
|
35 |
+ |
* TODO Replace with Window.getScrollWidth() when GWT issue 2068 is addressed |
|
36 |
+ |
*/ |
|
37 |
+ |
protected static native int getWindowScrollWidth() |
|
38 |
+ |
/*-{ |
|
39 |
+ |
return @com.google.gwt.user.client.impl.DocumentRootImpl::documentRoot.scrollWidth; |
|
40 |
+ |
}-*/; |
|
41 |
+ |
|
|
42 |
+ |
// TODO remove once GWT issue 1981 is fixed |
|
43 |
+ |
// http://code.google.com/p/google-web-toolkit/issues/detail?id=1981 |
|
44 |
+ |
public native boolean isCSS1Compat() |
|
45 |
+ |
/*-{ |
|
46 |
+ |
return $doc.compatMode == 'CSS1Compat'; |
|
47 |
+ |
}-*/; |
|
48 |
+ |
|
|
49 |
+ |
public abstract void matchDocumentSize( GlassPanel glassPanel, boolean dueToResize ); |
|
50 |
+ |
|
|
51 |
+ |
public void matchParentSize( GlassPanel glassPanel, AbsolutePanel parent ) |
|
52 |
+ |
{ |
|
53 |
+ |
glassPanel.getElement().getStyle().setProperty( "bottom", "0px" ); |
|
54 |
+ |
glassPanel.getElement().getStyle().setProperty( "right", "0px" ); |
|
55 |
+ |
} |
54 |
56 |
|
} |