1 7 package com.sun.java.swing.plaf.nimbus; 8 9 import java.awt.*; 10 import javax.swing.*; 11 12 14 class InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState extends State { 15 InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState() { 16 super("WindowNotFocused"); 17 } 18 19 @Override protected boolean isInState(JComponent c) { 20 21 Component parent = c; 22 while (parent.getParent() != null) { 23 if (parent instanceof JInternalFrame) { 24 break; 25 } 26 parent = parent.getParent(); 27 } 28 if (parent instanceof JInternalFrame) { 29 return !(((JInternalFrame)parent).isSelected()); 30 } 31 return false; 32 } 33 } 34 35 | Popular Tags |