@Override protected Widget doFindInputItem(Object element) { // compare with root Object root = getRoot(); if (root == null) { return null; } if (equals(root, element)) { return getControl(); } return null; }
@Override protected Widget doFindInputItem(Object element) { // compare with root Object root = getRoot(); if (root == null) { return null; } if (equals(root, element)) { return getControl(); } return null; }
protected Widget doFindInputItem(Object element) { // compare with root Object root = getRoot(); if (root == null) { return null; } if (equals(root, element)) { return getControl(); } return null; }
/** * Non-recursively tries to find the given element as a child of the given * parent (item or tree). * * @param parent * the parent item * @param element * the element * @return Widget */ private Widget internalFindChild(Widget parent, Object element) { Item[] items = getChildren(parent); for (Item item : items) { Object data = item.getData(); if (data != null && equals(data, element)) { return item; } } return null; }
/** * Non-recursively tries to find the given element as a child of the given * parent (item or tree). * * @param parent * the parent item * @param element * the element * @return Widget */ private Widget internalFindChild(Widget parent, Object element) { Item[] items = getChildren(parent); for (int i = 0; i < items.length; i++) { Item item = items[i]; Object data = item.getData(); if (data != null && equals(data, element)) { return item; } } return null; }
/** * Non-recursively tries to find the given element as a child of the given * parent (item or tree). * * @param parent * the parent item * @param element * the element * @return Widget */ private Widget internalFindChild(Widget parent, Object element) { Item[] items = getChildren(parent); for (int i = 0; i < items.length; i++) { Item item = items[i]; Object data = item.getData(); if (data != null && equals(data, element)) { return item; } } return null; }
/** * Recursively tries to find the given element. * * @param parent * the parent item * @param element * the element * @return Widget */ private Widget internalFindItem(Item parent, Object element) { // compare with node Object data = parent.getData(); if (data != null) { if (equals(data, element)) { return parent; } } // recurse over children Item[] items = getChildren(parent); for (int i = 0; i < items.length; i++) { Item item = items[i]; Widget o = internalFindItem(item, element); if (o != null) { return o; } } return null; }
/** * Recursively tries to find the given element. * * @param parent * the parent item * @param element * the element * @return Widget */ private Widget internalFindItem(Item parent, Object element) { // compare with node Object data = parent.getData(); if (data != null) { if (equals(data, element)) { return parent; } } // recurse over children Item[] items = getChildren(parent); for (Item item : items) { Widget o = internalFindItem(item, element); if (o != null) { return o; } } return null; }
/** * Recursively tries to find the given element. * * @param parent * the parent item * @param element * the element * @return Widget */ private Widget internalFindItem(Item parent, Object element) { // compare with node Object data = parent.getData(); if (data != null) { if (equals(data, element)) { return parent; } } // recurse over children Item[] items = getChildren(parent); for (int i = 0; i < items.length; i++) { Item item = items[i]; Widget o = internalFindItem(item, element); if (o != null) { return o; } } return null; }
protected void associate(Object element, Item item) { Object data = item.getData(); if (data != null && data != element && equals(data, element)) { // workaround for PR 1FV62BT // assumption: elements are equal but not identical // -> remove from map but don't touch children unmapElement(data, item); item.setData(element); mapElement(element, item); } else { // recursively disassociate all super.associate(element, item); } }
@Override protected void associate(Object element, Item item) { Object data = item.getData(); if (data != null && data != element && equals(data, element)) { // workaround for PR 1FV62BT // assumption: elements are equal but not identical // -> remove from map but don't touch children unmapElement(data, item); item.setData(element); mapElement(element, item); } else { // recursively disassociate all super.associate(element, item); } }
@Override protected void associate(Object element, Item item) { Object data = item.getData(); if (data != null && data != element && equals(data, element)) { // workaround for PR 1FV62BT // assumption: elements are equal but not identical // -> remove from map but don't touch children unmapElement(data, item); item.setData(element); mapElement(element, item); } else { // recursively disassociate all super.associate(element, item); } }
if (equals(elementOrPath, getRoot())) { // stop at root return null;
updatePlus((Item) widget, element); if (updateLabels || !equals(element, widget.getData())) { doUpdateItem(widget, element, true); } else {
boolean addDummy = false; Object data = item.getData(); if (data != null && equals(element, data)) {
boolean addDummy = false; Object data = item.getData(); if (data != null && equals(element, data)) {
boolean addDummy = false; Object data = item.getData(); if (data != null && equals(element, data)) {
if (equals(parent, getRoot())) { return super.getRawChildren(parent);