Interface Resolution


public interface Resolution
Picture resolution
Since:
2.3
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Name of the original resolution.
    static final String
    Name of the preview resolution.
    static final String
    Tag used for smart cropping resolutions.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the technical description of this resolution
    @Nullable String
    Get the editorial description of this resolution for the given language or null if not defined for the language
    @Nullable String
    Gets display name of the resolution for the given language.
    int
    Gets the height of the resolution
    boolean
    Returns true if aspect ratio of the original resolution should be kept, false otherwise (default)
    @NotNull Set<String>
    Get the tags of this resolution.
    Returns the unique identifier of this resolution.
    int
    Gets the width of the resolution
    boolean
    Returns true if this resolution is the original resolution
    boolean
    Returns whether or not this resolution is intended for smart cropping (enabled by default).
    void
    setDescription(Language language, String description)
    Sets the editorial description of the resolution for the given language
    void
    setDescription(String description)
    Sets the technical description of the resolution
    void
    setDisplayName(Language language, String displayName)
    Sets the display name of the resolution for the given language
    void
    setHeight(int height)
    Sets the height of the resolution
    void
    setKeepAspectRatio(boolean value)
    Provide true if aspect ratio of the original resolution should be kept, false otherwise (default)
    void
    setSmartCropping(boolean value)
    Configures whether or not this resolution is intended for smart cropping (enabled by default).
    void
    setTags(@NotNull Collection<String> tags)
    Set the tags for this resolution.
    void
    Deprecated.
    since 5.0.18 - remove resolution from project and create new instance instead.
    void
    setWidth(int width)
    Sets the width of the resolution
  • Field Details

    • ORIGINAL_RESOLUTION_NAME

      static final String ORIGINAL_RESOLUTION_NAME
      Name of the original resolution.
      Since:
      4.0.19
      See Also:
    • PREVIEW_RES_NAME

      static final String PREVIEW_RES_NAME
      Name of the preview resolution.
      Since:
      4.0.19
      See Also:
    • TAG_SMART_CROPPING

      static final String TAG_SMART_CROPPING
      Tag used for smart cropping resolutions.
      Since:
      5.2.210803
      See Also:
  • Method Details

    • getUid

      String getUid()
      Returns the unique identifier of this resolution.
      Returns:
      the uid of the resolution
      Since:
      4.2.12
      See Also:
    • getDisplayName

      @Nullable @Nullable String getDisplayName(Language language)
      Gets display name of the resolution for the given language.
      Parameters:
      language - Language for which the display name is requested.
      Returns:
      the display name or null if not defined
      Since:
      4.2.10
    • setUid

      @Deprecated void setUid(String uid)
      Deprecated.
      since 5.0.18 - remove resolution from project and create new instance instead.
      Do not change uid of resolution. Remove resolution from project and create new instance instead.
      Parameters:
      uid - new uid
      Since:
      4.2.12
      See Also:
    • setDisplayName

      void setDisplayName(Language language, String displayName)
      Sets the display name of the resolution for the given language
      Parameters:
      displayName - the new displayname
      language - the language to set the display name for
      Since:
      4.2.10
    • getDescription

      String getDescription()
      Get the technical description of this resolution
      Returns:
      the technical description
      Since:
      2.3
    • getDescription

      @Nullable @Nullable String getDescription(Language language)
      Get the editorial description of this resolution for the given language or null if not defined for the language
      Parameters:
      language - the language to get the description for
      Returns:
      the description for the given language if defined, null otherwise
      Since:
      4.2.10
    • setDescription

      void setDescription(String description)
      Sets the technical description of the resolution
      Parameters:
      description - the new description
      Since:
      2.3
    • setDescription

      void setDescription(Language language, String description)
      Sets the editorial description of the resolution for the given language
      Parameters:
      description - the new description
      language - the language to set the description for
      Since:
      4.2.10
    • getHeight

      int getHeight()
      Gets the height of the resolution
      Returns:
      the height value
      Since:
      2.3
    • setHeight

      void setHeight(int height)
      Sets the height of the resolution
      Parameters:
      height - the new height value
      Since:
      2.3
    • getWidth

      int getWidth()
      Gets the width of the resolution
      Returns:
      the width value
      Since:
      2.3
    • setWidth

      void setWidth(int width)
      Sets the width of the resolution
      Parameters:
      width - the new width value
      Since:
      2.3
    • isOriginal

      boolean isOriginal()
      Returns true if this resolution is the original resolution
      Returns:
      true if it is the original resolution, false otherwise
      Since:
      2.3
    • getKeepAspectRatio

      boolean getKeepAspectRatio()
      Returns true if aspect ratio of the original resolution should be kept, false otherwise (default)
      Since:
      4.0.90
    • setKeepAspectRatio

      void setKeepAspectRatio(boolean value)
      Provide true if aspect ratio of the original resolution should be kept, false otherwise (default)
      Parameters:
      value - if true the set width and height of this resolution is used as maximum side length
      Since:
      4.0.90
    • isSmartCropping

      boolean isSmartCropping()
      Returns whether or not this resolution is intended for smart cropping (enabled by default). This method always returns false for the original resolution.
      Returns:
      true for smart cropping, false otherwise.
      Since:
      5.2.200705
    • setSmartCropping

      void setSmartCropping(boolean value)
      Configures whether or not this resolution is intended for smart cropping (enabled by default). This method does nothing if called on the original resolution.
      Parameters:
      value - true for smart cropping, false otherwise.
      Since:
      5.2.200705
    • getTags

      @NotNull @NotNull Set<String> getTags()
      Get the tags of this resolution. If this resolution is the original resolution, the TAG_SMART_CROPPING tag is never included.
      Returns:
      An unmodifiable set of all tags for this resolution.
      Since:
      5.2.210803
    • setTags

      void setTags(@NotNull @NotNull Collection<String> tags)
      Set the tags for this resolution. If this resolution is the original resolution, a TAG_SMART_CROPPING tag is ignored and not set.
      Parameters:
      tags - One or more tags which apply to this resolution.
      Since:
      5.2.210803