Changeset 10405 in josm for trunk/test/unit
- Timestamp:
- 2016-06-16T19:14:33+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/NavigatableComponentTest.java
r10402 r10405 9 9 import java.awt.geom.Point2D; 10 10 11 import javax.swing.J Frame;11 import javax.swing.JPanel; 12 12 13 13 import org.CustomMatchers; … … 32 32 public class NavigatableComponentTest { 33 33 34 private final class NavigatableComponentMock extends NavigatableComponent { 35 @Override 36 public Point getLocationOnScreen() { 37 return new Point(30, 40); 38 } 39 40 @Override 41 protected boolean isVisibleOnScreen() { 42 return true; 43 } 44 } 45 34 46 private static final int HEIGHT = 200; 35 47 private static final int WIDTH = 300; … … 48 60 @Before 49 61 public void setUp() { 50 component = new NavigatableComponent() { 51 @Override 52 public Point getLocationOnScreen() { 53 return new Point(30, 40); 54 } 55 }; 62 component = new NavigatableComponentMock(); 56 63 component.setBounds(new Rectangle(WIDTH, HEIGHT)); 57 64 // wait for the event to be propagated. … … 62 69 }); 63 70 component.setVisible(true); 64 J Frame window = new JFrame();65 window.add(component);71 JPanel parent = new JPanel(); 72 parent.add(component); 66 73 component.updateLocationState(); 67 74 }
Note:
See TracChangeset
for help on using the changeset viewer.