Examples of ImageCache


Examples of com.seaglasslookandfeel.util.ImageCache

     * @param  extendedCacheKeys extended cache keys.
     *
     * @return the new image.
     */
    private VolatileImage getImage(GraphicsConfiguration config, JComponent c, int w, int h, Object[] extendedCacheKeys) {
        ImageCache imageCache = ImageCache.getInstance();

        // get the buffer for this component
        VolatileImage buffer = (VolatileImage) imageCache.getImage(config, w, h, this, extendedCacheKeys);

        int renderCounter = 0; // to avoid any potential, though unlikely,

        // infinite loop
        do {

            // validate the buffer so we can check for surface loss
            int bufferStatus = VolatileImage.IMAGE_INCOMPATIBLE;

            if (buffer != null) {
                bufferStatus = buffer.validate(config);
            }

            // If the buffer status is incompatible or restored, then we need to
            // re-render to the volatile image
            if (bufferStatus == VolatileImage.IMAGE_INCOMPATIBLE || bufferStatus == VolatileImage.IMAGE_RESTORED) {

                // if the buffer is null (hasn't been created), or isn't the
                // right size, or has lost its contents,
                // then recreate the buffer
                if (buffer == null || buffer.getWidth() != w || buffer.getHeight() != h
                        || bufferStatus == VolatileImage.IMAGE_INCOMPATIBLE) {

                    // clear any resources related to the old back buffer
                    if (buffer != null) {
                        buffer.flush();
                        buffer = null;
                    }

                    // recreate the buffer
                    buffer = config.createCompatibleVolatileImage(w, h, Transparency.TRANSLUCENT);

                    // put in cache for future
                    imageCache.setImage(buffer, config, w, h, this, extendedCacheKeys);
                }

                // create the graphics context with which to paint to the buffer
                Graphics2D bg = buffer.createGraphics();

View Full Code Here

Examples of com.subgraph.vega.ui.util.images.ImageCache

  private Set<String> excludedParameterNames;
  private String targetFieldString;

  public NewScanWizard(String target, Collection<IIdentity> identities, List<IScannerModule> modules, Set<String> defaultExcludeParameters) {
    final IModel model = Activator.getDefault().getModel();
    imageCache = new ImageCache(Activator.PLUGIN_ID);
    final ImageDescriptor logo = ImageDescriptor.createFromImage(imageCache.get(VEGA_LOGO));
   
    targetPage = new NewScanTargetPage(model.getCurrentWorkspace(), target);
    targetPage.setImageDescriptor(logo);
   
View Full Code Here

Examples of com.subgraph.vega.ui.util.images.ImageCache

 
  public RequestResponseViewer(SashForm parentForm) {
    super(parentForm, SWT.NONE);
    setLayout(new FormLayout());
    this.parentForm = parentForm;
    imageCache = new ImageCache(Activator.PLUGIN_ID);
    optionsMenu = createOptionsMenu(parentForm.getShell());
    toolbarComposite = createToolbarComposite(this);

    FormData fd = new FormData();
    fd.left = new FormAttachment(0);
View Full Code Here

Examples of limelight.ui.model.ImageCache

        // TODO MDM - getting a NullPointer here. The Panel was removed from the scene in between the start of the paint cycle and here.
        if(rootPanel == null)
          return;

        ImageCache cache = rootPanel.getImageCache();
        Image image = cache.getImage(backgroundImageAttribute.getAttribute().getValue());
        Graphics2D borderedGraphics = (Graphics2D) graphics.create(borderFrame.x, borderFrame.y, borderFrame.width, borderFrame.height);
        style.getCompiledBackgroundImageFillStrategy().fill(borderedGraphics, image, style.getCompiledBackgroundImageX(), style.getCompiledBackgroundImageY());
      }
      catch (IOException e)
      {
View Full Code Here

Examples of org.evolizer.core.ui.util.ImageCache

    @Override
    public void start(BundleContext context) throws Exception {
        super.start(context);
        configure();
       
        imageCache = new ImageCache();
    }
View Full Code Here

Examples of org.locationtech.udig.ui.ImageCache

    protected ImageCache imageCache;
    protected OverlayCache overlayCache;

    public ServiceDecorator() {
        overlayCache = new OverlayCache();
        imageCache = new ImageCache();
    }
View Full Code Here

Examples of org.python.pydev.core.bundle.ImageCache

    /**
     * @return the image for some debug element
     */
    public Image getImage(Object element) {
        ImageCache imageCache = PydevDebugPlugin.getImageCache();

        if (element instanceof PyBreakpoint) {
            try {
                PyBreakpoint pyBreakpoint = (PyBreakpoint) element;

                if ((pyBreakpoint).isEnabled())
                    if (pyBreakpoint.isConditionEnabled()) {
                        return imageCache.get("icons/breakmarker_conditional.gif");
                    } else {
                        return imageCache.get("icons/breakmarker.gif");
                    }

                else if (pyBreakpoint.isConditionEnabled()) {
                    return imageCache.get("icons/breakmarker_gray_conditional.gif");
                } else {
                    return imageCache.get("icons/breakmarker_gray.gif");
                }

            } catch (CoreException e) {
                PydevDebugPlugin.log(IStatus.ERROR, "getImage error", e);
            }

        } else if (element instanceof PyVariableCollection) {
            return imageCache.get("icons/greendot_big.gif");

        } else if (element instanceof PyVariable) {
            return imageCache.get("icons/greendot.gif");

        } else if (element instanceof PyDebugTarget || element instanceof PyThread || element instanceof PyStackFrame) {
            return null;
        }

View Full Code Here

Examples of org.python.pydev.core.bundle.ImageCache

public class DontAnalyzeFileMarkerParticipant implements IAssistProps {

    private Image annotationImage;

    public DontAnalyzeFileMarkerParticipant() {
        ImageCache analysisImageCache = PydevPlugin.getImageCache();
        annotationImage = analysisImageCache.get(UIConstants.ASSIST_ANNOTATION);
    }
View Full Code Here

Examples of org.python.pydev.core.bundle.ImageCache

        int end = start + markerAnnotation.position.length;
        ps.setSelection(start, end);
        String markerContents = ps.getSelectedText();
        String fullRep = ps.getFullRepAfterSelection();

        ImageCache imageCache = PydevPlugin.getImageCache();
        Image packageImage = null;
        if (imageCache != null) { //making tests
            packageImage = imageCache.get(UIConstants.COMPLETION_PACKAGE_ICON);
        }
        IModulesManager projectModulesManager = astManager.getModulesManager();
        Set<String> allModules = projectModulesManager.getAllModuleNames(true, markerContents.toLowerCase());

        //when an undefined variable is found, we can:
View Full Code Here

Examples of org.python.pydev.core.bundle.ImageCache

    /**
     * Only for tests.
     */
    /*default*/IgnoreErrorParticipant(FormatStd format) {
        ImageCache analysisImageCache = PydevPlugin.getImageCache();
        annotationImage = analysisImageCache.get(UIConstants.ASSIST_ANNOTATION);
        this.format = format;
    }
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.