Package org.eclipse.swt.events

Examples of org.eclipse.swt.events.PaintListener


    shell.setLayout(new GridLayout());
    logger.debug("gw size: " + getSize());
    shell.setMinimumSize(MINIMUM_WIDTH, MINIMUM_HEIGHT);
    // TODO Somehow lock fixed x:y relation
    logger.debug("Shell size: " + shell.getSize());
    shell.addPaintListener(new PaintListener() {
     
      /**
       * Make sure we handle the case when the shell is resized.
       * <p>
       * In this case, rescale the background image and recompute the
View Full Code Here


      PlayerSeatComposite psc = playerSeatComposites.get(i);
      psc.setChipsArea(chipsForPlayerArea);
     
    }
    // Add a PaintListener for updating chips (redraw() and update())
    addPaintListener(new PaintListener() {
     
      /**
       * PaintListener for the table. Takes redraw area into consideration
       * and redraws only the affected areas
       *
 
View Full Code Here

    final Color color = (Color) engine.convert(value, Color.class, display);
    if (widget instanceof Button ) {
      final Button b = (Button) widget;
      if ((b.getStyle() & SWT.PUSH)!=0) {
       
      b.addPaintListener(new PaintListener() {
        @Override
        public void paintControl(PaintEvent e) {
          b.setBackground(color);
          e.gc.setBackground(color);
          e.gc.setForeground(display.getSystemColor(SWT.COLOR_WHITE));
View Full Code Here

        barWidth = scale(currentCount);
        redraw();
      }
    });

    addPaintListener(new PaintListener() {
      @Override
      public void paintControl(PaintEvent e) {
        paint(e);
      }
    });
View Full Code Here

    if (currentCount >= maxCount) {
      currentCount = maxCount;
      barWidth = getClientArea().width - 1;
    }
    final int width = x;
    addPaintListener(new PaintListener() {
      @Override
      public void paintControl(PaintEvent e) {
        paintStep(e, width, barWidth);
      }
    });
View Full Code Here

     */
    public ImageCanvas(Composite parent, int style, Image image) {
      super(parent, style);
      this.image = image;

      addPaintListener(new PaintListener() {
        public void paintControl(PaintEvent e) {
          paintImage(e.gc);
        }
      });
    }
View Full Code Here

      // find the specified location.  Not currently API
      // hardcoded to be sensible with our current Europa Graphic
      String buildIdLocString = product.getProperty("buildIdLocation"); //$NON-NLS-1$
      final Point buildIdPoint = StringConverter.asPoint(buildIdLocString,
          new Point(322, 190));
      getContent().addPaintListener(new PaintListener() {

        public void paintControl(PaintEvent e) {
          e.gc.setForeground(getForeground());
          e.gc.drawText(buildId, buildIdPoint.x, buildIdPoint.y, true);
        }
View Full Code Here

        dispose();
        canvas = new Canvas(parent, SWT.NONE);
        canvas.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
       
        // paint the border
        canvas.addPaintListener(new PaintListener() {
            private void drawLine (GC gc, int x1, int y1, int x2, int y2, boolean flipXY) {
                if (flipXY) {
                    int tmp = x1;
                    x1 = y1;
                    y1 = tmp;
View Full Code Here

        long mValue = getGraphMaxValue(currentValue);
        canvas.setData(MAX_VALUE, mValue);
        canvas.setData(GRAPH_VALUES, new long[] {0,0,0,0,0,currentValue});
       
        canvas.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
        canvas.addPaintListener(new PaintListener()
            {
                public void paintControl(PaintEvent event)
                {
                    Canvas canvas = (Canvas)event.widget;
                    int maxX = canvas.getSize().x;
View Full Code Here

      }
    };
    fCanvas.setBackground(getBackground(fCanvas.getDisplay()));
    fCanvas.setForeground(fForeground);

    fCanvas.addPaintListener(new PaintListener() {
      public void paintControl(PaintEvent event) {
        if (fCachedTextViewer != null)
          doubleBufferPaint(event.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.