Exemplo n.º 1
0
 private void updateToolSettings() {
   final org.eclipse.swt.examples.paint.PaintTool activePaintTool = paintSurface.getPaintTool();
   if (activePaintTool == null) {
     return;
   }
   activePaintTool.endSession();
   activePaintTool.set(toolSettings);
   activePaintTool.beginSession();
 }
Exemplo n.º 2
0
 public void dispose() {
   if (paintSurface != null) {
     paintSurface.dispose();
   }
   if (paintColors != null) {
     for (int i = 0; i < paintColors.length; ++i) {
       final org.eclipse.swt.graphics.Color color = paintColors[i];
       if (color != null) {
         color.dispose();
       }
     }
   }
   paintDefaultFont = null;
   paintColors = null;
   paintSurface = null;
   freeResources();
 }
Exemplo n.º 3
0
 public void setPaintTool(int id) {
   org.eclipse.swt.examples.paint.PaintTool paintTool =
       (org.eclipse.swt.examples.paint.PaintTool) tools[id].data;
   paintSurface.setPaintSession(paintTool);
   updateToolSettings();
 }