Ejemplo n.º 1
0
    /**
     * Returns a medium 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 getMediumWeightPopup(Component owner, Component contents, int ownerX, int ownerY) {
      MediumWeightPopup popup = getRecycledMediumWeightPopup();

      if (popup == null) {
        popup = new MediumWeightPopup();
      }
      popup.reset(owner, contents, ownerX, ownerY);
      if (!popup.fitsOnScreen() || popup.overlappedByOwnedWindow()) {
        popup.hide();
        return null;
      }
      return popup;
    }
Ejemplo n.º 2
0
 /** Creates a medium weight popup. */
 private Popup getMediumWeightPopup(Component owner, Component contents, int ownerX, int ownerY) {
   return MediumWeightPopup.getMediumWeightPopup(
       owner, contents,
       ownerX, ownerY);
 }