/* * (non-Javadoc) * * @see * org.xmind.ui.properties.PropertyEditor#setForeground(org.eclipse.swt. * graphics.Color) */ @Override public void setForeground(Color color) { super.setForeground(color); if (getControl() != null && !getControl().isDisposed()) { getControl().setForeground(color); } }
private void updateColorsFonts(Color foreground, Font font) { if (canvas != null && !canvas.isDisposed()) { canvas.setBackground(canvas.getParent().getBackground()); canvas.setForeground(foreground); canvas.setFont(font); if (editor != null) { editor.setBackground(isSelected() ? selectedBackground : canvas.getBackground()); editor.setForeground(foreground); editor.setFont(font); } } }