Examples of ImageProvider


Examples of com.volantis.mcs.eclipse.controls.images.ImageProvider

     * @param imageFile The file to read image data from
     * @return The image data from the file
     */
    private ImageData getImageData(File imageFile) {
        String extension = IOUtils.getExtension(imageFile);
        ImageProvider provider = (ImageProvider) providers.get(extension);
        ImageData imageData = null;
        if (provider != null) {
            try {
                imageData = provider.provideImage(imageFile);
            } catch (IOException e) {
                LOGGER.error("unexpected-ioexception",
                             e);
            }
        }
View Full Code Here

Examples of net.lenkaspace.creeperDemo.images.ImageProvider

    parameters.trialDuration = 1000;
    parameters.numOfRuns = 1;
    parameters.reportFolderName = "MyReports";
   
    //---- create image provider
    ImageProvider imageProvider = new ImageProvider();
    crController.setImageProvider(imageProvider);
   
    //---- optionally setup new world and renderer size...
    /*World world = new World(crController);
    crController.setWorld(world);
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.image.ImageProvider

  {
    // First, normalize the path to make sure that lookups don't
    // fail due to insignificant path incosistencies.
    realPath = _getCanonicalPath(realPath);

    ImageProvider cache = _sSharedCaches.get(realPath);

    // If we didn't find a shared cache, create a new cache
    // and cache it in the shared cache cache.  :-)
    if (cache == null)
    {
      // Create the new cache
      cache = new FileSystemImageCache(realPath);

      // Before we save the new cache, make sure another thread hasn't
      // already cached a different instance.  Synchronize to lock up
      // _sSharedCaches.
      synchronized (_sSharedCaches)
      {
        ImageProvider tmp = _sSharedCaches.get(realPath);
        if (tmp != null)
        {
          // Stick with tmp
          cache = tmp;
        }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.image.ImageProvider

    {
      if (ImageConstants.TECATE_NAMESPACE == namespace)
      {
        if (ImageConstants.IMAGE_PROVIDER_PROPERTY == key)
        {
          ImageProvider imageProvider = _getDefaultImageProvider();

          setProperty(ImageConstants.TECATE_NAMESPACE,
                      ImageConstants.IMAGE_PROVIDER_PROPERTY,
                      imageProvider);
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.image.ImageProvider

  // Creates a default Tecate's FileSystemImageCache.
  // Uses the web server root and base image uri to determine the
  // location of the default cache
  private ImageProvider _getDefaultImageProvider()
  {
    ImageProvider provider = null;
    Configuration config = getConfiguration();
    try
    {
      // We explicitly avoid using the SHARED_CONTEXT_PATH for the
      // image cache.  That way, we can ensure that each application
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.image.ImageProvider

    UIXRenderingContext context,
    UINode           node
    )
  {
    // First, make sure we have an ImagePRovider
    ImageProvider provider = (ImageProvider)
      context.getProperty(TECATE_NAMESPACE, IMAGE_PROVIDER_PROPERTY);
    if (provider == null)
      return null;

    // Round up all of our properties
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.image.ImageProvider

  public ImageProviderResponse getColorizedIcon(
    UIXRenderingContext context,
    IconKey iconKey
    )
  {
    ImageProvider provider = (ImageProvider)
      context.getProperty(ImageConstants.TECATE_NAMESPACE,
                          ImageConstants.IMAGE_PROVIDER_PROPERTY);

    Icon icon = getIcon(iconKey);
    String iconName = null;

    if ( icon != null )
      iconName = icon.getName();

    if (provider == null)
    {
      if (_LOG.isWarning())
        _LOG.warning("Could not get image provider for icon: " + iconName);

      return null;
    }

    // Get the context and request objects
    ImageContext imageContext = context.getImageContext();
    ImageProviderRequest request = _getIconRequest(context, iconKey);

    // Make the request
    ImageProviderResponse response = provider.getImage(imageContext, request);

    // Log any problems
    if (response == null)
    {
      if (_LOG.isWarning())
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.image.ImageProvider

  public static ImageProviderResponse getFlippedIcon(
    UIXRenderingContext context,
    String           sourceURI
    )
  {
    ImageProvider provider = (ImageProvider)
      context.getProperty(ImageConstants.TECATE_NAMESPACE,
                          ImageConstants.IMAGE_PROVIDER_PROPERTY);

    if (provider == null)
    {
      return null;
    }

    // Get the context and request objects
    ImageContext imageContext = context.getImageContext();
    ImageProviderRequest request = new FlippedIconRequest(
                                  context,
                                  sourceURI);

    // Make the request
    ImageProviderResponse response = provider.getImage(imageContext, request);

    // Log any problems
    if (response == null)
    {
      if (_LOG.isWarning())
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.image.ImageProvider

  public ImageProviderResponse getColorizedIcon(
    UIXRenderingContext context,
    IconKey iconKey
    )
  {
    ImageProvider provider = (ImageProvider)
      context.getProperty(ImageConstants.TECATE_NAMESPACE,
                          ImageConstants.IMAGE_PROVIDER_PROPERTY);

    Icon icon = getIcon(iconKey);
    String iconName = null;

    if ( icon != null )
      iconName = icon.getName();

    if (provider == null)
    {
      if (_LOG.isWarning())
        _LOG.warning("CANNOT_GET_IMAGE_PROVIDER_FOR_ICON", iconName);

      return null;
    }

    // Get the context and request objects
    ImageContext imageContext = context.getImageContext();
    ImageProviderRequest request = _getIconRequest(context, iconKey);

    // Make the request
    ImageProviderResponse response = provider.getImage(imageContext, request);

    // Log any problems
    if (response == null)
    {
      if (_LOG.isWarning())
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.image.ImageProvider

    UIXRenderingContext context,
    UINode           node
    )
  {
    // First, make sure we have an ImagePRovider
    ImageProvider provider = (ImageProvider)
      context.getProperty(TECATE_NAMESPACE, IMAGE_PROVIDER_PROPERTY);
    if (provider == null)
      return null;

    // Round up all of our properties
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.