FileDocCategorySizeDatePackage
WindowsPopupWindow.javaAPI DocJava SE 5 API2476Fri Aug 26 14:54:50 BST 2005com.sun.java.swing.plaf.windows

WindowsPopupWindow

public class WindowsPopupWindow extends JWindow
A class which tags a window with a particular semantic usage, either tooltip, menu, sub-menu, popup-menu, or comobobox-popup. This is used as a temporary solution for getting native AWT support for transition effects in Windows 98 and Windows 2000. The native code will interpret the windowType property and automatically implement appropriate animation when the window is shown/hidden.

Note that support for transition effects may be supported with a different mechanism in the future and so this class is package-private and targeted for Swing implementation use only.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence.

version
1.5 12/19/03
author
Amy Fowler

Fields Summary
static final int
UNDEFINED_WINDOW_TYPE
static final int
TOOLTIP_WINDOW_TYPE
static final int
MENU_WINDOW_TYPE
static final int
SUBMENU_WINDOW_TYPE
static final int
POPUPMENU_WINDOW_TYPE
static final int
COMBOBOX_POPUP_WINDOW_TYPE
private int
windowType
Constructors Summary
WindowsPopupWindow(Window parent)


      
        super(parent);
        setFocusableWindowState(false);
    
Methods Summary
intgetWindowType()

	return windowType;
    
public voidhide()

        super.hide();
        /** We need to call removeNotify() here because hide() does
         * something only if Component.visible is true. When the app
         * frame is miniaturized, the parent frame of this frame is
         * invisible, causing AWT to believe that this frame
         *  is invisible and causing hide() to do nothing
         */
        removeNotify();
    
voidsetWindowType(int type)

        windowType = type;
    
public voidshow()

	super.show();
	this.pack();
    
public voidupdate(java.awt.Graphics g)

        paint(g);