Interface Resolution
public interface Resolution
Picture resolution
- Since:
- 2.3
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the technical description of this resolution@Nullable String
getDescription
(Language language) Get the editorial description of this resolution for the given language ornull
if not defined for the language@Nullable String
getDisplayName
(Language language) Gets display name of the resolution for the given language.int
Gets the height of the resolutionboolean
Returnstrue
if aspect ratio of the original resolution should be kept,false
otherwise (default)getTags()
Get the tags of this resolution.getUid()
Returns the unique identifier of this resolution.int
getWidth()
Gets the width of the resolutionboolean
Returnstrue
if this resolution is the original resolutionboolean
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 languagevoid
setDescription
(String description) Sets the technical description of the resolutionvoid
setDisplayName
(Language language, String displayName) Sets the display name of the resolution for the given languagevoid
setHeight
(int height) Sets the height of the resolutionvoid
setKeepAspectRatio
(boolean value) Providetrue
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
Name of the original resolution.- Since:
- 4.0.19
- See Also:
-
PREVIEW_RES_NAME
Name of the preview resolution.- Since:
- 4.0.19
- See Also:
-
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
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.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
Sets the display name of the resolution for the given language- Parameters:
displayName
- the new displaynamelanguage
- 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
Get the editorial description of this resolution for the given language ornull
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
Sets the technical description of the resolution- Parameters:
description
- the new description- Since:
- 2.3
-
setDescription
Sets the editorial description of the resolution for the given language- Parameters:
description
- the new descriptionlanguage
- 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()Returnstrue
if this resolution is the original resolution- Returns:
true
if it is the original resolution,false
otherwise- Since:
- 2.3
-
getKeepAspectRatio
boolean getKeepAspectRatio()Returnstrue
if aspect ratio of the original resolution should be kept,false
otherwise (default)- Since:
- 4.0.90
-
setKeepAspectRatio
void setKeepAspectRatio(boolean value) Providetrue
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 returnsfalse
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
Get the tags of this resolution. If this resolution is the original resolution, theTAG_SMART_CROPPING
tag is never included.- Returns:
- An unmodifiable set of all tags for this resolution.
- Since:
- 5.2.210803
-
setTags
Set the tags for this resolution. If this resolution is the original resolution, aTAG_SMART_CROPPING
tag is ignored and not set.- Parameters:
tags
- One or more tags which apply to this resolution.- Since:
- 5.2.210803
-