use of com.intellij.designer.designSurface.FeedbackTreeLayer in project intellij-community by JetBrains.
the class TreeEditOperation method isTarget.
public static boolean isTarget(RadComponent container, OperationContext context) {
Point location = context.getLocation();
RadComponent target = context.getArea().findTarget(location.x, location.y, null);
if (target == container) {
FeedbackTreeLayer layer = context.getArea().getFeedbackTreeLayer();
return !layer.isBeforeLocation(target, location.x, location.y) && !layer.isAfterLocation(target, location.x, location.y);
}
return true;
}
use of com.intellij.designer.designSurface.FeedbackTreeLayer in project intellij-community by JetBrains.
the class TreeEditOperation method showFeedback.
@Override
public void showFeedback() {
Point location = myContext.getLocation();
FeedbackTreeLayer layer = myContext.getArea().getFeedbackTreeLayer();
myTarget = myContext.getArea().findTarget(location.x, location.y, null);
if (myContainer == myTarget) {
layer.mark(myTarget, FeedbackTreeLayer.INSERT_SELECTION);
} else if (myTarget != null && isChildren(myTarget)) {
myInsertBefore = layer.isBeforeLocation(myTarget, location.x, location.y);
layer.mark(myTarget, myInsertBefore ? FeedbackTreeLayer.INSERT_BEFORE : FeedbackTreeLayer.INSERT_AFTER);
} else {
myTarget = null;
eraseFeedback();
}
}
Aggregations