Java 8 Popup - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 Popup class.

This code example shows how to use the following methods:show
            popup = PopupFactory.getSharedInstance().getPopup(
                    c, JCustomTooltip.this, point.x, point.y);
            Window w = SwingUtilities.getWindowAncestor(JCustomTooltip.this);
            w.addMouseListener(this);
            w.setFocusableWindowState(true);
            popup.show();
             
            showing = true;
        } 
 
        public void mouseEntered(MouseEvent e) {
//            Window ttip = SwingUtilities.getWindowAncestor(getParent()); 
//            ttip.removeMouseListener(this); 
//            if ( ttip == null || !ttip.isVisible() ) { 
//                return; 
//            } 
//            ttip.getLocation(point); 
//            ttip.hide(); 
//            getParent().remove(JCustomTooltip.this); 
//             
5
CodeRank
This code example shows how to use the following methods:show
						(getWidth() - image.getWidth())/2, 
						(getHeight() - image.getHeight())/2 );
				SwingUtilities.convertPointToScreen( location, ImagePanel.this );
				 
				popup = PopupFactory.getSharedInstance().getPopup( ImagePanel.this, label, location.x, location.y );
				popup.show();
			} 
		} 
		 
		@Override 
		public void mouseReleased( MouseEvent e ){
			if( popup != null ){
				popup.hide();
				popup = null;
			} 
		} 
	} 
} 
4
CodeRank
This code example shows how to use the following methods:show
			// popupFactory.setPopupType(PopupFactory.MEDIUM_WEIGHT_POPUP); 
			// } 
			tipWindow = popupFactory.getPopup(insideComponent, tip, location.x, location.y);
			// popupFactory.setPopupType(PopupFactory.LIGHT_WEIGHT_POPUP); 
 
			tipWindow.show();
 
			Window componentWindow = SwingUtilities.windowForComponent(insideComponent);
 
			window = SwingUtilities.windowForComponent(tip);
			if (window != null && window != componentWindow) {
				window.addMouseListener(this);
			} else { 
				window = null;
			} 
 
			insideTimer.start();
			tipShowing = true;
		} 
	} 
2
CodeRank
This code example shows how to use the following methods:show
            location.x = sBounds.x + Math.max(0, sBounds.width - size.width);
        } 
 
        PopupFactory popupFactory = PopupFactory.getSharedInstance();
        tipWindow = popupFactory.getPopup(component, tip, location.x, location.y);
        tipWindow.show();
        tipShowing = true;
    } 
 
    public void hideTooltip() { 
        if (tipWindow != null) {
            tipWindow.hide();
            tipWindow = null;
            tipShowing = false;
        } 
    } 
 
    /** 
     * Sets the title for this tooltip. 
     * 
3
CodeRank
This code example shows how to use the following methods:show
        collapseSideMenu(); 
        // Create a PopupFactory 
        PopupFactory popupFactory = PopupFactory.getSharedInstance();
        Point location = getLocationOnScreen();
        this.floatingPopup = popupFactory.getPopup(this, expandedComponent, location.x, location.y);
        this.floatingPopup.show();
        // get focus to expandedComponent 
        expandedComponent.requestFocus();
    } 
} 
2
CodeRank
This code example shows how to use the following methods:show
	@Override 
	public void show() { 
		if ((((JComponent) this.contents).getBorder() instanceof PopupBorder) || (((JComponent) this.contents).getBorder() instanceof ShadowedPopupMenuBorder)) {
			updatePics(); 
		} 
		this.popup.show();
	} 
 
	private void initPopup(Component owner, Component contents, int x, int y, Popup popup) {
		this.owner = owner;
		this.contents = contents;
		this.popup = popup;
		this.x = x;
		this.y = y;
 
		boolean mac = false;
		try { 
			mac = System.getProperty("os.name").toLowerCase().startsWith("mac");
		} catch (SecurityException e) {
			// do nothing 
3
CodeRank
This code example shows how to use the following methods:show
See Code Examples for Java 8 Popup Methods: