com.ice.util
Class JFCUtilities

java.lang.Object
  |
  +--com.ice.util.JFCUtilities

public class JFCUtilities
extends java.lang.Object

This is a class that contains useful utility functions related to the JFC (Swing).


Constructor Summary
JFCUtilities()
           
 
Method Summary
static java.awt.Point computePopupLocation(java.awt.event.MouseEvent event, java.awt.Component rel, javax.swing.JPopupMenu popup)
          Swing 1.0 and 1.1 have a horrible bug with respect to popup menus.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JFCUtilities

public JFCUtilities()
Method Detail

computePopupLocation

public static java.awt.Point computePopupLocation(java.awt.event.MouseEvent event,
                                                  java.awt.Component rel,
                                                  javax.swing.JPopupMenu popup)
Swing 1.0 and 1.1 have a horrible bug with respect to popup menus. Namely that they are not adjusted to be kept on-screen. Here, we ensure that the popup is properly located. This method will continue to work even after Sun fixes Swing... However, because there is a case where we estimate the size of the popup menu, one could make the argument to noop this method when the bug is finally fixed.



Copyright © 1997-2003, Timothy G. Endres, All Rights Reserved.