コード例 #1
0
 /*
  * (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);
   }
 }
コード例 #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);
     }
   }
 }