01: package test.check.command;
02:
03: import java.awt.Component;
04: import java.awt.Rectangle;
05:
06: /**
07: * A configure command that sets bounds for the specified component.
08: *
09: * @author Kirill Grouchnikov
10: */
11: public class SetBoundsCommand implements
12: ConfigurationCommand<Component> {
13: /**
14: * Component bounds to set.
15: */
16: private Rectangle bounds;
17:
18: /**
19: * Creates a new configuration command.
20: *
21: * @param bounds
22: * Component bounds to set.
23: */
24: public SetBoundsCommand(Rectangle bounds) {
25: this .bounds = bounds;
26: }
27:
28: /*
29: * (non-Javadoc)
30: *
31: * @see test.check.ConfigurationCommand#invoke(java.lang.Object)
32: */
33: public void configure(Component comp) {
34: comp.setBounds(this.bounds);
35: }
36: }
|