Home
last modified time | relevance | path

Searched refs:node (Results 1 – 25 of 150) sorted by relevance

123456

/sdk/hierarchyviewer/src/com/android/hierarchyviewer/ui/
DCaptureRenderer.java25 private ViewNode node; field in CaptureRenderer
28 CaptureRenderer(ImageIcon icon, ViewNode node) { in CaptureRenderer() argument
30 this.node = node; in CaptureRenderer()
38 if (node.hasMargins) { in getPreferredSize()
39 d.width += node.marginLeft + node.marginRight; in getPreferredSize()
40 d.height += node.marginTop + node.marginBottom; in getPreferredSize()
65 if ((node.paddingBottom | node.paddingLeft | in paintComponent()
66 node.paddingTop | node.paddingRight) != 0) { in paintComponent()
68 g.drawRect(node.paddingLeft, node.paddingTop, in paintComponent()
69 width - node.paddingRight - node.paddingLeft, in paintComponent()
[all …]
DLayoutRenderer.java94 ViewNode node = (ViewNode) selection.iterator().next(); in paintComponent() local
97 ViewNode p = node.parent; in paintComponent()
102 if (showExtras && node.image != null) { in paintComponent()
103 s.drawImage(node.image, node.left, node.top, null); in paintComponent()
105 s.drawRect(node.left, node.top, node.width - 1, node.height - 1); in paintComponent()
114 for (ViewNode node : root.children) { in drawChildren()
115 if (!node.willNotDraw) { in drawChildren()
116 g.drawRect(node.left, node.top, node.width - 1, node.height - 1); in drawChildren()
119 if (node.children.size() > 0) { in drawChildren()
120 drawChildren(g, node, in drawChildren()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/
DEditTextRule.java40 public void onCreate(@NonNull INode node, @NonNull INode parent, in onCreate() argument
42 super.onCreate(node, parent, insertType); in onCreate()
48 node.appendChild(REQUEST_FOCUS); in onCreate()
52 node.setAttribute(ANDROID_URI, ATTR_EMS, "10"); //$NON-NLS-1$ in onCreate()
79 public void handle(@NonNull INode node) { in addContextMenuActions()
80 INode focus = findFocus(findRoot(node)); in addContextMenuActions()
85 node.appendChild(REQUEST_FOCUS); in addContextMenuActions()
98 private static boolean hasFocus(INode node) { in hasFocus() argument
99 INode focus = findFocus(node); in hasFocus()
101 return focus.getParent() == node; in hasFocus()
[all …]
DSlidingDrawerRule.java40 public void onCreate(@NonNull INode node, @NonNull INode parent, in onCreate() argument
42 super.onCreate(node, parent, insertType); in onCreate()
46 node.setAttribute(ANDROID_URI, ATTR_LAYOUT_WIDTH, matchParent); in onCreate()
47 node.setAttribute(ANDROID_URI, ATTR_LAYOUT_HEIGHT, matchParent); in onCreate()
53 node.setAttribute(ANDROID_URI, ATTR_HANDLE, handleId); in onCreate()
54 node.setAttribute(ANDROID_URI, ATTR_CONTENT, contentId); in onCreate()
57 INode handle = node.appendChild(SdkConstants.FQCN_BUTTON); in onCreate()
62 INode content = node.appendChild(SdkConstants.FQCN_LINEAR_LAYOUT); in onCreate()
DRelativeLayoutRule.java241 public void onChildInserted(@NonNull INode node, @NonNull INode parent, in onChildInserted() argument
369 private void centerHorizontally(INode node) { in centerHorizontally() argument
371 node.setAttribute(ANDROID_URI, ATTR_LAYOUT_ALIGN_PARENT_LEFT, null); in centerHorizontally()
372 node.setAttribute(ANDROID_URI, ATTR_LAYOUT_ALIGN_LEFT, null); in centerHorizontally()
373 node.setAttribute(ANDROID_URI, ATTR_LAYOUT_TO_RIGHT_OF, null); in centerHorizontally()
374 node.setAttribute(ANDROID_URI, ATTR_LAYOUT_CENTER_HORIZONTAL, null); in centerHorizontally()
375 node.setAttribute(ANDROID_URI, ATTR_LAYOUT_ALIGN_PARENT_RIGHT, null); in centerHorizontally()
376 node.setAttribute(ANDROID_URI, ATTR_LAYOUT_ALIGN_RIGHT, null); in centerHorizontally()
377 node.setAttribute(ANDROID_URI, ATTR_LAYOUT_TO_LEFT_OF, null); in centerHorizontally()
378 node.setAttribute(ANDROID_URI, ATTR_LAYOUT_CENTER_HORIZONTAL, null); in centerHorizontally()
[all …]
DImageViewRule.java33 public void onCreate(@NonNull INode node, @NonNull INode parent, in onCreate() argument
35 super.onCreate(node, parent, insertType); in onCreate()
41 node.editXml("Set Image", in onCreate()
47 parent.removeChild(node); in onCreate()
53 node.setAttribute(ANDROID_URI, ATTR_SRC, getSampleImageSrc()); in onCreate()
DGridViewRule.java34 public void onCreate(@NonNull INode node, @NonNull INode parent, in onCreate() argument
36 super.onCreate(node, parent, insertType); in onCreate()
38 node.setAttribute(ANDROID_URI, ATTR_LAYOUT_WIDTH, getFillParentValueName()); in onCreate()
39 node.setAttribute(ANDROID_URI, ATTR_NUM_COLUMNS, "3"); //$NON-NLS-1$ in onCreate()
DCalendarViewRule.java34 public void onCreate(@NonNull INode node, @NonNull INode parent, in onCreate() argument
36 super.onCreate(node, parent, insertType); in onCreate()
41 node.setAttribute(ANDROID_URI, ATTR_LAYOUT_WIDTH, getFillParentValueName()); in onCreate()
42 node.setAttribute(ANDROID_URI, ATTR_LAYOUT_HEIGHT, getFillParentValueName()); in onCreate()
DWebViewRule.java36 public void onCreate(@NonNull INode node, @NonNull INode parent, in onCreate() argument
38 super.onCreate(node, parent, insertType); in onCreate()
42 node.setAttribute(ANDROID_URI, ATTR_LAYOUT_WIDTH, matchParent); in onCreate()
43 node.setAttribute(ANDROID_URI, ATTR_LAYOUT_HEIGHT, matchParent); in onCreate()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/
DDomUtilities.java101 public static List<Element> getAllElements(@NonNull Node node) { in getAllElements() argument
103 addElements(node, elements); in getAllElements()
107 private static void addElements(@NonNull Node node, @NonNull List<Element> elements) { in addElements() argument
108 if (node instanceof Element) { in addElements()
109 elements.add((Element) node); in addElements()
112 NodeList childNodes = node.getChildNodes(); in addElements()
125 public static int getDepth(@NonNull Node node) { in getDepth() argument
127 while (node != null) { in getDepth()
129 node = node.getParentNode(); in getDepth()
141 public static boolean hasElementChildren(@NonNull Node node) { in hasElementChildren() argument
[all …]
DSelectionOverlay.java88 NodeProxy node = s.getNode(); in paint() local
89 if (node != null) { in paint()
91 selectedNodes.add(node); in paint()
107 NodeProxy node = selections.get(0).getNode(); in paint() local
108 if (node != null) { in paint()
109 paintHints(gcWrapper, node, rulesEngine); in paint()
123 private void paintHints(GCWrapper gcWrapper, NodeProxy node, RulesEngine rulesEngine) { in paintHints() argument
124 INode parent = node.getParent(); in paintHints()
127 List<String> infos = rulesEngine.callGetSelectionHint(parentNode, node); in paintHints()
163 for (INode node : nodes) { in paintSelectionFeedback()
[all …]
DLintTooltip.java59 for (UiViewElementNode node : mNodes) { in createContents()
60 IMarker marker = delegate.getIssueForNode(node); in createContents()
67 icon.setImage(node.getIcon()); in createContents()
75 String id = BaseLayoutRule.stripIdPrefix(node.getAttributeValue(ATTR_ID)); in createContents()
77 if (node.getXmlNode() != null) { in createContents()
78 id = node.getXmlNode().getNodeName(); in createContents()
80 id = node.getDescriptor().getUiName(); in createContents()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/refactorings/extractstring/
DReplaceStringsVisitor.java84 public boolean visit(StringLiteral node) { in visit() argument
85 if (node.getLiteralValue().equals(mOldString)) { in visit()
91 useGetResource = examineVariableDeclaration(node) || in visit()
92 examineMethodInvocation(node) || in visit()
93 examineAssignment(node); in visit()
102 Expression context = methodHasContextArgument(node); in visit()
103 if (context == null && !isClassDerivedFromContext(node)) { in visit()
107 context = findContextFieldOrMethod(node); in visit()
129 mRewriter.replace(node, newNode, editGroup); in visit()
131 return super.visit(node); in visit()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/
DAddSuppressAttribute.java151 Node node; in createFixes() local
153 node = DomUtilities.getNode(editor.getStructuredDocument(), 0); in createFixes()
154 if (node != null) { in createFixes()
155 node = node.getOwnerDocument().getDocumentElement(); in createFixes()
158 node = DomUtilities.getNode(editor.getStructuredDocument(), offset); in createFixes()
160 if (node == null) { in createFixes()
163 Document document = node.getOwnerDocument(); in createFixes()
164 while (node != null && node.getNodeType() != Node.ELEMENT_NODE) { in createFixes()
165 node = node.getParentNode(); in createFixes()
167 if (node == null) { in createFixes()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/relative/
DGuidelineHandler.java273 for (INode node : mDraggedNodes) { in checkCycle()
274 INode from = match.edge.node; in checkCycle()
275 assert match.with.node == null || match.with.node == node; in checkCycle() local
276 INode to = node; in checkCycle()
317 protected void addBounds(INode node, String id, in addBounds() argument
319 Rect b = node.getBounds(); in addBounds()
320 Margins margins = node.getMargins(); in addBounds()
323 mHorizontalEdges.add(new Segment(b.y, b.x, b.x2(), node, id, TOP, WITHOUT_MARGIN)); in addBounds()
324 mHorizontalEdges.add(new Segment(b.y - margins.top, b.x, b.x2(), node, id, in addBounds()
327 mHorizontalEdges.add(new Segment(b.y, b.x, b.x2(), node, id, TOP, NO_MARGIN)); in addBounds()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/
DLayoutMetadataTest.java51 Node node = uiNode.getXmlNode(); in testMetadata1() local
53 assertNull(LayoutMetadata.getProperty(node, "foo")); in testMetadata1()
55 Element element = (Element) node; in testMetadata1()
67 private static String getText(IDocument document, Node node) throws Exception { in getText() argument
68 IndexedRegion region = (IndexedRegion) node; in getText()
85 UiElementNode node = findById(root, targetId); in getNode() local
86 assertNotNull(node); in getNode()
87 Pair<IDocument, UiElementNode> pair = Pair.<IDocument, UiElementNode>of(document, node); in getNode()
91 private static UiElementNode findById(UiElementNode node, String targetId) { in findById() argument
95 String id = node.getAttributeValue(ATTR_ID); in findById()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/
DExplodedRenderingHelper.java232 Node node = entry.getKey(); in combineRelativeLayout() local
235 int[] leftResult = getBiggestMarginInDirection(node, 0 /*horizontal*/, in combineRelativeLayout()
241 int[] rightResult = getBiggestMarginInDirection(node, 0 /*horizontal*/, in combineRelativeLayout()
247 int[] thisPadding = childrenPadding.get(node); in combineRelativeLayout()
257 int[] topResult = getBiggestMarginInDirection(node, 1 /*horizontal*/, in combineRelativeLayout()
263 int[] bottomResult = getBiggestMarginInDirection(node, 1 /*horizontal*/, in combineRelativeLayout()
284 private int[] getBiggestMarginInDirection(Node node, int resIndex, String relativeTo, in getBiggestMarginInDirection() argument
288 NamedNodeMap attributes = node.getAttributes(); in getBiggestMarginInDirection()
290 String viewId = getAttribute(node, "id", attributes); //$NON-NLS-1$ in getBiggestMarginInDirection()
293 String toLeftOfRef = getAttribute(node, relativeTo, attributes); in getBiggestMarginInDirection()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/common/layout/
DLinearLayoutRuleTest.java129 INode node = TestNode.create("android.widget.Button").id("@+id/Button012"); in testContextMenu() local
132 rule.addContextMenuActions(contextMenu, node); in testContextMenu()
149 INode node = TestNode.create("android.widget.LinearLayout").id("@+id/LinearLayout") in testContextMenuCustom() local
154 rule.addContextMenuActions(contextMenu, node); in testContextMenuCustom()
175 TestNode node = TestNode.create("android.widget.LinearLayout").id("@+id/LinearLayout012"); in testOrientation() local
176 node.putAttributeInfo(ANDROID_URI, "orientation", in testOrientation()
181 assertNull(node.getStringAttr(ANDROID_URI, ATTR_ORIENTATION)); in testOrientation()
184 rule.addContextMenuActions(contextMenu, node); in testOrientation()
194 callback.action(orientationAction, Collections.singletonList(node), VALUE_VERTICAL, true); in testOrientation()
196 String orientation = node.getStringAttr(ANDROID_URI, in testOrientation()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/manifest/
DManifestEditor.java251 Node node = getManifestXmlNode(xmlDoc); in loadFromXml() local
253 if (node != null) { in loadFromXml()
255 mUiManifestNode.loadFromXmlNode(node); in loadFromXml()
266 Node node = xmlDoc.getDocumentElement(); in getManifestXmlNode() local
267 if (node != null && manifestXmlName.equals(node.getNodeName())) { in getManifestXmlNode()
268 return node; in getManifestXmlNode()
271 for (node = xmlDoc.getFirstChild(); in getManifestXmlNode()
272 node != null; in getManifestXmlNode()
273 node = node.getNextSibling()) { in getManifestXmlNode()
274 if (node.getNodeType() == Node.ELEMENT_NODE && in getManifestXmlNode()
[all …]
/sdk/hierarchyviewer/src/com/android/hierarchyviewer/scene/
DViewHierarchyScene.java62 protected Widget attachNodeWidget(ViewNode node) { in attachNodeWidget() argument
63 Widget widget = createBox(node, node.name, node.id); in attachNodeWidget()
70 private Widget createBox(ViewNode node, String nodeName, String id) { in createBox() argument
72 node.setShortName(shortName); in createBox()
74 GradientWidget box = new GradientWidget(this, node); in createBox()
194 private final ViewNode node; field in ViewHierarchyScene.GradientWidget
203 public GradientWidget(ViewHierarchyScene scene, ViewNode node) { in GradientWidget() argument
205 this.node = node; in GradientWidget()
206 node.setStateListener(this); in GradientWidget()
219 child.setForeground(isSelected || node.filtered ? SELECTED : UNSELECTED); in pickChildrenColor()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/ui/tree/
DUiModelTreeLabelProvider.java46 UiElementNode node = null; in getImage() local
51 node = (UiElementNode) element; in getImage()
52 desc = node.getDescriptor(); in getImage()
58 if (node != null && node.hasError()) { in getImage()
78 UiElementNode node = (UiElementNode) element; in getText() local
79 return node.getShortDescription(); in getText()
DUiModelTreeContentProvider.java51 UiElementNode node = (UiElementNode) parentElement; in getChildren() local
52 return node.getUiChildren().toArray(); in getChildren()
63 UiElementNode node = (UiElementNode) element; in getParent() local
64 return node.getUiParent(); in getParent()
74 UiElementNode node = (UiElementNode) element; in hasChildren() local
75 return node.getUiChildren().size() > 0; in hasChildren()
/sdk/hierarchyviewer/src/com/android/hierarchyviewer/ui/model/
DPropertiesTableModel.java29 public PropertiesTableModel(ViewNode node) { in PropertiesTableModel() argument
30 properties = node.properties; in PropertiesTableModel()
31 loadPrivateProperties(node); in PropertiesTableModel()
34 private void loadPrivateProperties(ViewNode node) { in loadPrivateProperties() argument
35 int x = node.left; in loadPrivateProperties()
36 int y = node.top; in loadPrivateProperties()
37 ViewNode p = node.parent; in loadPrivateProperties()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/grid/
DGridModel.java165 private GridModel(IClientRulesEngine rulesEngine, INode node, Object viewObject) { in GridModel() argument
167 layout = node; in GridModel()
188 @NonNull INode node, in get() argument
197 GridModel model = new GridModel(rulesEngine, node, viewObject); in get()
219 public ViewData getView(INode node) { in getView() argument
221 if (view.node == node) { in getView()
288 baseline = view.node.getBaseline(); in getBaseline()
292 String gravity = getGridAttribute(view.node, ATTR_LAYOUT_GRAVITY); in getBaseline()
298 baseline += view.node.getBounds().y - getRowY(row); in getBaseline()
334 public void setGridAttribute(INode node, String name, int value) { in setGridAttribute() argument
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/formatting/
DEclipseXmlPrettyPrinter.java99 public static String prettyPrint(@NonNull Node node, boolean endWithNewline) { in prettyPrint() argument
100 return prettyPrint(node, EclipseXmlFormatPreferences.create(), XmlFormatStyle.get(node), in prettyPrint()
126 @NonNull Node node, in prettyPrint()
134 printer.prettyPrint(-1, node, null, null, sb, false /*openTagOnly*/); in prettyPrint()
136 if (node.getNodeType() == Node.DOCUMENT_NODE && !xml.startsWith("<?")) { //$NON-NLS-1$ in prettyPrint()
144 protected String getSource(@NonNull Node node) { in getSource() argument
146 if (node instanceof IDOMNode) { in getSource()
151 IDOMNode textImpl = (IDOMNode) node; in getSource()
155 return super.getSource(node); in getSource()

123456