@Override public void hideChild(MElementContainer<MUIElement> parentElement, MUIElement child) { super.hideChild(parentElement, child); forceLayout(parentElement); }
@Override public void childRendered(MElementContainer<MUIElement> parentElement, MUIElement element) { super.childRendered(parentElement, element); // Ensure that the element's 'containerInfo' is initialized ensureLayoutWeight(element); forceLayout(parentElement); }
@Override public void processContents(MElementContainer<MUIElement> container) { try { processedContent++; super.processContents(container); } finally { processedContent--; if (processedContent == 0) { forceLayout(container); } } }
/** * @param menuManager * @param itemModel */ private void processDynamicMenuContribution(MenuManager menuManager, MDynamicMenuContribution itemModel) { IContributionItem ici = getContribution(itemModel); if (ici != null) { return; } DynamicContributionContributionItem ci = new DynamicContributionContributionItem( itemModel); addToManager(menuManager, itemModel, ci); linkModelToContribution(itemModel, ci); }
private Object[] promptForSave(Shell parentShell, Collection<MPart> saveableParts) { SaveablePartPromptDialog dialog = new SaveablePartPromptDialog( parentShell, saveableParts); if (dialog.open() == Window.CANCEL) { return null; } return dialog.getCheckedElements(); }
@Override public void childRendered( final MElementContainer<MUIElement> parentElement, MUIElement element) { super.childRendered(parentElement, element); if (!(((MUIElement) parentElement) instanceof MPartStack) || !(element instanceof MStackElement)) return; createTab(parentElement, element); }
@Override public void hideChild(MElementContainer<MUIElement> parentElement, MUIElement child) { super.hideChild(parentElement, child); Object downCast = parentElement; layoutTrim((MTrimBar) downCast); }
public boolean validateValues(Object oldValue, Object newValue) { return newValue instanceof MPlaceholder // part gets active || isTagAdded(CSSConstants.CSS_BUSY_CLASS, oldValue, newValue) // part gets busy || isTagRemoved(CSSConstants.CSS_BUSY_CLASS, oldValue, newValue) // part gets idle || isTagAdded(CSSConstants.CSS_CONTENT_CHANGE_CLASS, oldValue, newValue); // content of part changed }
@Override public void postProcess(MUIElement element) { super.postProcess(element); disposeToolbarIfNecessary(element); }
@Override public void update(String id) { updateIcons(); if (widget instanceof MenuItem) { updateMenuItem(); } else if (widget instanceof ToolItem) { updateToolItem(); } }
@Override public void update(String id) { updateIcons(); if (widget instanceof MenuItem) { updateMenuItem(); } else if (widget instanceof ToolItem) { updateToolItem(); } }
/** * Create a CSSEngineHelper that can retrieve engine values for a particular * control. * * @param context * @param control */ public CSSEngineHelper(IEclipseContext context, Control control) { this.context = context; this.control = control; initialize(); }
/** * Shows a popup dialog with the list of editors availavle in a given * {@link CTabFolder}. By default the popup origin will be located close to * the chevron location. * * @param stack * @param tabFolder */ public void showAvailableItems(MElementContainer<?> stack, CTabFolder tabFolder) { showAvailableItems(stack, tabFolder, false); }
public boolean isGradientVertical() { if (gradientVerticalField == null) { gradientVerticalField = getField("gradientVertical"); //$NON-NLS-1$ } Boolean result = (Boolean) getFieldValue(gradientVerticalField); return result != null ? result : true; }
@Override public void hideChild(MElementContainer<MUIElement> parentElement, MUIElement child) { super.hideChild(parentElement, child); forceLayout(parentElement); }
@Override public void childRendered(final MElementContainer<MUIElement> parentElement, MUIElement element) { super.childRendered(parentElement, element); if (!(((MUIElement) parentElement) instanceof MPartStack) || !(element instanceof MStackElement)) return; createTab(parentElement, element); }
@Override public void hideChild(MElementContainer<MUIElement> parentElement, MUIElement child) { super.hideChild(parentElement, child); Object downCast = parentElement; layoutTrim((MTrimBar) downCast); }
/** * Create a CSSEngineHelper that can retrieve engine values for a particular * control. * * @param context * @param control */ public CSSEngineHelper(IEclipseContext context, Control control) { this.context = context; this.control = control; initialize(); }
@Override public void showList(CTabFolderEvent event) { event.doit = false; showAvailableItems(stack, ctf); } };
public Color[] getGradientColors() { if (gradientColorsField == null) { gradientColorsField = getField("gradientColors"); //$NON-NLS-1$ } return (Color[]) getFieldValue(gradientColorsField); }