Package org.eclipse.swt.graphics

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


      if (image != null)
        size.x += GAP;
    } else {
      size.y = Math.max(size.y, gc.getFontMetrics().getHeight());
    }
    gc.dispose();

    return size;
  }

  @Override
View Full Code Here


        drawGradient(gc, clArea);

        /* Fix Region Shape */
        fixRegion(gc, clArea);

        gc.dispose();

        titleCircle.setBackgroundImage(fTitleBgImage);

        if (oldBgImage != null)
          oldBgImage.dispose();
View Full Code Here

        drawGradient(gc, clArea);

        /* Fix Region Shape */
        fixRegion(gc, clArea);

        gc.dispose();

        footerCircle.setBackgroundImage(fFooterBgImage);

        if (oldBgImage != null)
          oldBgImage.dispose();
View Full Code Here

      if (image != null)
        size.x += GAP;
    } else {
      size.y = Math.max(size.y, gc.getFontMetrics().getHeight());
    }
    gc.dispose();

    return size;
  }

  @Override
View Full Code Here

    GC gc = new GC(fNameInput);
    gc.setFont(JFaceResources.getDialogFont());
    FontMetrics fontMetrics = gc.getFontMetrics();
    int entryFieldWidth = Dialog.convertHorizontalDLUsToPixels(fontMetrics, IDialogConstants.ENTRY_FIELD_WIDTH);
    gc.dispose();

    ((GridData) fNameInput.getLayoutData()).widthHint = entryFieldWidth; //Required to avoid large spanning dialog for long Links

    ToolBar generateTitleBar = new ToolBar(nameContainer, SWT.FLAT);
    OwlUI.makeAccessible(generateTitleBar, Messages.NewsFilterDialog_CREATE_NAME_FROM_CONDITIONS);
View Full Code Here

    gc.drawLine(size - 2 - off, 0 + off, 0 + off, size - 2 - off);
    /*
     * gc.drawLine(1, 0, size-2, 0); gc.drawLine(1, size-1, size-2, size-1);
     * gc.drawLine(0, 1, 0, size-2); gc.drawLine(size-1, 1, size-1, size-2);
     */
    gc.dispose();
    return image;
  }
}
View Full Code Here

        Image image = new Image(Display.getCurrent(), MISSING_IMAGE_SIZE, MISSING_IMAGE_SIZE);
        //
        GC gc = new GC(image);
        gc.setBackground(getColor(SWT.COLOR_RED));
        gc.fillRectangle(0, 0, MISSING_IMAGE_SIZE, MISSING_IMAGE_SIZE);
        gc.dispose();
        //
        return image;
    }

View Full Code Here

        }
        buffer = new Image(topshell.getDisplay(),
                c.getBounds().width, c.getBounds().height);
        GC bufferGC = new GC(buffer);
        paint(bufferGC);
        bufferGC.dispose();
    }
    /**
     * Here is the painting implemented. Each rectangle will be painted
     * one after the other.
     * @param g is the GraphicContext
View Full Code Here

        }
        buffer = new Image(topshell.getDisplay(),
                c.getBounds().width, c.getBounds().height);
        GC bufferGC = new GC(buffer);
        paint(bufferGC);
        bufferGC.dispose();
    }
    /**
     * Here is the painting implemented. Each rectangle will be painted
     * one after the other.
     * @param g is the GraphicContext
View Full Code Here

//                Location nn = mapInstance.nearestNeighbor(x, y);
//                if (! nn.getDocument().equals(makeRed)) continue;
//                gc.drawPoint(x, y);
//            }
//        }
        gc.dispose();
       
//        Location mpp = getLocation(mapInstance, "MapPerProject");
//        Location dda = getLocation(mapInstance, "ColorDropDownAction");       
//        System.out.println("Distance to MapPerProject: " +  Math.sqrt(Math.pow(575 - mpp.px, 2) + Math.pow(500 - mpp.py, 2)));
//        System.out.println("Distance to ColorDropDownAction: " + Math.sqrt(Math.pow(575 - dda.px, 2) + Math.pow(500 - dda.py, 2)));
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.