Esempio n. 1
0
 /*
  * (non-Javadoc)
  *
  * @see
  * org.xmind.ui.properties.PropertyEditor#setBackground(org.eclipse.swt.
  * graphics.Color)
  */
 @Override
 public void setBackground(Color color) {
   super.setBackground(color);
   if (getControl() != null && !getControl().isDisposed()) getControl().setBackground(color);
   if (toolBar != null && toolBar.getControl() != null && !toolBar.getControl().isDisposed())
     toolBar.getControl().setBackground(color);
 }
Esempio n. 2
0
 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);
     }
   }
 }