@Override protected List<Control> getBackgroundColorExclusions() { final List<Control> list = copyControls(super.getBackgroundColorExclusions()); if (separator != null) list.add(separator); return list; }
/** * Set the specified background color for the specified control and all of * its children. Subclasses may override this method, but typically do not. * If a subclass wishes to exclude a particular control in its contents from * getting the specified background color, it may instead override * {@link #getBackgroundColorExclusions()} * * @param color * the color to use as the background color * @param control * the control whose color is to be changed * @see PopupDialog#getBackgroundColorExclusions() */ protected void applyBackgroundColor(Color color, Control control) { applyBackgroundColor(color, control, getBackgroundColorExclusions()); }
/** * Set the specified background color for the specified control and all of * its children. Subclasses may override this method, but typically do not. * If a subclass wishes to exclude a particular control in its contents from * getting the specified background color, it may instead override * {@link #getBackgroundColorExclusions()} * * @param color * the color to use as the background color * @param control * the control whose color is to be changed * @see PopupDialog#getBackgroundColorExclusions() */ protected void applyBackgroundColor(Color color, Control control) { applyBackgroundColor(color, control, getBackgroundColorExclusions()); }
/** * Set the specified background color for the specified control and all of * its children. Subclasses may override this method, but typically do not. * If a subclass wishes to exclude a particular control in its contents from * getting the specified background color, it may instead override * {@link #getBackgroundColorExclusions()} * * @param color * the color to use as the background color * @param control * the control whose color is to be changed * @see PopupDialog#getBackgroundColorExclusions() */ protected void applyBackgroundColor(Color color, Control control) { applyBackgroundColor(color, control, getBackgroundColorExclusions()); }
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override protected List getBackgroundColorExclusions() { List exclusions = super.getBackgroundColorExclusions(); if (filteredTree != null) { Text filterControl = filteredTree.getFilterControl(); exclusions.add(filterControl.getParent()); exclusions.addAll(Arrays.asList(filterControl.getParent().getChildren())); } return exclusions; }
/** * Apply any desired color to the specified composite and its children. * * @param composite * the contents composite */ private void applyColors(Composite composite) { // The getForeground() and getBackground() methods // should not answer null, but IColorProvider clients // are accustomed to null meaning use the default, so we guard // against this assumption. Color color = getForeground(); if (color == null) color = getDefaultForeground(); applyForegroundColor(color, composite, getForegroundColorExclusions()); color = getBackground(); if (color == null) color = getDefaultBackground(); applyBackgroundColor(color, composite, getBackgroundColorExclusions()); }
/** * Apply any desired color to the specified composite and its children. * * @param composite * the contents composite */ private void applyColors(Composite composite) { // The getForeground() and getBackground() methods // should not answer null, but IColorProvider clients // are accustomed to null meaning use the default, so we guard // against this assumption. Color color = getForeground(); if (color == null) color = getDefaultForeground(); applyForegroundColor(color, composite, getForegroundColorExclusions()); color = getBackground(); if (color == null) color = getDefaultBackground(); applyBackgroundColor(color, composite, getBackgroundColorExclusions()); }
/** * Apply any desired color to the specified composite and its children. * * @param composite * the contents composite */ private void applyColors(Composite composite) { // The getForeground() and getBackground() methods // should not answer null, but IColorProvider clients // are accustomed to null meaning use the default, so we guard // against this assumption. Color color = getForeground(); if (color == null) color = getDefaultForeground(); applyForegroundColor(color, composite, getForegroundColorExclusions()); color = getBackground(); if (color == null) color = getDefaultBackground(); applyBackgroundColor(color, composite, getBackgroundColorExclusions()); }