Examples of Popup


Examples of javax.swing.Popup

        Dimension ownerDim = owner.getSize();
        Dimension layoutDim = layout.getPreferredSize();
        int x = ownerLoc.x + Math.max(0, ownerDim.width - layoutDim.width - 5);
        int y = ownerLoc.y + Math.max(0, ownerDim.height - layoutDim.height - 5);
        PopupFactory factory = PopupFactory.getSharedInstance();
        Popup popup = factory.getPopup(canvasPane.getViewport(), layout, x, y);
        popup.show();
        curPopup = popup;
        curPopupTime = System.currentTimeMillis();
    }
View Full Code Here

Examples of javax.swing.Popup

     *
     * @see Options#isPopupDropShadowActive()
     */
    public Popup getPopup(Component owner, Component contents, int x, int y)
            throws IllegalArgumentException {
        Popup popup = super.getPopup(owner, contents, x, y);
        return Options.isPopupDropShadowActive()
            ? ShadowPopup.getInstance(owner, contents, x, y, popup)
            : popup;
    }
View Full Code Here

Examples of javax.swing.Popup

   */
  public void hideLastPopup() {
    if (shownPath.size() == 0)
      return;
    PopupInfo last = shownPath.removeLast();
    Popup popup = popupPanels.get(last.popupPanel);
    popup.hide();
    popupPanels.remove(last.popupPanel);
    if (last.popupOriginator instanceof JCommandButton) {
      ((JCommandButton) last.popupOriginator).getPopupModel()
          .setPopupShowing(false);
    }
View Full Code Here

Examples of javax.swing.Popup

          // from the found popup panel
          while (shownPath.size() > 0) {
            if (shownPath.getLast().popupPanel == c)
              return;
            PopupInfo last = shownPath.removeLast();
            Popup popup = popupPanels.get(last.popupPanel);
            popup.hide();
            if (last.popupOriginator instanceof JCommandButton) {
              ((JCommandButton) last.popupOriginator)
                  .getPopupModel().setPopupShowing(false);
            }
            this.firePopupHidden(last.popupPanel,
                last.popupOriginator);
            popupPanels.remove(last.popupPanel);
          }
        }
        c = c.getParent();
      }
    }
    if (!foundAndDismissed || (comp == null)) {
      while (shownPath.size() > 0) {
        PopupInfo last = shownPath.removeLast();
        Popup popup = popupPanels.get(last.popupPanel);
        popup.hide();
        if (last.popupOriginator instanceof JCommandButton) {
          ((JCommandButton) last.popupOriginator).getPopupModel()
              .setPopupShowing(false);
        }
        this.firePopupHidden(last.popupPanel, last.popupOriginator);
View Full Code Here

Examples of javax.swing.Popup

                }

                // get the popup and show it
                popupPanel.setPreferredSize(new Dimension(
                    ribbon.getWidth(), prefHeight));
                Popup popup = PopupFactory.getSharedInstance()
                    .getPopup(taskToggleButton, popupPanel,
                        x, y);
                PopupPanelManager.PopupListener tracker = new PopupPanelManager.PopupListener() {
                  @Override
                  public void popupShown(PopupEvent event) {
View Full Code Here

Examples of javax.swing.Popup

                : (owner.isShowing()
                   ? owner.getLocationOnScreen() : owner.getLocation());
        final Window parent = owner != null
            ? SwingUtilities.getWindowAncestor(owner) : null;
        origin.translate(x, y);
        return new Popup() {
            private BubbleWindow w;
            public void show() {
                w = new BubbleWindow(parent, content);
                w.pack();
                Point where = new Point(origin);
View Full Code Here

Examples of javax.swing.Popup

         */
        private void popupHidePopup() {
            popupLabels = null;
            if(popup == null)
                return;
            final Popup staticPopup = popup;
            popup = null;
            EventQueue.invokeLater(new Runnable(){
               @Override
               public void run() {
                    staticPopup.hide();
                }});
        }
View Full Code Here

Examples of jfix.zk.Popup

  private void updateContent() {
    grid.getRows().getChildren().clear();
    for (Node node : JeaseSession.getFilter().apply(
        ((Node) tree.getSelectedValue()).getChildren())) {
      Button button = newNodeSelector(node);
      Popup popup = newNodePreview(node);
      if (popup != null) {
        button.setTooltip(popup);
        grid.add(button, popup);
      } else {
        grid.add(button);
View Full Code Here

Examples of jfix.zk.Popup

  }

  private Popup newNodePreview(Node node) {
    String id = node.getId();
    if (id.endsWith(".jpg") || id.endsWith(".png") || id.endsWith(".gif")) {
      return new Popup(new Image(node.getPath()));
    } else {
      return null;
    }
  }
View Full Code Here

Examples of net.mygwt.ui.client.widget.Popup

  private void createPopup() {
   
    if (popup == null) {
      final Menu fMenu = this;
      popup = new Popup(true) {
        protected boolean onAutoHide(Event event) {
          if (parentItem != null) {
            Element target = DOM.eventGetTarget(event);
            if (DOM.isOrHasChild(parentItem.getElement(), target)) {
              return false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.