void handleScroll(Event event) { ScrollBar scrollBar = (ScrollBar)event.widget; Control scrollableParent = scrollBar.getParent(); if (scrollableParent.equals(list)) return; if (isParentScrolling(scrollableParent)) dropDown(false); } /**
void handleScroll(Event event) { ScrollBar scrollBar = (ScrollBar)event.widget; Control scrollableParent = scrollBar.getParent(); if (scrollableParent.equals(list)) return; if (isParentScrolling(scrollableParent)) dropDown(false); } /**
void handleScroll(Event event) { ScrollBar scrollBar = (ScrollBar)event.widget; Control scrollableParent = scrollBar.getParent(); if (scrollableParent.equals(list)) return; if (isParentScrolling(scrollableParent)) dropDown(false); } /**
void handleScroll(Event event) { ScrollBar scrollBar = (ScrollBar)event.widget; Control scrollableParent = scrollBar.getParent(); if (scrollableParent.equals(list)) return; if (isParentScrolling(scrollableParent)) dropDown(false); } /**
void handleScroll(Event event) { ScrollBar scrollBar = (ScrollBar)event.widget; Control scrollableParent = scrollBar.getParent(); if (scrollableParent.equals(list)) return; if (isParentScrolling(scrollableParent)) dropDown(false); } /**
private static void handleScrollBars( Widget root, WidgetTreeVisitor visitor ) { if( root instanceof Scrollable ) { Scrollable scrollable = ( Scrollable )root; ScrollBar horizontalBar = scrollable.getHorizontalBar(); if( horizontalBar != null && horizontalBar.getParent() == scrollable ) { accept( horizontalBar, visitor ); } ScrollBar verticalBar = scrollable.getVerticalBar(); if( verticalBar != null && verticalBar.getParent() == scrollable ) { accept( verticalBar, visitor ); } } }
/** * Returns <code>true</code> if the receiver is visible and all * of the receiver's ancestors are visible and <code>false</code> * otherwise. * * @return the receiver's visibility state * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @see #getVisible */ public boolean isVisible () { checkWidget (); return getVisible () && getParent ().isVisible (); }
/** * Returns <code>true</code> if the receiver is visible and all * of the receiver's ancestors are visible and <code>false</code> * otherwise. * * @return the receiver's visibility state * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @see #getVisible */ public boolean isVisible () { checkWidget (); return getVisible () && getParent ().isVisible (); }
/** * Returns <code>true</code> if the receiver is enabled and all * of the receiver's ancestors are enabled, and <code>false</code> * otherwise. A disabled control is typically not selectable from the * user interface and draws with an inactive or "grayed" look. * * @return the receiver's enabled state * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @see #getEnabled */ public boolean isEnabled () { checkWidget (); return getEnabled () && getParent ().getEnabled (); }
/** * Returns <code>true</code> if the receiver is enabled and all * of the receiver's ancestors are enabled, and <code>false</code> * otherwise. A disabled control is typically not selectable from the * user interface and draws with an inactive or "grayed" look. * * @return the receiver's enabled state * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @see #getEnabled */ public boolean isEnabled () { checkWidget (); return getEnabled () && getParent ().getEnabled (); }
/** * Returns <code>true</code> if the receiver is enabled and all * of the receiver's ancestors are enabled, and <code>false</code> * otherwise. A disabled control is typically not selectable from the * user interface and draws with an inactive or "grayed" look. * * @return the receiver's enabled state * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @see #getEnabled */ public boolean isEnabled () { checkWidget (); return getEnabled () && getParent ().getEnabled (); }
/** * Returns <code>true</code> if the receiver is visible and all * of the receiver's ancestors are visible and <code>false</code> * otherwise. * * @return the receiver's visibility state * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @see #getVisible */ public boolean isVisible () { checkWidget (); return getVisible () && getParent ().isVisible (); }
@Override public void renderInitialization( ScrollBar scrollBar ) throws IOException { RemoteObject remoteObject = createRemoteObject( scrollBar, TYPE ); remoteObject.setHandler( new ScrollBarOperationHandler( scrollBar ) ); remoteObject.set( "parent", getId( scrollBar.getParent() ) ); remoteObject.set( "style", createJsonArray( getStyles( scrollBar, ALLOWED_STYLES ) ) ); }
/** * Returns the shell for the given widget. If the widget doesn't represent * a SWT object that manage a shell, <code>null</code> is returned. * * @return the shell for the given widget */ public static Shell getShell(Widget widget) { if (widget instanceof Control) return ((Control)widget).getShell(); if (widget instanceof Caret) return ((Caret)widget).getParent().getShell(); if (widget instanceof DragSource) return ((DragSource)widget).getControl().getShell(); if (widget instanceof DropTarget) return ((DropTarget)widget).getControl().getShell(); if (widget instanceof Menu) return ((Menu)widget).getParent().getShell(); if (widget instanceof ScrollBar) return ((ScrollBar)widget).getParent().getShell(); return null; }
/** * Returns the shell for the given widget. If the widget doesn't represent * a SWT object that manage a shell, <code>null</code> is returned. * * @return the shell for the given widget */ public static Shell getShell(Widget widget) { if (widget instanceof Control) return ((Control) widget).getShell(); if (widget instanceof Caret) return ((Caret) widget).getParent().getShell(); if (widget instanceof DragSource) return ((DragSource) widget).getControl().getShell(); if (widget instanceof DropTarget) return ((DropTarget) widget).getControl().getShell(); if (widget instanceof Menu) return ((Menu) widget).getParent().getShell(); if (widget instanceof ScrollBar) return ((ScrollBar) widget).getParent().getShell(); return null; }
/** * Returns the shell for the given widget. If the widget doesn't represent * a SWT object that manage a shell, <code>null</code> is returned. * @param widget the widget * * @return the shell for the given widget */ public static Shell getShell(Widget widget) { if (widget instanceof Control) return ((Control)widget).getShell(); if (widget instanceof Caret) return ((Caret)widget).getParent().getShell(); if (widget instanceof DragSource) return ((DragSource)widget).getControl().getShell(); if (widget instanceof DropTarget) return ((DropTarget)widget).getControl().getShell(); if (widget instanceof Menu) return ((Menu)widget).getParent().getShell(); if (widget instanceof ScrollBar) return ((ScrollBar)widget).getParent().getShell(); return null; }
/** * Returns the shell for the given widget. If the widget doesn't represent * a SWT object that manage a shell, <code>null</code> is returned. * * @return the shell for the given widget */ public static Shell getShell(Widget widget) { if (widget instanceof Control) return ((Control)widget).getShell(); if (widget instanceof Caret) return ((Caret)widget).getParent().getShell(); if (widget instanceof DragSource) return ((DragSource)widget).getControl().getShell(); if (widget instanceof DropTarget) return ((DropTarget)widget).getControl().getShell(); if (widget instanceof Menu) return ((Menu)widget).getParent().getShell(); if (widget instanceof ScrollBar) return ((ScrollBar)widget).getParent().getShell(); return null; }
/** * Returns the shell for the given widget. If the widget doesn't represent * a SWT object that manage a shell, <code>null</code> is returned. * @param widget the widget * * @return the shell for the given widget */ public static Shell getShell(Widget widget) { if (widget instanceof Control) return ((Control)widget).getShell(); if (widget instanceof Caret) return ((Caret)widget).getParent().getShell(); if (widget instanceof DragSource) return ((DragSource)widget).getControl().getShell(); if (widget instanceof DropTarget) return ((DropTarget)widget).getControl().getShell(); if (widget instanceof Menu) return ((Menu)widget).getParent().getShell(); if (widget instanceof ScrollBar) return ((ScrollBar)widget).getParent().getShell(); return null; }
/** * Returns the shell for the given widget. If the widget doesn't represent a * SWT object that manage a shell, <code>null</code> is returned. * * @param widget * the widget * * @return the shell for the given widget */ public static Shell getShell(Widget widget) { if (widget instanceof Control) return ((Control) widget).getShell(); if (widget instanceof Caret) return ((Caret) widget).getParent().getShell(); if (widget instanceof DragSource) return ((DragSource) widget).getControl().getShell(); if (widget instanceof DropTarget) return ((DropTarget) widget).getControl().getShell(); if (widget instanceof Menu) return ((Menu) widget).getParent().getShell(); if (widget instanceof ScrollBar) return ((ScrollBar) widget).getParent().getShell(); return null; }
/** * Returns the shell for the given widget. If the widget doesn't represent * a SWT object that manage a shell, <code>null</code> is returned. * * @return the shell for the given widget */ public static Shell getShell(Widget widget) { if (widget instanceof Control) return ((Control) widget).getShell(); if (widget instanceof Caret) return ((Caret) widget).getParent().getShell(); if (widget instanceof DragSource) return ((DragSource) widget).getControl().getShell(); if (widget instanceof DropTarget) return ((DropTarget) widget).getControl().getShell(); if (widget instanceof Menu) return ((Menu) widget).getParent().getShell(); if (widget instanceof ScrollBar) return ((ScrollBar) widget).getParent().getShell(); return null; } }