/** * Returns the scrolling parent for the given ExpandibleComposite object * @param obj * @return the scrolling parent of the given object or <code>null</code> if there isn't one */ private ScrolledComposite getScrollingParent(Object obj) { if (obj instanceof ExpandableComposite) { ExpandableComposite ecomp = (ExpandableComposite) obj; Composite parent = ecomp.getParent(); while (parent != null && !(parent instanceof ScrolledComposite)) { parent = parent.getParent(); } if (parent != null) { return (ScrolledComposite) parent; } } if (obj instanceof ScrolledComposite) { return (ScrolledComposite) obj; } return null; }
/** * Returns the scrolling parent for the given ExpandibleComposite object * * @param obj * @return */ ScrolledComposite getScrollingParent(Object obj) { if (obj instanceof ExpandableComposite) { ExpandableComposite ecomp = (ExpandableComposite) obj; Composite parent = ecomp.getParent(); while (parent != null && !(parent instanceof ScrolledComposite)) { parent = parent.getParent(); } if (parent != null) { return (ScrolledComposite) parent; } } if (obj instanceof ScrolledComposite) { return (ScrolledComposite) obj; } return null; }
/** * Returns the scrolling parent for the given ExpandibleComposite object * @param obj * @return */ ScrolledComposite getScrollingParent(Object obj) { if(obj instanceof ExpandableComposite) { ExpandableComposite ecomp = (ExpandableComposite) obj; Composite parent = ecomp.getParent(); while(parent != null && !(parent instanceof ScrolledComposite)) { parent = parent.getParent(); } if(parent != null) { return (ScrolledComposite) parent; } } if(obj instanceof ScrolledComposite) { return (ScrolledComposite) obj; } return null; }
private void verticalMove(boolean down) { Composite parent = getParent(); Control[] children = parent.getChildren(); for (int i = 0; i < children.length; i++) { Control child = children[i]; if (child == this) { ExpandableComposite sibling = getSibling(children, i, down); if (sibling != null && sibling.toggle != null) { sibling.setFocus(); } break; } } }
private void verticalMove(boolean down) { Composite parent = getParent(); Control[] children = parent.getChildren(); for (int i = 0; i < children.length; i++) { Control child = children[i]; if (child == this) { ExpandableComposite sibling = getSibling(children, i, down); if (sibling != null && sibling.toggle != null) { sibling.setFocus(); } break; } } }