Example #1
0
 public void setBackgroundColor(org.eclipse.swt.graphics.Color color) {
   if (activeBackgroundColorCanvas != null) {
     activeBackgroundColorCanvas.setBackground(color);
   }
   toolSettings.commonBackgroundColor = color;
   updateToolSettings();
 }
Example #2
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;
 }
Example #3
0
 public void setLineStyle(int id) {
   java.lang.Integer lineType = (java.lang.Integer) tools[id].data;
   toolSettings.commonLineStyle = lineType.intValue();
   updateToolSettings();
 }
Example #4
0
 public void setFillType(int id) {
   java.lang.Integer fillType = (java.lang.Integer) tools[id].data;
   toolSettings.commonFillType = fillType.intValue();
   updateToolSettings();
 }