1 7 package com.sun.java.swing.plaf.windows; 8 9 import javax.swing.JWindow ; 10 import java.awt.Window ; 11 import java.awt.Graphics ; 12 13 35 class WindowsPopupWindow extends JWindow { 36 37 static final int UNDEFINED_WINDOW_TYPE = 0; 38 static final int TOOLTIP_WINDOW_TYPE = 1; 39 static final int MENU_WINDOW_TYPE = 2; 40 static final int SUBMENU_WINDOW_TYPE = 3; 41 static final int POPUPMENU_WINDOW_TYPE = 4; 42 static final int COMBOBOX_POPUP_WINDOW_TYPE = 5; 43 44 private int windowType; 45 46 WindowsPopupWindow(Window parent) { 47 super(parent); 48 setFocusableWindowState(false); 49 } 50 51 void setWindowType(int type) { 52 windowType = type; 53 } 54 55 int getWindowType() { 56 return windowType; 57 } 58 59 public void update(Graphics g) { 60 paint(g); 61 } 62 63 public void hide() { 64 super.hide(); 65 71 removeNotify(); 72 } 73 74 public void show() { 75 super.show(); 76 this.pack(); 77 } 78 } 79 | Popular Tags |