Examples of PaintListener


Examples of org.eclipse.swt.events.PaintListener

    Font font = canvas.getFont();
    FontData[] fdata = font.getFontData();
    fdata[0].setHeight(Constants.isOSX ? 9 : 7);
    textFont = new Font(display, fdata);

    canvas.addPaintListener(new PaintListener() {
      public void paintControl(PaintEvent event) {
        if (current == null) {
          return;
        }
        Rectangle imgBounds = current.getBounds();
View Full Code Here

Examples of org.eclipse.swt.events.PaintListener

    sc.getVerticalBar().setIncrement(BLOCK_SIZE);

    pieceInfoCanvas = new Canvas(sc, SWT.NO_REDRAW_RESIZE | SWT.NO_BACKGROUND);
    gridData = new GridData(GridData.FILL, SWT.DEFAULT, true, false);
    pieceInfoCanvas.setLayoutData(gridData);
    pieceInfoCanvas.addPaintListener(new PaintListener() {
      public void paintControl(PaintEvent e) {
        if (e.width <= 0 || e.height <= 0)
          return;
        try {
          Rectangle bounds = (img == null) ? null : img.getBounds();
View Full Code Here

Examples of org.eclipse.swt.events.PaintListener

    titleLabel.addMouseListener(interceptor);

    /*
     * Listens to the paint event and do the drawing here
     */
    addPaintListener(new PaintListener() {
      public void paintControl(PaintEvent e) {

        /*
         * The graphic is drawn to the left of the titleLabel so define the offset from the titleLabel
         */
 
View Full Code Here

Examples of org.eclipse.swt.events.PaintListener

    sc.setLayoutData(gridData);

    fileInfoCanvas = new Canvas(sc, SWT.NO_REDRAW_RESIZE | SWT.NO_BACKGROUND);
    gridData = new GridData(GridData.FILL, SWT.DEFAULT, true, false);
    fileInfoCanvas.setLayoutData(gridData);
    fileInfoCanvas.addPaintListener(new PaintListener() {
      public void paintControl(PaintEvent e) {
        if (e.width <= 0 || e.height <= 0)
          return;
        try {
          Rectangle bounds = (img == null) ? null : img.getBounds();
View Full Code Here

Examples of org.eclipse.swt.events.PaintListener

            {
              return( new Point(spinBounds.width, spinBounds.height));
            }
          };
         
          canvas.addPaintListener(new PaintListener() {
            public void paintControl(PaintEvent e) {
              e.gc.drawImage(spinImages[curSpinIndex ], 0, 0);
            }
          });
         
View Full Code Here

Examples of org.eclipse.swt.events.PaintListener

      _btnBrowseDisconnectionScript.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
        handleBrowseDisconnectionScript();
      }
    });     
      _txtDisconnectionScript.addPaintListener(new PaintListener() {

      public void paintControl(PaintEvent e) {
        _btnBrowseDisconnectionScript.setEnabled(_txtDisconnectionScript.isEnabled());       
      }
       
View Full Code Here

Examples of org.eclipse.swt.events.PaintListener

          setAlpha(ALPHA_FOCUS);
        }
      }
    });
   
    drawCanvas.addPaintListener(new PaintListener() {
      public void paintControl(PaintEvent e) {
        if (bufferImage != null && !bufferImage.isDisposed()) {
          Rectangle bounds = bufferImage.getBounds();
          if (bounds.width >= e.width && bounds.height >= e.height) {
            if (alpha != 255) {
View Full Code Here

Examples of org.eclipse.swt.events.PaintListener

    try {
      soWait = getSkinObject("library-wait");
      soWaitProgress = getSkinObject("library-wait-progress");
      soWaitTask = (SWTSkinObjectText) getSkinObject("library-wait-task");
      if (soWaitProgress != null) {
        soWaitProgress.getControl().addPaintListener(new PaintListener() {
          public void paintControl(PaintEvent e) {
            Control c = (Control) e.widget;
            Point size = c.getSize();
            e.gc.setBackground(ColorCache.getColor(e.display, "#23a7df"));
            int breakX = size.x * waitProgress / 100;
View Full Code Here

Examples of org.eclipse.swt.events.PaintListener

      }
    });

    sBorder = properties.getStringValue(sConfigID + ".border", (String) null);
    if (sBorder != null) {
      sash.addPaintListener(new PaintListener() {
        public void paintControl(PaintEvent e) {
          e.gc.setForeground(e.gc.getDevice().getSystemColor(
              SWT.COLOR_WIDGET_NORMAL_SHADOW));
          Point size = sash.getSize();
          if (bVertical) {
View Full Code Here

Examples of org.eclipse.swt.events.PaintListener

    Shell shell = new Shell(display, SWT.DIALOG_TRIM);
    shell.setLayout(new FillLayout());

    Composite c = new Composite(shell, SWT.BORDER);
    c.setLayout(new FillLayout());
    c.addPaintListener(new PaintListener() {
      public void paintControl(PaintEvent e) {
        e.gc.drawLine(0, 0, 100, 50);
      }
    });
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.