Package javax.swing

Examples of javax.swing.PopupFactory$ContainerPopup


            desktop.removeAll();
            awtWindow.dispose();
            desktop = null;
            desktopsUsed--;
            if ( desktopsUsed == 0 ) {
                PopupFactory.setSharedInstance( new PopupFactory() );
            }
        }
    }
View Full Code Here


  @Override
  public void mouseEntered(MouseEvent arg0) {
    if (!popupShowing) {
      if (popup != null)
        popup.hide();
      PopupFactory factory = PopupFactory.getSharedInstance();
      int x = (int) this.getLocationOnScreen().getX() + (permanent.isTapped()?Config.dimensions.frameHeight:Config.dimensions.frameWidth);
      int y = (int) this.getLocationOnScreen().getY() + 40;
      popup = factory.getPopup(this, popupText, x, y);
      popup.show();
      //hack to get popup to resize to fit text
      popup.hide();
      popup = factory.getPopup(this, popupText, x, y);
      popup.show();
      popupShowing = true;
    }
  }
View Full Code Here

      DelayedViewerThread.getInstance().show((Component)data.popupText, 500);
    } catch (InterruptedException ie) {
      ie.printStackTrace();
    }*/
   
    PopupFactory factory = PopupFactory.getSharedInstance();
    popup = factory.getPopup(data.component, data.popupText, (int) data.locationOnScreen.getX() + data.popupOffsetX, (int) data.locationOnScreen.getY() + data.popupOffsetY + 40);
    popup.show();
    // hack to get popup to resize to fit text
    popup.hide();
    popup = factory.getPopup(data.component, data.popupText, (int) data.locationOnScreen.getX() + data.popupOffsetX, (int) data.locationOnScreen.getY() + data.popupOffsetY + 40);
    popup.show();
  }
View Full Code Here

  @Override
  public void mouseEntered(MouseEvent arg0) {
    if (!popupShowing) {
      if (popup != null)
        popup.hide();
      PopupFactory factory = PopupFactory.getSharedInstance();
      popup = factory.getPopup(this, popupText, (int) this.getLocationOnScreen().getX() + Config.dimensions.frameWidth, (int) this.getLocationOnScreen().getY() + 40);
      popup.show();
      //hack to get popup to resize to fit text
      popup.hide();
      popup = factory.getPopup(this, popupText, (int) this.getLocationOnScreen().getX() + Config.dimensions.frameWidth, (int) this.getLocationOnScreen().getY() + 40);
      popup.show();
      popupShowing = true;
     
      // Draw Arrows for targets
      List<UUID> targets = card.getTargets();
View Full Code Here

      // have to display once to get the correct size
      int width = findBox.getWidth();
      boolean needsRelocate = (width <= 0);
      int x = loggerOrigin.x + dim.width - width;
      int y = loggerOrigin.y + dim.height - findBox.getHeight();
      PopupFactory popupFactory = PopupFactory.getSharedInstance();
      // TODO(jat): need to track window resize?
      findPopup = popupFactory.getPopup(SwingLoggerPanel.this, findBox, x, y);
      findPopup.show();
      if (needsRelocate) {
        x = loggerOrigin.x + dim.width - findBox.getWidth();
        y = loggerOrigin.y + dim.height - findBox.getHeight();
        findPopup.hide();
        findPopup = popupFactory.getPopup(SwingLoggerPanel.this, findBox, x, y);
        findPopup.show();
      }
      searchField.requestFocusInWindow();
    }
View Full Code Here

        Point ownerLoc = owner.getLocationOnScreen();
        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

    public static void install() {
        if (LookUtils.IS_OS_MAC) {
            return;
        }

        PopupFactory factory = PopupFactory.getSharedInstance();
        if (factory instanceof ShadowPopupFactory)
            return;

        PopupFactory.setSharedInstance(new ShadowPopupFactory(factory));
    }
View Full Code Here

     * popup factory as the new shared popup factory.
     *
     * @see #install()
     */
    public static void uninstall() {
        PopupFactory factory = PopupFactory.getSharedInstance();
        if (!(factory instanceof ShadowPopupFactory))
            return;

        PopupFactory stored = ((ShadowPopupFactory) factory).storedFactory;
        PopupFactory.setSharedInstance(stored);
    }
View Full Code Here

    public void mouseEntered(MouseEvent arg0) {
        if (!popupShowing) {
            if (popup != null) {
                popup.hide();
            }
            PopupFactory factory = PopupFactory.getSharedInstance();
            int x = (int) this.getLocationOnScreen().getX() + (permanent.isTapped()?Config.dimensions.frameHeight:Config.dimensions.frameWidth);
            int y = (int) this.getLocationOnScreen().getY() + 40;
            popup = factory.getPopup(this, popupText, x, y);
            popup.show();
            //hack to get popup to resize to fit text
            popup.hide();
            popup = factory.getPopup(this, popupText, x, y);
            popup.show();
            popupShowing = true;
        }
    }
View Full Code Here

            }

           
        },view,clazz);

        PopupFactory factory = PopupFactory.getSharedInstance();
        int posInicial = 300;
        popup = factory.getPopup(container, selectorCliente, posInicial, posInicial);


        addHandlers();

    }
View Full Code Here

TOP

Related Classes of javax.swing.PopupFactory$ContainerPopup

Copyright © 2018 www.massapicom. 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.