/** * Returns a light weight <code>Popup</code> implementation. If the <code>Popup</code> needs * more space that in available in <code>owner</code>, this will return null. */ static Popup getLightWeightPopup(Component owner, Component contents, int ownerX, int ownerY) { LightWeightPopup popup = getRecycledLightWeightPopup(); if (popup == null) { popup = new LightWeightPopup(); } popup.reset(owner, contents, ownerX, ownerY); if (!popup.fitsOnScreen() || popup.overlappedByOwnedWindow()) { popup.hide(); return null; } return popup; }
/** Creates a light weight popup. */ private Popup getLightWeightPopup(Component owner, Component contents, int ownerX, int ownerY) { return LightWeightPopup.getLightWeightPopup(owner, contents, ownerX, ownerY); }