Package org.eclipse.swt.events

Examples of org.eclipse.swt.events.PaintListener


        addListener(SWT.MouseUp, handler);
        addListener(SWT.MouseWheel, handler);
        addListener(SWT.Resize, handler);
        addListener(SWT.KeyDown, handler);
       
        addPaintListener(new PaintListener(){
            public void paintControl( PaintEvent event ) {
                paint(event.gc, event.display);
            }
        });
    }
View Full Code Here


        addListener(SWT.MouseMove, handler);
        addListener(SWT.MouseUp, handler);
        addListener(SWT.MouseWheel, handler);
        addListener(SWT.Resize, handler);
        addListener(SWT.KeyDown, handler);
        addPaintListener(new PaintListener(){
            public void paintControl( PaintEvent event ) {
                //System.out.println("paint");
                paint(event.gc, event.display);
            }
        });
View Full Code Here

  public void createPartControl(Composite parent) {
    Composite composite = new Composite(parent, SWT.NULL);
      composite.setLayout(new FillLayout());
      final Canvas canvas = new Canvas(composite, SWT.NULL);
    canvas.setBackground(canvas.getDisplay().getSystemColor(SWT.COLOR_WHITE));
    canvas.addPaintListener(new PaintListener(){
          public void paintControl(PaintEvent e){
              Rectangle clientArea = canvas.getClientArea();
              e.gc.drawLine(0,0,clientArea.width,clientArea.height);
          }
         
View Full Code Here

                System.out.println("End Of Transition! current item: "
                        + transition.getTransitionable().getSelection());
            }
        });
       
        cnvs.addPaintListener(new PaintListener() {
            @Override
            public void paintControl(PaintEvent e) {
                Image img = me.imgs[me.curImg];
                e.gc.drawImage(
                        img
View Full Code Here

    super(cmp, SWT.BORDER_SOLID);

    this.shape = model.clone();
    this.setLayoutData(new RowData(iconSize, iconSize));
   
    this.addPaintListener(new PaintListener() {
      public void paintControl(PaintEvent e) {
        //ctrl.setSize(iconSize, iconSize);
        Rectangle clientArea = getClientArea();
        e.gc.setBackground(getDisplay().getSystemColor(
            SWT.COLOR_WHITE));
View Full Code Here

   
    //ctrl.pack();
    //Point size = ctrl.computeSize (iconSize, iconSize);
    //ctrl.setSize (size.x, size.y);
   
    ctrl.addPaintListener(new PaintListener() {
      public void paintControl(PaintEvent e) {
        //ctrl.setSize(iconSize, iconSize);
        Rectangle clientArea = ctrl.getClientArea();
        e.gc.setBackground(ctrl.getDisplay().getSystemColor(
            SWT.COLOR_WHITE));
View Full Code Here

 
  public static void getSeparator(Composite cmp) {   
   
    final Canvas ctrl = new Canvas(cmp, SWT.BORDER_SOLID);
    ctrl.setLayoutData(new RowData(20, iconSize));
    ctrl.addPaintListener(new PaintListener() {
      public void paintControl(PaintEvent e) {
        e.gc.drawLine(2, iconSize/2-2, 15, iconSize/2-2);
        e.gc.drawLine(2, iconSize/2+2, 15, iconSize/2+2);
        e.gc.drawLine(15, iconSize/2-5, 19, iconSize/2);
        e.gc.drawLine(15, iconSize/2+5, 19, iconSize/2);
View Full Code Here

     * rendered directly.
     *
     * This method is called on construction of the StyledGroup.
     */
    private void addBorderTextPainter() {
        this.addPaintListener(new PaintListener() {
            public void paintControl(PaintEvent paintEvent) {
                repaint(paintEvent.gc);
            }
        });
    }
View Full Code Here

        // You must specify SWT.NO_BACKGROUND for the canvas as we are
        // taking care of its complete rendering.
        if (canvas == null) {
            canvas = new Canvas(getGroup(), SWT.NO_BACKGROUND);
            canvas.addPaintListener(new PaintListener() {
                public void paintControl(PaintEvent pe) {
                    Rectangle canvasArea = canvas.getClientArea();
                    // Because image is passed into the constructor and the
                    // getChild method is called from Preview's constructor, we
                    // must have imageBounds as a local variable within paintControl
View Full Code Here

    GridData data = new GridData(SWT.FILL,SWT.FILL,true,true);
    data.minimumHeight = 400;
    data.minimumWidth = 750;
    this.canvas.setLayoutData(data);
   
    this.canvas.addPaintListener(new PaintListener() {
      public void paintControl(PaintEvent e) {
        FuzzyNumberDraw.this.paintWidget(e.gc);
      }
    });
   
View Full Code Here

TOP

Related Classes of org.eclipse.swt.events.PaintListener

Copyright © 2018 www.massapicom. 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.