List of usage examples for com.google.gwt.widgetideas.client GlassPanel GlassPanel
public GlassPanel(boolean autoHide)
From source file:com.google.gwt.demos.glasspanel.client.GlassPanelDemo.java
License:Apache License
private void resetGlassPanels() { removeGlassPanel();/*from w w w .j av a 2s . co m*/ redGlassPanel = new GlassPanel(false); redGlassPanel.addStyleName("red"); redAbsolutePanel.add(redGlassPanel, 0, 0); greenGlassPanel = new GlassPanel(true); greenGlassPanel.addStyleName("green"); greenAbsolutePanel.add(greenGlassPanel, 0, 0); glassPanel3 = new GlassPanel(true); RootPanel.get().add(glassPanel3, 0, 0); }
From source file:com.google.gwt.examples.GlassPanelExample.java
License:Apache License
public void onModuleLoad() { // Create a glass panel covering the entire browser document RootPanel.get().add(new Label("The browser document will be covered by a semi-transparent glass panel.")); RootPanel.get().add(new Label("Hit ESC or click anywhere on the glass panel to remove it.")); RootPanel.get().add(new GlassPanel(true), 0, 0); // Create a small AbsolutePanel AbsolutePanel absolutePanel = new AbsolutePanel(); absolutePanel.setPixelSize(100, 100); DOM.setStyleAttribute(absolutePanel.getElement(), "border", "1px solid black"); absolutePanel.add(new Label("This AbsolutePanel is covered with a semi-transparent green glass panel")); // Attach the AbsolutePanel RootPanel.get().add(absolutePanel, 50, 50); // Attach an absolute panel and style it green using this !important CSS // rule:// ww w. ja va 2 s. co m // .green { background-color: green !important; } GlassPanel greenGlassPanel = new GlassPanel(false); greenGlassPanel.addStyleName("green"); absolutePanel.add(greenGlassPanel, 0, 0); }
From source file:com.square.composant.ged.square.client.composant.popup.Popup.java
License:Open Source License
/** * Constructeur./*from w w w.j ava 2s .c o m*/ * @param title title * @param autoHide autoHide * @param modal modal * @param hasGlassPanel glasspanel */ public Popup(String title, boolean autoHide, boolean modal, boolean hasGlassPanel) { dialogBox = new ConstrainedDialogBox(autoHide, modal); dialogBox.setText(title); dialogBox.setAnimationEnabled(true); if (hasGlassPanel) { // on ajoute un glass panel glassPanel = new GlassPanel(false); } final VerticalPanel panel = new VerticalPanel(); dialogBox.setWidget(panel); panel.setSpacing(10); }
From source file:com.xpn.xwiki.wysiwyg.client.widget.DialogBox.java
License:Open Source License
/** * Creates a new dialog./* w w w. j a v a 2 s . co m*/ * * @param autoHide Whether or not the dialog should auto hide when the user clicks outside of it. * @param modal Specifies if the dialog box can loose focus. */ public DialogBox(boolean autoHide, boolean modal) { // We use our own modal mechanism, based on glass panel. super(autoHide, false); caption = new Label(); caption.addStyleName("xDialogCaption"); (new DragAdaptor(caption)).addDragListener(this); closeIcon = Images.INSTANCE.close().createImage(); closeIcon.setTitle(Strings.INSTANCE.close()); closeIcon.addStyleName("xDialogCloseIcon"); closeIcon.addClickListener(this); captionBar = new FlowPanel(); captionBar.addStyleName("xDialogCaptionBar"); captionBar.add(caption); captionBar.add(closeIcon); content = new FlowPanel(); content.addStyleName("xDialogContent"); contentPlaceHolder = new FlowPanel(); contentPlaceHolder.setVisible(false); box = new FlowPanel(); box.setStylePrimaryName("xDialogBox"); box.add(captionBar); box.add(content); box.add(contentPlaceHolder); int zIndex = 100; if (modal) { glassPanel = new GlassPanel(false); glassPanel.getElement().getStyle().setProperty(Style.Z_INDEX, String.valueOf(zIndex++)); } else { glassPanel = null; } getElement().getStyle().setProperty(Style.Z_INDEX, String.valueOf(zIndex)); super.setWidget(box); }
From source file:org.ednovo.gooru.client.uc.LabelGlassPanel.java
License:Open Source License
/** * Class constructor/*from w w w . j a v a 2s.com*/ */ public LabelGlassPanel() { super(); glassPanelText = new Label(); topPanel = new FlowPanel(); glassPanelText.setStyleName(UcCBundle.INSTANCE.css().labelGlassPanelText()); glassPanel = new GlassPanel(false); topPanel.add(glassPanelText); contentPanel = new FlowPanel(); this.add(contentPanel); this.add(glassPanel); this.add(topPanel); this.setWidgetPosition(glassPanel, 0, 0); this.setWidgetPosition(topPanel, 0, 0); setGlassVisible(false); }