/sdk/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/common/layout/grid/ |
D | GridModelTest.java | 47 TestNode targetNode = TestNode.create("android.widget.GridLayout").id("@+id/GridLayout1") in testReadModel1() local 50 GridModel model = GridModel.get(null, targetNode, null); in testReadModel1() 55 targetNode.add(TestNode.create(FQCN_BUTTON).id("@+id/Button1")); in testReadModel1() 56 targetNode.add(TestNode.create(FQCN_BUTTON).id("@+id/Button2")); in testReadModel1() 57 targetNode.add(TestNode.create(FQCN_BUTTON).id("@+id/Button3")); in testReadModel1() 58 targetNode.add(TestNode.create(FQCN_BUTTON).id("@+id/Button4")); in testReadModel1() 60 model = GridModel.get(null, targetNode, null); in testReadModel1() 67 TestNode targetNode = TestNode.create("android.widget.GridLayout").id("@+id/GridLayout1") in testSplitColumn() local 73 targetNode.add(b1); in testSplitColumn() 74 targetNode.add(b2); in testSplitColumn() [all …]
|
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/common/layout/relative/ |
D | DeletionHandlerTest.java | 67 TestNode targetNode = TestNode.createFromXml(xml); in testSimple() local 68 assertNotNull(targetNode); in testSimple() 70 TestNode button2 = TestNode.findById(targetNode, "@+id/button2"); in testSimple() 75 assertSame(layout, targetNode); in testSimple() 81 String updated = TestNode.toXml(targetNode); in testSimple() 199 TestNode targetNode = TestNode.createFromXml(xml); in testTransitive() local 200 assertNotNull(targetNode); in testTransitive() 201 TestNode button7 = TestNode.findById(targetNode, "@+id/button7"); in testTransitive() 202 TestNode checkBox = TestNode.findById(targetNode, "@+id/checkBox1"); in testTransitive() 207 assertSame(layout, targetNode); in testTransitive() [all …]
|
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/ |
D | ScrollViewRule.java | 69 public DropFeedback onDropMove(@NonNull INode targetNode, @NonNull IDragElement[] elements, in onDropMove() argument 71 DropFeedback f = super.onDropMove(targetNode, elements, feedback, p); in onDropMove() 74 if (targetNode.getChildren().length > 0) { in onDropMove() 83 INode targetNode, in drawFeedback() argument 86 if (targetNode.getChildren().length > 0) { in drawFeedback() 87 Rect b = targetNode.getBounds(); in drawFeedback() 93 super.drawFeedback(gc, targetNode, elements, feedback); in drawFeedback()
|
D | HorizontalScrollViewRule.java | 69 public DropFeedback onDropMove(@NonNull INode targetNode, @NonNull IDragElement[] elements, in onDropMove() argument 71 DropFeedback f = super.onDropMove(targetNode, elements, feedback, p); in onDropMove() 74 if (targetNode.getChildren().length > 0) { in onDropMove() 83 INode targetNode, in drawFeedback() argument 86 if (targetNode.getChildren().length > 0) { in drawFeedback() 87 Rect b = targetNode.getBounds(); in drawFeedback() 93 super.drawFeedback(gc, targetNode, elements, feedback); in drawFeedback()
|
D | FrameLayoutRule.java | 55 public DropFeedback onDropEnter(@NonNull INode targetNode, @Nullable Object targetView, in onDropEnter() argument 72 INode targetNode, 75 Rect b = targetNode.getBounds(); 119 public DropFeedback onDropMove(@NonNull INode targetNode, @NonNull IDragElement[] elements, 127 public void onDropLeave(@NonNull INode targetNode, @NonNull IDragElement[] elements, 133 public void onDropped(final @NonNull INode targetNode, final @NonNull IDragElement[] elements, 135 Rect b = targetNode.getBounds(); 142 final Map<String, Pair<String, String>> idMap = getDropIdMap(targetNode, elements, 145 targetNode.editXml("Add elements to FrameLayout", new INodeHandler() { 154 INode newChild = targetNode.appendChild(fqcn);
|
D | AbsoluteLayoutRule.java | 61 public DropFeedback onDropEnter(@NonNull INode targetNode, @Nullable Object targetView, in onDropEnter() argument 83 INode targetNode, in drawFeedback() argument 86 Rect b = targetNode.getBounds(); in drawFeedback() 134 public DropFeedback onDropMove(@NonNull INode targetNode, @NonNull IDragElement[] elements, in onDropMove() argument 144 public void onDropLeave(@NonNull INode targetNode, @NonNull IDragElement[] elements, in onDropLeave() argument 150 public void onDropped(final @NonNull INode targetNode, final @NonNull IDragElement[] elements, in onDropped() argument 153 final Rect b = targetNode.getBounds(); in onDropped() 160 final Map<String, Pair<String, String>> idMap = getDropIdMap(targetNode, elements, in onDropped() 163 targetNode.editXml("Add elements to AbsoluteLayout", new INodeHandler() { in onDropped() 174 INode newChild = targetNode.appendChild(fqcn); in onDropped()
|
D | PropertyCallback.java | 71 for (INode targetNode : nodes) { in action() 73 targetNode.setAttribute(mUri, mAttribute, valueId); in action() 76 targetNode.setAttribute(mUri, mAttribute, Boolean.toString(newValue)); in action()
|
D | AdapterViewRule.java | 32 public DropFeedback onDropEnter(@NonNull INode targetNode, @Nullable Object targetView, in onDropEnter() argument 47 String fqcn = targetNode.getFqcn(); in onDropEnter() 57 public DropFeedback onDropMove(@NonNull INode targetNode, @NonNull IDragElement[] elements, in onDropMove() argument
|
D | GridLayoutRule.java | 283 public DropFeedback onDropEnter(@NonNull INode targetNode, @Nullable Object targetView, in onDropEnter() argument 285 GridDropHandler userData = new GridDropHandler(this, targetNode, targetView); in onDropEnter() 291 public DropFeedback onDropMove(@NonNull INode targetNode, @NonNull IDragElement[] elements, in onDropMove() argument 305 public void onDropped(final @NonNull INode targetNode, final @NonNull IDragElement[] elements, in onDropped() argument 311 Rect b = targetNode.getBounds(); in onDropped() 323 Map<String, Pair<String, String>> idMap = getDropIdMap(targetNode, elements, in onDropped() 329 newChild = dropHandler.handleFreeFormDrop(targetNode, element); in onDropped() 331 newChild = dropHandler.handleGridModeDrop(targetNode, element); in onDropped() 635 @NonNull INode targetNode, in onPaste() 638 DropFeedback feedback = onDropEnter(targetNode, targetView, elements); in onPaste() [all …]
|
D | RelativeLayoutRule.java | 150 public DropFeedback onDropEnter(@NonNull INode targetNode, @Nullable Object targetView, in onDropEnter() argument 152 return new DropFeedback(new MoveHandler(targetNode, elements, mRulesEngine), in onDropEnter() 157 public DropFeedback onDropMove(@NonNull INode targetNode, @NonNull IDragElement[] elements, in onDropMove() argument 175 public void onDropLeave(@NonNull INode targetNode, @NonNull IDragElement[] elements, in onDropLeave() argument 180 public void onDropped(final @NonNull INode targetNode, final @NonNull IDragElement[] elements, in onDropped() argument 188 final Map<String, Pair<String, String>> idMap = getDropIdMap(targetNode, elements, in onDropped() 191 targetNode.editXml("Dropped", new INodeHandler() { in onDropped() 210 INode newChild = targetNode.insertChildAt(fqcn, index); in onDropped()
|
D | BaseLayoutRule.java | 256 public void onPaste(@NonNull INode targetNode, @Nullable Object targetView, in onPaste() argument 258 DropFeedback feedback = onDropEnter(targetNode, targetView, elements); in onPaste() 260 Point p = targetNode.getBounds().getTopLeft(); in onPaste() 261 feedback = onDropMove(targetNode, elements, feedback, p); in onPaste() 263 onDropLeave(targetNode, elements, feedback); in onPaste() 264 onDropped(targetNode, elements, feedback, p); in onPaste() 282 public void onPasteBeforeChild(INode parentNode, Object parentView, INode targetNode, in onPasteBeforeChild() argument 287 Point targetP = targetNode.getBounds().getTopLeft(); in onPasteBeforeChild() 333 protected static Map<String, Pair<String, String>> getDropIdMap(INode targetNode, in getDropIdMap() argument 340 idMap = remapIds(targetNode, idMap); in getDropIdMap() [all …]
|
D | IgnoredLayoutRule.java | 37 public DropFeedback onDropEnter(@NonNull INode targetNode, @Nullable Object targetView, in onDropEnter() argument
|
D | LinearLayoutRule.java | 278 public DropFeedback onDropEnter(final @NonNull INode targetNode, @Nullable Object targetView, in onDropEnter() argument 285 Rect bn = targetNode.getBounds(); in onDropEnter() 290 boolean isVertical = isVertical(targetNode); in onDropEnter() 300 for (INode it : targetNode.getChildren()) { in onDropEnter() 353 int posCount = targetNode.getChildren().length + 1; in onDropEnter() 480 public DropFeedback onDropMove(@NonNull INode targetNode, @NonNull IDragElement[] elements, 482 Rect b = targetNode.getBounds(); 546 public void onDropLeave(@NonNull INode targetNode, @NonNull IDragElement[] elements, 552 public void onDropped(final @NonNull INode targetNode, final @NonNull IDragElement[] elements, 557 insertAt(targetNode, elements, feedback.isCopy || !feedback.sameCanvas, initialInsertPos);
|
D | BaseViewRule.java | 892 public void onPaste(@NonNull INode targetNode, @Nullable Object targetView, in onPaste() argument 895 INode parent = targetNode.getParent(); in onPaste() 901 ((BaseLayoutRule) parentRule).onPasteBeforeChild(parent, targetView, targetNode, in onPaste()
|
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/common/layout/ |
D | LayoutTestBase.java | 68 protected INode dragInto(IViewRule rule, INode targetNode, Rect dragBounds, Point dropPoint, in dragInto() argument 72 String draggedButtonId = (currentIndex == -1) ? "@+id/DraggedButton" : targetNode in dragInto() 79 DropFeedback feedback = rule.onDropEnter(targetNode, null/*targetView*/, elements); in dragInto() 89 feedback = rule.onDropMove(targetNode, elements, feedback, dropPoint); in dragInto() 93 feedback = rule.onDropMove(targetNode, elements, feedback, secondDropPoint); in dragInto() 106 feedback.painter.paint(graphics, targetNode, feedback); in dragInto() 126 int childrenCountBefore = targetNode.getChildren().length; in dragInto() 127 rule.onDropped(targetNode, elements, feedback, dropPoint); in dragInto() 131 assertEquals(childrenCountBefore+1, targetNode.getChildren().length); in dragInto() 134 ((TestNode) targetNode).removeChild(currentIndex); in dragInto() [all …]
|
D | LinearLayoutRuleTest.java | 51 INode targetNode = TestNode.create("android.widget.LinearLayout").id( in dragIntoEmpty() local 59 DropFeedback feedback = rule.onDropEnter(targetNode, null/*targetView*/, elements); in dragIntoEmpty() 64 feedback = rule.onDropMove(targetNode, elements, feedback, dropPoint); in dragIntoEmpty() 71 feedback.painter.paint(graphics, targetNode, feedback); in dragIntoEmpty() 96 assertEquals(0, targetNode.getChildren().length); in dragIntoEmpty() 97 rule.onDropped(targetNode, elements, feedback, dropPoint); in dragIntoEmpty() 98 assertEquals(1, targetNode.getChildren().length); in dragIntoEmpty() 99 assertEquals("@+id/Button01", targetNode.getChildren()[0].getStringAttr( in dragIntoEmpty()
|
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gre/ |
D | RulesEngine.java | 287 public DropFeedback callOnDropEnter(NodeProxy targetNode, in callOnDropEnter() argument 290 IViewRule rule = loadRule(targetNode.getNode()); in callOnDropEnter() 294 return rule.onDropEnter(targetNode, targetView, elements); in callOnDropEnter() 311 public DropFeedback callOnDropMove(NodeProxy targetNode, in callOnDropMove() argument 316 IViewRule rule = loadRule(targetNode.getNode()); in callOnDropMove() 320 return rule.onDropMove(targetNode, elements, feedback, where); in callOnDropMove() 335 public void callOnDropLeave(NodeProxy targetNode, in callOnDropLeave() argument 339 IViewRule rule = loadRule(targetNode.getNode()); in callOnDropLeave() 343 rule.onDropLeave(targetNode, elements, feedback); in callOnDropLeave() 356 public void callOnDropped(NodeProxy targetNode, in callOnDropped() argument [all …]
|
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ |
D | OutlineDropListener.java | 114 final NodeProxy targetNode = canvas.getNodeFactory().create(parentNode); in performDrop() local 119 for (INode node : targetNode.getChildren()) { in performDrop() 123 String label = MoveGesture.computeUndoLabel(targetNode, elements, event.detail); in performDrop() 128 InsertType insertType = MoveGesture.getInsertType(event, targetNode); in performDrop() 133 BaseLayoutRule.insertAt(targetNode, elements, createNew, indexFinal); in performDrop() 134 targetNode.applyPendingChanges(); in performDrop() 146 for (INode node : targetNode.getChildren()) { in performDrop()
|
D | MoveGesture.java | 495 public static String computeUndoLabel(NodeProxy targetNode, in computeUndoLabel() argument 510 String where = getSimpleName(targetNode.getFqcn()); in computeUndoLabel() 676 NodeProxy targetNode = null; in processDropEvent() local 681 targetNode = mCanvas.getNodeFactory().create(targetVi); in processDropEvent() 682 df = mCanvas.getRulesEngine().callOnDropEnter(targetNode, in processDropEvent() 694 df = mCanvas.getRulesEngine().callOnDropMove(targetNode, in processDropEvent() 716 targetNode, mCurrentDragElements, df); in processDropEvent() 718 targetNode = null; in processDropEvent() 730 } else if (targetNode != mTargetNode) { in processDropEvent() 736 mTargetNode = targetNode; in processDropEvent()
|
D | OutlinePage.java | 1153 final NodeProxy targetNode = canvas.getNodeFactory().create(parentNode); in move() local 1158 for (INode node : targetNode.getChildren()) { in move() 1162 String label = MoveGesture.computeUndoLabel(targetNode, in move() 1168 if (dragSelection.get(0).getNode().getParent() == targetNode) { in move() 1173 BaseLayoutRule.insertAt(targetNode, elements, false, index); in move() 1174 targetNode.applyPendingChanges(); in move() 1182 for (INode node : targetNode.getChildren()) { in move()
|
D | ClipboardSupport.java | 289 final NodeProxy targetNode = mCanvas.getNodeFactory().create(target); in pasteSelection() local 294 NodeProxy node = engine.callOnPaste(targetNode, target.getViewObject(), pasted); in pasteSelection()
|
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/relative/ |
D | ConstraintPainter.java | 91 INode targetNode = target.node; in paintConstraint() local 92 if (sourceNode == targetNode) { in paintConstraint() 98 Rect targetBounds = targetNode.getBounds(); in paintConstraint() 99 paintConstraint(graphics, constraint.type, sourceNode, sourceBounds, targetNode, in paintConstraint() 184 Rect sourceBounds, INode targetNode, Rect targetBounds, in paintConstraint() argument 208 if (paintCornerConstraint(graphics, type, sourceNode, sourceBounds, targetNode, in paintConstraint() 216 paintVerticalConstraint(graphics, type, sourceNode, sourceBounds, targetNode, in paintConstraint() 223 paintHorizontalConstraint(graphics, type, sourceNode, sourceBounds, targetNode, in paintConstraint() 278 INode sourceNode, Rect sourceBounds, INode targetNode, Rect targetBounds, in paintCornerConstraint() argument 304 constraint.to.node == targetNode && constraint.from.node == sourceNode) { in paintCornerConstraint() [all …]
|
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/grid/ |
D | GridDropHandler.java | 467 public INode handleFreeFormDrop(INode targetNode, IDragElement element) { in handleFreeFormDrop() argument 479 if (targetNode.getChildren().length == 0) { in handleFreeFormDrop() 535 mGrid.setGridAttribute(targetNode, ATTR_COLUMN_COUNT, 2); in handleFreeFormDrop() 686 newChild = targetNode.appendChild(fqcn); in handleFreeFormDrop() 690 newChild = targetNode.insertChildAt(fqcn, index); in handleFreeFormDrop() 766 public INode handleGridModeDrop(INode targetNode, IDragElement element) { in handleGridModeDrop() argument 768 INode newChild = targetNode.appendChild(fqcn); in handleGridModeDrop()
|
/sdk/hierarchyviewer/src/com/android/hierarchyviewer/scene/ |
D | ViewHierarchyScene.java | 136 … protected void attachEdgeTargetAnchor(String edge, ViewNode oldTargetNode, ViewNode targetNode) { in attachEdgeTargetAnchor() argument 138 final Widget target = findWidget(targetNode); in attachEdgeTargetAnchor()
|