You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.1 KiB
52 lines
1.1 KiB
/*
|
|
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
|
|
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*/
|
|
package javax.swing.plaf.nimbus;
|
|
|
|
import java.awt.*;
|
|
import javax.swing.*;
|
|
|
|
|
|
class InternalFrameTitlePaneMenuButtonWindowNotFocusedState extends State {
|
|
InternalFrameTitlePaneMenuButtonWindowNotFocusedState() {
|
|
super("WindowNotFocused");
|
|
}
|
|
|
|
@Override protected boolean isInState(JComponent c) {
|
|
|
|
Component parent = c;
|
|
while (parent.getParent() != null) {
|
|
if (parent instanceof JInternalFrame) {
|
|
break;
|
|
}
|
|
parent = parent.getParent();
|
|
}
|
|
if (parent instanceof JInternalFrame) {
|
|
return !(((JInternalFrame)parent).isSelected());
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
|