Ejemplo n.º 1
0
 private void init() {
   org.eclipse.swt.widgets.Display display = mainComposite.getDisplay();
   paintColorWhite = new org.eclipse.swt.graphics.Color(display, 255, 255, 255);
   paintColorBlack = new org.eclipse.swt.graphics.Color(display, 0, 0, 0);
   paintDefaultFont = display.getSystemFont();
   paintColors = new org.eclipse.swt.graphics.Color[numPaletteCols * numPaletteRows];
   paintColors[0] = paintColorBlack;
   paintColors[1] = paintColorWhite;
   for (int i = 2; i < paintColors.length; i++) {
     paintColors[i] =
         new org.eclipse.swt.graphics.Color(display, i * 7 % 255, i * 23 % 255, i * 51 % 255);
   }
   toolSettings = new org.eclipse.swt.examples.paint.ToolSettings();
   toolSettings.commonForegroundColor = paintColorBlack;
   toolSettings.commonBackgroundColor = paintColorWhite;
   toolSettings.commonFont = paintDefaultFont;
 }
Ejemplo n.º 2
0
 public org.eclipse.swt.widgets.Display getDisplay() {
   return mainComposite.getDisplay();
 }