|
GWT Tk 0.2.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.ComplexPanel
asquare.gwt.tk.client.ui.CComplexPanel
asquare.gwt.tk.client.ui.GlassPanel
public class GlassPanel
A panel which covers the entire viewport or document, whichever is larger. The GlassPanel prevents interaction with the document. Useful for modal dialogs and the "lightbox" effect. Window resizing logic is handled in a pluggable controller whose implementation varies by platform. When the GlassPanel is shown, a style name is applied to the body element; the style name is removed when the GlassPanel is hidden.
.tk-GlassPanel {
background: black;
opacity: 0.2;
filter: alpha(opacity=20);
}
This example uses a transparent PNG background to workaround a bug with Flash
& transparency in Firefox/Mac:
Java
GlassPanel gp = new GlassPanel();
Label content = new Label();
content.setStyleName("Content");
content.setSize("100%", "100%");
gp.add(content);
gp.show();
CSS
.tk-GlassPanel {
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='Gray20.png', sizingMethod='scale');
}
.tk-GlassPanel .Content
background: url('Gray20.png');
filter: alpha(opacity=0);
}
The filter rule applies transparency in IE.
| Field Summary | |
|---|---|
static String |
DEFAULT_BODY_STYLENAME
|
| Constructor Summary | |
|---|---|
GlassPanel()
Creates a GlassPanel based on a div. |
|
GlassPanel(Element element)
Creates a GlassPanel based the specified element. |
|
GlassPanel(Element element,
String bodyStyleName)
Creates a GlassPanel based the specified element. |
|
GlassPanel(String bodyStyleName)
Creates a GlassPanel based on a div. |
|
| Method Summary | |
|---|---|
void |
add(Widget w)
|
protected List |
createControllers()
A factory method which gives subclasses the opportunity to override default controller creation. |
String |
getBodyStyleName()
Gets the style name which will be applied to the body element while the GlassPanel is shown. |
void |
hide()
Hides the GlassPanel by detaching it from the RootPanel. |
void |
setBodyStyleName(String bodyStyleName)
Sets the style name which will be applied to the body element while the GlassPanel is shown. |
void |
show()
Positions the GlassPanel, then makes it visible by appending it to the RootPanel. |
| Methods inherited from class asquare.gwt.tk.client.ui.CComplexPanel |
|---|
addController, getController, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeController, setControllers, sinkEvents, unsinkEvents |
| Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel |
|---|
add, getChildren, insert, iterator, remove |
| Methods inherited from class com.google.gwt.user.client.ui.Panel |
|---|
adopt, clear, disown |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
getParent, isAttached, removeFromParent |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleName, getTitle, isVisible, isVisible, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setTitle, setVisible, setVisible, setWidth, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_BODY_STYLENAME
| Constructor Detail |
|---|
public GlassPanel()
public GlassPanel(Element element)
public GlassPanel(String bodyStyleName)
bodyStyleName will applied to the body element for the
duration that the GlassPanel is visible.
bodyStyleName - a CSS class name, or null
public GlassPanel(Element element,
String bodyStyleName)
bodyStyleName will applied to the body element for the
duration that the GlassPanel is visible.
element - an elementbodyStyleName - a CSS class name, or null| Method Detail |
|---|
protected List createControllers()
CComplexPanel
createControllers in class CComplexPanelnullpublic String getBodyStyleName()
nullpublic void setBodyStyleName(String bodyStyleName)
bodyStyleName - a CSS class name, or nullpublic void add(Widget w)
add in interface HasWidgetsadd in class Panelpublic void show()
public void hide()
|
GWT Tk 0.2.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||