Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- Manages modifications to rectangle objects
- */
- import java.awt.Rectangle;
- public class RectangleManager implements Adjuster
- {
- RectangleManager(){}
- public Object adjustDimensions(Object o, int w, int h)
- {
- int width = (int)((Rectangle)(o)).getWidth();
- int height = (int)((Rectangle)(o)).getHeight();
- return new Rectangle(width + w, height + h);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment