protected void add(Object popup, Shell shell, int type, int offset) { Assert.isNotNull(popup); Assert.isTrue(shell != null && !shell.isDisposed()); checkType(type); if (fShells[type] != shell) { if (fShells[type] != null) fShells[type].removeListener(SWT.Dispose, this); shell.addListener(SWT.Dispose, this); fShells[type]= shell; } fPopups[type]= popup; if (type == LAYOUT_CONTEXT_SELECTOR || type == LAYOUT_CONTEXT_INFO_POPUP) fContextType= type; layout(type, offset); adjustListeners(type); }
protected void add(Object popup, Shell shell, int type, int offset) { Assert.isNotNull(popup); Assert.isTrue(shell != null && !shell.isDisposed()); checkType(type); if (fShells[type] != shell) { if (fShells[type] != null) fShells[type].removeListener(SWT.Dispose, this); shell.addListener(SWT.Dispose, this); fShells[type]= shell; } fPopups[type]= popup; if (type == LAYOUT_CONTEXT_SELECTOR || type == LAYOUT_CONTEXT_INFO_POPUP) fContextType= type; layout(type, offset); adjustListeners(type); }
if (Helper2.okToUse(fShells[LAYOUT_PROPOSAL_SELECTOR])) { if (fProposalPopupOrientation == PROPOSAL_STACKED) layout(LAYOUT_PROPOSAL_SELECTOR, getSelectionOffset()); if (Helper2.okToUse(fShells[LAYOUT_PROPOSAL_SELECTOR])) { if (fContextInfoPopupOrientation == CONTEXT_INFO_BELOW) layout(LAYOUT_PROPOSAL_SELECTOR, getSelectionOffset());
if (Helper2.okToUse(fShells[LAYOUT_PROPOSAL_SELECTOR])) { if (fProposalPopupOrientation == PROPOSAL_STACKED) layout(LAYOUT_PROPOSAL_SELECTOR, getSelectionOffset()); if (Helper2.okToUse(fShells[LAYOUT_PROPOSAL_SELECTOR])) { if (fContextInfoPopupOrientation == CONTEXT_INFO_BELOW) layout(LAYOUT_PROPOSAL_SELECTOR, getSelectionOffset());
/** * Layouts the registered popup of the given type relative to the * given offset. The offset is relative to the offset of the viewer's visible region. * Valid types are defined by <code>LayoutManager</code>. * * @param type the type of popup to layout * @param visibleOffset the offset at which to layout relative to the offset of the viewer's visible region * @since 2.0 */ void layout(int type, int visibleOffset) { fLayoutManager.layout(type, visibleOffset); }
/** * Layouts the registered popup of the given type relative to the * given offset. The offset is relative to the offset of the viewer's visible region. * Valid types are defined by <code>LayoutManager</code>. * * @param type the type of popup to layout * @param visibleOffset the offset at which to layout relative to the offset of the viewer's visible region * @since 2.0 */ void layout(int type, int visibleOffset) { fLayoutManager.layout(type, visibleOffset); }