Lines 17-25
Link Here
|
17 |
import java.awt.event.KeyEvent; |
17 |
import java.awt.event.KeyEvent; |
18 |
import java.awt.event.ActionListener; |
18 |
import java.awt.event.ActionListener; |
19 |
import java.awt.event.ActionEvent; |
19 |
import java.awt.event.ActionEvent; |
20 |
import java.awt.event.FocusListener; |
|
|
21 |
import java.beans.PropertyChangeListener; |
22 |
import java.beans.VetoableChangeListener; |
23 |
import java.util.*; |
20 |
import java.util.*; |
24 |
import java.util.List; |
21 |
import java.util.List; |
25 |
import java.lang.reflect.*; |
22 |
import java.lang.reflect.*; |
Lines 35-47
Link Here
|
35 |
import javax.swing.Action; |
32 |
import javax.swing.Action; |
36 |
import javax.swing.JMenuItem; |
33 |
import javax.swing.JMenuItem; |
37 |
import javax.swing.KeyStroke; |
34 |
import javax.swing.KeyStroke; |
|
|
35 |
import javax.swing.SwingUtilities; |
38 |
import javax.swing.Timer; |
36 |
import javax.swing.Timer; |
39 |
import javax.swing.event.ChangeListener; |
|
|
40 |
import javax.swing.event.DocumentListener; |
41 |
|
37 |
|
42 |
|
38 |
|
43 |
import org.openide.ErrorManager; |
39 |
import org.openide.ErrorManager; |
44 |
import org.openide.util.ContextAwareAction; |
40 |
|
45 |
|
41 |
|
46 |
/** Otherwise uncategorized useful static methods. |
42 |
/** Otherwise uncategorized useful static methods. |
47 |
* |
43 |
* |
Lines 2520-2524
Link Here
|
2520 |
// not a file: URL |
2516 |
// not a file: URL |
2521 |
return null; |
2517 |
return null; |
2522 |
} |
2518 |
} |
|
|
2519 |
} |
2520 |
|
2521 |
public static void toFront( Component component ) { |
2522 |
Window parentWindow = SwingUtilities.getWindowAncestor( component ); |
2523 |
// be defensive, although w probably will always be non-null here |
2524 |
if( null != parentWindow ) { |
2525 |
if( parentWindow instanceof Frame ) { |
2526 |
Frame parentFrame = (Frame)parentWindow; |
2527 |
int state = parentFrame.getExtendedState(); |
2528 |
if( (state & Frame.ICONIFIED) > 0 ) |
2529 |
parentFrame.setExtendedState( state & ~Frame.ICONIFIED ); |
2530 |
} |
2531 |
parentWindow.toFront(); |
2532 |
} |
2523 |
} |
2533 |
} |
2524 |
} |
2534 |
} |