use of com.android.tools.idea.uibuilder.graphics.NlGraphics in project android by JetBrains.
the class PreferenceScreenDragHandlerTest method drawDropZoneLinesPointerIsBetweenSecondAndThirdChildren.
@Test
public void drawDropZoneLinesPointerIsBetweenSecondAndThirdChildren() {
PreferenceGroupDragHandler handler = newPreferenceScreenDragHandler(newPreferenceScreen());
NlGraphics graphics = Mockito.mock(NlGraphics.class);
handler.update(360, 606, 0);
handler.drawDropZoneLines(graphics);
List<NlComponent> preferences = handler.myGroup.getChildren();
Mockito.verify(graphics).drawTop(preferences.get(0));
Mockito.verify(graphics).drawTop(preferences.get(1));
}
use of com.android.tools.idea.uibuilder.graphics.NlGraphics in project android by JetBrains.
the class PreferenceScreenDragHandlerTest method drawDropRecipientLines.
@Test
public void drawDropRecipientLines() {
PreferenceGroupDragHandler handler = newPreferenceScreenDragHandler(newPreferenceScreen());
NlGraphics graphics = Mockito.mock(NlGraphics.class);
handler.update(360, 502, 0);
handler.drawDropRecipientLines(graphics);
Rectangle bounds = new Rectangle(0, 332, 768, 379);
Mockito.verify(graphics).drawTop(bounds);
Mockito.verify(graphics).drawLeft(bounds);
Mockito.verify(graphics).drawRight(bounds);
Mockito.verify(graphics).drawBottom(bounds);
}
use of com.android.tools.idea.uibuilder.graphics.NlGraphics in project android by JetBrains.
the class PreferenceScreenDragHandlerTest method drawDropZoneLinesPointerIsBetweenFirstAndSecondChildren.
@Test
public void drawDropZoneLinesPointerIsBetweenFirstAndSecondChildren() {
PreferenceGroupDragHandler handler = newPreferenceScreenDragHandler(newPreferenceScreen());
NlGraphics graphics = Mockito.mock(NlGraphics.class);
handler.update(360, 502, 0);
handler.drawDropZoneLines(graphics);
List<NlComponent> preferences = handler.myGroup.getChildren();
Mockito.verify(graphics).drawTop(preferences.get(0));
Mockito.verify(graphics).drawTop(preferences.get(2));
}
Aggregations