Example #1
0
 @Inject
 public DisplayHelpPopup(EventBus eventBus) {
   super(eventBus);
   widget = binder.createAndBindUi(this);
   widget.setWidth("600px");
   widget.setHeight("400px");
 }
Example #2
0
  /** Show lightbox */
  public void show() {
    int w = getWidth();
    int h = getHeight();

    background.setWidth(Integer.toString(w));
    background.setHeight(Integer.toString(h));
    if (GWT.isScript()) {
      background.setWidget(png = new PNGImage("images/lightbox.png", w, h));
    }
    background.setPopupPosition(0, 0);
    hideSelects();

    background.show();
    backgroundFixup(background.getElement());

    /**
     * Using setPopupPositionAndShow so child popup will not jump when centering
     *
     * @author Luis Faria
     */
    child.setPopupPositionAndShow(
        new PositionCallback() {

          public void setPosition(int offsetWidth, int offsetHeight) {
            center(offsetWidth, offsetHeight);
          }
        });
  }
Example #3
0
  private void openPanel() {

    if (isEnabled) {
      popup.setWidth((header.getOffsetWidth() - 10) + "px");
      popup.setHeight((cellList.getRowCount() * 25) + "px");

      popup.setPopupPosition(header.getAbsoluteLeft(), header.getAbsoluteTop() + 22);

      popup.show();
    }
  }
  private void openPanel() {

    int winWidth = popupWidth != -1 ? popupWidth : header.getOffsetWidth() * 2;
    int winHeight = (int) (winWidth / GOLDEN_RATIO);

    popup.setWidth(winWidth + "px");
    popup.setHeight(winHeight + "px");

    // right to left
    if (isRightToLeft) {
      int popupLeft = header.getAbsoluteLeft() - (winWidth - header.getOffsetWidth());
      popup.setPopupPosition(popupLeft - 15, header.getAbsoluteTop() + 21);
    } else {
      int popupLeft = header.getAbsoluteLeft();
      popup.setPopupPosition(popupLeft, header.getAbsoluteTop() + 21);
    }

    popup.show();
  }
Example #5
0
  @Override
  public void go(final HasWidgets container) {
    if (m_addGraphView == null) {
      m_addGraphView = new KscAddGraphViewImpl();
      m_addGraphView.setTitle(m_graphInfo.getTitle() == null ? "" : m_graphInfo.getTitle());
    }

    if (m_popupPanel == null) {
      m_popupPanel = new PopupPanel();
      m_popupPanel.setWidth("300px");
      m_popupPanel.setHeight("79px");
      m_popupPanel.add(m_addGraphView);
      m_popupPanel.setAutoHideEnabled(true);
      m_popupPanel.setAnimationEnabled(false);
      m_popupPanel.setModal(false);
      m_popupPanel.setVisible(false);
      m_popupPanel.hide();
    }

    new KscAddGraphPresenter(m_popupPanel, m_addGraphView, m_reports, m_graphInfo).go(container);
  }
Example #6
0
    private void loadNewImage(final PhotoModel photoModel, final int nextIdx) {

      imagePopup.clear();
      imagePopup.setHeight(photoModel.getHeight() + "px");
      imagePopup.setWidth(photoModel.getWidth() + "px");
      Image fullImage = new Image(photoModel.getURL());
      imagePopup.setWidget(fullImage);

      if (currIdx > 0) {
        ImageMouseDownHandler mouseDownHandler = new ImageMouseDownHandler();
        mouseDownHandler.setPhotoModelList(photoModelList);
        mouseDownHandler.setImagePopup(imagePopup);
        mouseDownHandler.setCurrIdx(nextIdx);
        mouseDownHandler.setFullImage(fullImage);
        fullImage.addMouseDownHandler(mouseDownHandler);

        ImageMouseMoveHandler mouseMoveHandler = new ImageMouseMoveHandler();
        mouseMoveHandler.setFullImage(fullImage);
        fullImage.addMouseMoveHandler(mouseMoveHandler);
      }

      getImagePopup().center();
    }