Interface ImageAgent


public interface ImageAgent
Agent providing image containers.
Since:
5.2.5
  • Field Details

  • Method Details

    • getImageFromUrl

      @Contract("null -> null; !null -> !null") @Nullable @Nullable Image<String> getImageFromUrl(@Nullable @Nullable String url)
      Creates an Image container based on the given url pointing to some image. The image URL should be absolute. Non-absolute URLs will be resolved relative to the application directory of the respective client.
      Parameters:
      url - The URL pointing to an image.
      Returns:
      A newly created Image container or null, if url is null.
      Throws:
      UnsupportedOperationException - if the agent's context does not support url based images.
      Since:
      5.2.5
    • getImageFromIcon

      @Contract("null -> null; !null -> !null") @Nullable @Nullable Image<Icon> getImageFromIcon(@Nullable @Nullable Icon icon)
      Creates an Image container based on the given icon object.
      Parameters:
      icon - The icon.
      Returns:
      A newly created Image container or null, if icon is null.
      Throws:
      UnsupportedOperationException - if the agent's context does not support icon based images.
      Since:
      5.2.5
    • getImageFromMedia

      @Contract("null -> null; !null -> !null") @Nullable @Nullable Image<Media> getImageFromMedia(@Nullable @Nullable Media media)
      Creates an Image container based on the given media object.
      Parameters:
      media - The media.
      Returns:
      A newly created Image container or null, if media is null.
      Since:
      5.2.416