01: package test.check.command;
02:
03: import java.awt.Component;
04: import java.beans.PropertyVetoException;
05:
06: import javax.swing.JInternalFrame;
07:
08: /**
09: * A configure command that minimizes internal frames.
10: *
11: * @author Kirill Grouchnikov
12: */
13: public class MinimizeInternalFrameCommand implements
14: ConfigurationCommand<Component> {
15: /*
16: * (non-Javadoc)
17: *
18: * @see test.check.ConfigurationCommand#invoke(java.lang.Object)
19: */
20: public void configure(Component ab) {
21: if (ab instanceof JInternalFrame) {
22: JInternalFrame jif = (JInternalFrame) ab;
23: try {
24: jif.setIcon(true);
25: } catch (PropertyVetoException pve) {
26: }
27: }
28: }
29: }
|