Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.GC.dispose()


    GC gc = new GC(canvas);
   
    gc.drawImage(bufferImage,bounds.x,bounds.y);
   
    gc.dispose();  
  }
 
 
  protected void
  drawPlot()
View Full Code Here


          SWT.DRAW_TRANSPARENT );


      image.drawText( title, ( bounds.width - title.length()*char_width )/2, 1, SWT.DRAW_TRANSPARENT );

      image.dispose();

    }finally{

      this_mon.exit();
    }
View Full Code Here

      gcImage.fillRectangle(x0, borderHorizontalSize, limit, completionHeight);
    } catch (Exception e) {
      System.out.println("Error Drawing PiecesItem");
      Debug.printStackTrace(e);
    }
    gcImage.dispose();

    Image oldImage = null;
    Graphic graphic = cell.getGraphic();
    if (graphic instanceof UISWTGraphic) {
      oldImage = ((UISWTGraphic) graphic).getImage();
View Full Code Here

       
        GC gc = new GC( canvas );
 
        gc.drawImage( buffer_image, bounds.x, bounds.y );
 
        gc.dispose();  
      }
    }
   
    private Image
    draw(
View Full Code Here

      gc.drawText( y_text, y_axis_top_x+4, y_axis_top_y + 2, SWT.DRAW_TRANSPARENT );

      gc.drawText( title, ( bounds.width - title.length()*char_width )/2, 1, SWT.DRAW_TRANSPARENT );
     
      gc.dispose();

      return( image );
    }
   
    protected void
View Full Code Here

    gc.setForeground(red);
    drawSelf(gc, ownCoords.getX(), ownCoords.getY(),
             ownCoords.getH(), ownErrorEstimate);
   
   
    gc.dispose();
   
    canvas.redraw();
  }
 
  public void refresh(List vivaldiPositions) {
View Full Code Here

      gc.setForeground(drawColor);
      draw(gc,coord.getX(),coord.getY(),coord.getH());
      drawColor.dispose();
    }
   
    gc.dispose();
   
    canvas.redraw();
  }
 
  private void draw(GC gc,float x,float y,float h) {
View Full Code Here

    // draw pointers
    gc.setBackground(pointerColor);
    gc.fillPolygon(new int[] { up_coord, y, up_coord + pointer_width, y - pointer_height, up_coord - pointer_width, y - pointer_height});
    int y2 = y + bar_height;
    gc.fillPolygon(new int[] { down_coord, y2, down_coord + pointer_width, y2 + pointer_height, down_coord - pointer_width, y2 + pointer_height});
    gc.dispose();
  }

  private SelectedPointer getSelectedPointer(int x,int y) {
    int up_coord = getUpCoord();
    int down_coord = getDownCoord();
View Full Code Here

        if (gc == null) {
          return;
        }
        gc.drawImage(image, 0, 0, imageBounds.width, imageBounds.height,
                     0, 0, bounds.width, bounds.height);
        gc.dispose();
/*
        // _OR_ enable refresh() for slower visual update with lots of flicker
        //refresh();
       
        // OR, disable both and image will be updated on next graphic bar update
View Full Code Here

*/
      int x = 0;
      gc.setClipping(clipping);
      gc.drawImage(image, x, 0);
    }
    gc.dispose();
  }

  /** Don't forget to call super.dispose()! */
  public void dispose() {
    super.dispose();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.