Example usage for com.google.gwt.user.client.ui PopupListener PopupListener

List of usage examples for com.google.gwt.user.client.ui PopupListener PopupListener

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui PopupListener PopupListener.

Prototype

PopupListener

Source Link

Usage

From source file:com.apress.progwt.client.college.gui.LoginWindow.java

License:Apache License

/**
 * Prevents multiple instances with a semaphore.
 * /*  ww w.j  a v a 2s.co  m*/
 * @param ConstHolder.myConstants -
 *            NOTE: this is used by both AddLink & Hippo modules, so
 *            we can't rely on Manager.ConstHolder.myConstants being
 *            initialized.
 * 
 * @param manager
 */
public LoginWindow(LoginListener listener, String secureTargetURL) {
    super(false, false);
    this.secureTargetURL = secureTargetURL;

    this.listener = listener;

    if (semaphore == false) {
        Log.debug("CREATING LoginWindow");
        semaphore = true;
    } else {
        Log.debug("KILLING LoginWindow");

        hide();
        return;
    }
    setText("Please Login");

    setupForm();

    addPopupListener(new PopupListener() {

        public void onPopupClosed(PopupPanel sender, boolean autoClosed) {
            semaphore = false;
        }
    });

    setWidget(form);

    setStyleName("TC-Popup");

}

From source file:com.dimdim.conference.ui.common.client.layout.DefaultCommonDialog.java

License:Open Source License

public static void showMessage(String title, String message, String dialogName, PopupListener popupListener) {
    hideMessageBox();/*from  w w w. j a  v  a  2  s . c om*/
    HTML html = new HTML(message);
    html.setStyleName("common-text");
    html.setWordWrap(true);
    dcd = new DefaultCommonDialog(title, html, dialogName);
    if (popupListener != null) {
        dcd.addPopupListener(popupListener);
    }
    dcd.drawDialog();
    dcd.addPopupListener(new PopupListener() {
        public void onPopupClosed(PopupPanel dialog, boolean autoClosed) {
            dcd = null;
        }
    });
    //      dcd = null;      
}

From source file:com.dimdim.conference.ui.layout.client.widget.ResourceRoster.java

License:Open Source License

protected ClickListener getListPanelLhsLinkClickListener() {
    return new ClickListener() {
        // look here
        public void onClick(Widget sender) {
            //Window.alert("List Panel LHS Click Listener");
            if (UIGlobals.isActivePresenter(me)) {
                SelectFileDialogue safd = new SelectFileDialogue(resourceManager.getSharingController());

                resourceManager.getSharingController().showFileSelector(safd);
                safd.addPopupListener(new PopupListener() {
                    public void onPopupClosed(PopupPanel sender, boolean autoClosed) {
                        ClientModel.getClientModel().getRosterModel().resetSessionTimeout();
                        resourceManager.getSharingController().showFileSelector(null);
                    }//from   ww w  .j  a v  a2s.  c  o m
                });
            } //end of if active presenter
            else {
                Window.alert("sorry nothing to do here");
            }
        }
    };

}

From source file:com.dimdim.conference.ui.layout2.client.ResourceRoster.java

License:Open Source License

public ClickListener getListPanelLhsLinkClickListener() {
    return new ClickListener() {
        public void onClick(Widget sender) {
            if (UIGlobals.isActivePresenter(me)) {
                SelectFileDialogue safd = new SelectFileDialogue(resourceManager.getSharingController());

                resourceManager.getSharingController().showFileSelector(safd);
                safd.addPopupListener(new PopupListener() {
                    public void onPopupClosed(PopupPanel sender, boolean autoClosed) {
                        ClientModel.getClientModel().getRosterModel().resetSessionTimeout();
                        resourceManager.getSharingController().showFileSelector(null);
                    }/*from  w  ww . j a va  2  s  .  c o  m*/
                });
            } else {
                //                Window.alert("sorry nothing to do here");
            }
        }
    };
}

From source file:com.dimdim.conference.ui.managers.client.resource.ResourceSharingController.java

License:Open Source License

/**
 * /*from ww  w.  java2 s .  co m*/
 * @param me
 */
public ResourceSharingController(UIRosterEntry me, ResourceManager resourceManager) {
    this.me = me;
    this.resourceManager = resourceManager;

    this.publisherData = new WaitAndContinueData();

    String dtpRtmpUrl = UIGlobals.getStreamingUrlsTable().getDtpRtmpUrl();
    String dtpRtmptUrl = UIGlobals.getStreamingUrlsTable().getDtpRtmptUrl();
    this.publisherData.setRtmpUrl(dtpRtmpUrl);
    //      this.publisherData.setRtmptUrl(dtpRtmptUrl);
    //      this.publisherData.setStr3(ConferenceGlobals.conferenceKey+"_sh");
    this.publisherData.setUserId(me.getUserId());
    this.publisherData.setConferenceKey(ConferenceGlobals.conferenceKeyQualified);
    this.publisherData.setRecordingFlags("");

    //   Recording flags. pattern is
    //   ~/dimdim_id/room_id/meeting_id
    //   
    //   At the time of the 4.0 development dimdim_id and room_id are same as
    //   confKey. Only question is whether recording is supported or not.
    //   
    if (ConferenceGlobals.recordingEnabled) {
        recordingFlags = "~" + ConferenceGlobals.conferenceKeyQualified + "/" + ConferenceGlobals.roomId + "/"
                + ConferenceGlobals.conferenceId;
    }
    //      this.publisherData.setStr6("");

    appShareListener = new ApplicationShareListener(this);
    pendingShareListener = new PopupListener() {
        public void onPopupClosed(PopupPanel sender, boolean autoClosed) {
            startPendingShare();
        }
    };

    /*pollForUrl = new Timer() {
    public void run() {
     String confUrl = getLocation();
     //Window.alert("the url "+confUrl);
     int index = confUrl.indexOf("%23");
     if(index != -1 )
     {
        String url = confUrl.substring(index+3);
        //Window.alert("the url "+url);
        //Window.alert("after escaping url "+unescape(url));
        writeCobResName(unescape(url));
       }
    }
        };*/

    // Schedule the timer to run once in 5 seconds.

}

From source file:com.dimdim.conference.ui.user.client.ActivePresenterAVManager.java

License:Open Source License

public void handleEvent(String eventName) {
    if (eventName.startsWith("start")) {
        //         Window.alert("Sending av start to all participants");
        this.startPublication();
        ConferenceGlobals.setPresenterAVActive(true);
        AnalyticsConstants.reportAVStarted();
    } else if (eventName.startsWith("stop")) {
        //         Window.alert("Sending av stop to all participants");
        this.stopPublication();
        ConferenceGlobals.setPresenterAVActive(false);
        AnalyticsConstants.reportAVStopped();
    } else if (eventName.startsWith("close")) {
        //   This event is raised by the movie if user denies
        //   access to the mike or camera by pressing on the
        //   deny option of the flash device access security
        //   warning. The movie can not recover from this
        //   choice selection and only option is to close
        //   the broadcaster altogether.
        this.setBroadcasterInactive();
        this.stoppedFlag = 1;
        this.forceHidePresenterAVFloat();
        this.reportActivePresenterAVResponse();
    } else if (eventName.startsWith("no")) {
        this.setBroadcasterInactive();
        this.stoppedFlag = 1;
        this.forceHidePresenterAVFloat();

        DefaultCommonDialog.showMessage("No Devices",
                "Suitable devices were not found. Please attach approripate devices and restart the broadcaster by clicking on the mike button next to your name.",
                new PopupListener() {
                    public void onPopupClosed(PopupPanel popup, boolean autoClosed) {
                        reportActivePresenterAVResponse();
                    }//  w  ww .  j  ava2s.c  o  m
                });
    } else if (eventName.startsWith("error")) {
        this.setBroadcasterInactive();
    }
}

From source file:org.gwtportlets.portlet.client.ui.TitlePanel.java

License:Open Source License

/**
 * Ask the user to select a new widget to replace whatever we currently
 * have./* www  .j a v a  2 s .c o m*/
 */
protected void showChooseWidgetDialog() {
    final SelectWidgetFactoryDialog dlg = new SelectWidgetFactoryDialog(getWidgetFactoryList());
    dlg.setText("Choose Widget");
    dlg.addPopupListener(new PopupListener() {
        public void onPopupClosed(PopupPanel sender, boolean autoClosed) {
            WidgetFactoryMetaData md = dlg.getSelectedWidgetFactory();
            if (md != null) {
                Widget w = md.createWidgetFactory().createWidget();
                replaceWidget(w);
            }
        }
    });
    dlg.center();
}

From source file:org.idwebmail.client.components.IdToolTip.java

/**
 * @param hideonclick/*from w  w  w . j av a2s . c o  m*/
 * @param message
 * @param x
 * @param y
 */
public IdToolTip(boolean hideonclick, String message, int x, int y) {
    super(true);
    this.hideOnClick = hideonclick;
    this.setPopupPosition(x, y);
    this.add(new Label(message));

    removeDelay = new Timer() {
        @Override
        public void run() {
            IdToolTip.this.setVisible(false);
            IdToolTip.this.hide();
        }
    };
    removeDelay.schedule(VISIBLE_DELAY);
    this.addPopupListener(new PopupListener() {
        @Override
        public void onPopupClosed(PopupPanel sender, boolean autoClosed) {
            removeDelay.cancel();
        }
    });
    this.setStyleName("id-toolTip");
    this.show();
}

From source file:org.idwebmail.client.components.IdToolTip.java

/**
 * @param hideonclick/* w  w  w .  j  av a  2s. co  m*/
 * @param w
 * @param x
 * @param y
 */
public IdToolTip(boolean hideonclick, Widget w, int x, int y) {
    super(true);
    this.hideOnClick = hideonclick;
    this.setPopupPosition(y, y);
    this.add(w);

    removeDelay = new Timer() {
        @Override
        public void run() {
            IdToolTip.this.setVisible(false);
            IdToolTip.this.hide();
        }
    };
    removeDelay.schedule(VISIBLE_DELAY);
    this.addPopupListener(new PopupListener() {
        @Override
        public void onPopupClosed(PopupPanel sender, boolean autoClosed) {
            removeDelay.cancel();
        }
    });
    this.setStyleName("id-toolTip");
    this.show();
}