Package org.eclipse.swt.events

Examples of org.eclipse.swt.events.PaintListener


        graph.setLayoutAlgorithm(this, false);

       
        // Layout must be applied _after_ the zest graph is completely painted.
        // Otherwise the LayoutAlgorithm can't get the dimensions of the ElementFigures.
        paintListener = new PaintListener() {
     
      @Override
      public void paintControl(PaintEvent e) {
        graph.applyLayout();
      }
View Full Code Here


    private int iy = 0;
   
    public ScaleableImageCanvas(Composite parent, int style) {
      super(parent, style);
      setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
      addPaintListener(new PaintListener() {
        public void paintControl(PaintEvent e) {
          if(image==null){
            e.gc.fillRectangle(0,0,getSize().x,getSize().y);
            return;
          }
View Full Code Here

   
    public DPlayerSlider(final Composite parent, final int style) {
        super(parent, SWT.NONE);
        setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND));
       
        addPaintListener(new PaintListener() {
            /** {@inheritDoc} */
            public void paintControl(PaintEvent e) {
                //final Composite me = (Composite) e.widget;

                int x = 0;
View Full Code Here

  public BalanceSlider(final Composite parent, final int style) {
    super(parent, SWT.NONE);
    setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND));
   
    addPaintListener(new PaintListener() {
            public void paintControl(PaintEvent e) {
             
              int x = 0;
                int y = (getHeight() - getGauge()) / 2;
                int width = getWidth() - 1;
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

    gridData = new GridData(GridData.FILL, GridData.FILL, true, true);
    gridData.widthHint = 80;
    gridData.heightHint = 80;
    gridData.verticalSpan = 3;
    dogPhoto.setLayoutData(gridData);
    dogPhoto.addPaintListener(new PaintListener() {
      public void paintControl(final PaintEvent event) {
        if (dogImage != null) {
          event.gc.drawImage(dogImage, 0, 0);
        }
      }
View Full Code Here

        _databindingButton.setImage(getImage());
      } else {
        _databindingButton = new Button(parent, SWT.PUSH);
        _databindingButton.setImage(getImage());
      }
      _databindingButton.addPaintListener(new PaintListener() {
        public void paintControl(PaintEvent e) {
          if (!_databindingButton.isEnabled()
              && getDisabledImage() != null) {
            Rectangle buttonBounds = _databindingButton.getBounds();
            Rectangle imageBounds = getDisabledImage().getBounds();
View Full Code Here

    cc2 = new Composite(cc, SWT.None);
    cc2.setLayoutData(new GridData(0, 0));
    cc2.setLayout(layout);
    picLabel = new Label(cc, SWT.None);
   
    cc2.addPaintListener(new PaintListener() {

      public void paintControl(PaintEvent e) {
        boolean needDraw = false;
        if (image != null) {
          needDraw = true;
View Full Code Here

      }
    });
   
    canvas = new Canvas(parent, SWT.NONE);
   
    canvas.addPaintListener(new PaintListener()
      {
      @Override
      public void paintControl(PaintEvent e)
        {
        if(threads==0)
View Full Code Here

        setImage(image);

        /*
         * Adds the illustrative image to the left of the contents.
         */
        this.addPaintListener(new PaintListener() {
            public void paintControl(PaintEvent e) {
                Image image = IllustratedComposite.this.image;
                if (image == null || image.isDisposed())
                    return;

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.