Creates a rectangle and adds it to the DisplayFrame.
()
| 34 | * Creates a rectangle and adds it to the DisplayFrame. |
| 35 | */ |
| 36 | public void calculate() { |
| 37 | // gets rectangle location |
| 38 | int left = control.getInt("xleft"); |
| 39 | int top = control.getInt("ytop"); |
| 40 | // gets rectangle dimensions |
| 41 | int width = control.getInt("width"); |
| 42 | int height = control.getInt("height"); |
| 43 | Drawable rectangle = new PixelRectangle(control, left, top, width, height); |
| 44 | frame.addDrawable(rectangle); |
| 45 | // frame is automatically rendered after Calculate button is pressed |
| 46 | } |
| 47 | |
| 48 | /** |
| 49 | * Resets the program to its initial state. |
no test coverage detected