use of com.android.tools.idea.uibuilder.scene.target.AnchorTarget in project android by JetBrains.
the class SceneComponent method setExpandTargetArea.
public void setExpandTargetArea(boolean expandArea) {
int count = myTargets.size();
for (int i = 0; i < count; i++) {
Target target = myTargets.get(i);
if (target instanceof AnchorTarget) {
AnchorTarget anchor = (AnchorTarget) target;
anchor.setExpandSize(expandArea);
}
}
myScene.needsRebuildList();
}
use of com.android.tools.idea.uibuilder.scene.target.AnchorTarget in project android by JetBrains.
the class SceneMouseInteraction method mouseRelease.
/**
* Simulate releasing the mouse above the given anchor of the component
* with the given componentId
*
* @param componentId the id of the component we will release the mouse above
* @param type the type of anchor we need to be above
*/
public void mouseRelease(String componentId, AnchorTarget.Type type) {
SceneComponent component = myScene.getSceneComponent(componentId);
if (component != null) {
AnchorTarget target = component.getAnchorTarget(type);
float x = target.getCenterX();
float y = target.getCenterY();
mouseRelease(x, y);
}
}
use of com.android.tools.idea.uibuilder.scene.target.AnchorTarget in project android by JetBrains.
the class SceneMouseInteraction method mouseDown.
/**
* Simulate a click on a given anchor of the component with componentId
*
* @param componentId the id of the component we want to click on
* @param type the type of anchor we want to click on
*/
public void mouseDown(String componentId, AnchorTarget.Type type) {
SceneComponent component = myScene.getSceneComponent(componentId);
if (component != null) {
AnchorTarget target = component.getAnchorTarget(type);
mouseDown(target.getCenterX(), target.getCenterY());
}
}
Aggregations