Interface Resolution
public interface Resolution
Picture resolution
- Since:
- 2.3
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionGet the technical description of this resolution@Nullable StringgetDescription(Language language) Get the editorial description of this resolution for the given language ornullif not defined for the language@Nullable StringgetDisplayName(Language language) Gets display name of the resolution for the given language.intGets the height of the resolutionbooleanReturnstrueif aspect ratio of the original resolution should be kept,falseotherwise (default)getTags()Get the tags of this resolution.getUid()Returns the unique identifier of this resolution.intgetWidth()Gets the width of the resolutionbooleanReturnstrueif this resolution is the original resolutionbooleanReturns whether or not this resolution is intended for smart cropping (enabled by default).voidsetDescription(Language language, String description) Sets the editorial description of the resolution for the given languagevoidsetDescription(String description) Sets the technical description of the resolutionvoidsetDisplayName(Language language, String displayName) Sets the display name of the resolution for the given languagevoidsetHeight(int height) Sets the height of the resolutionvoidsetKeepAspectRatio(boolean value) Providetrueif aspect ratio of the original resolution should be kept,falseotherwise (default)voidsetSmartCropping(boolean value) Configures whether or not this resolution is intended for smart cropping (enabled by default).voidsetTags(@NotNull Collection<String> tags) Set the tags for this resolution.voidDeprecated.since 5.0.18 - remove resolution from project and create new instance instead.voidsetWidth(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
nullif 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 ornullif not defined for the language- Parameters:
language- the language to get the description for- Returns:
- the description for the given language if defined,
nullotherwise - 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()Returnstrueif this resolution is the original resolution- Returns:
trueif it is the original resolution,falseotherwise- Since:
- 2.3
-
getKeepAspectRatio
boolean getKeepAspectRatio()Returnstrueif aspect ratio of the original resolution should be kept,falseotherwise (default)- Since:
- 4.0.90
-
setKeepAspectRatio
void setKeepAspectRatio(boolean value) Providetrueif aspect ratio of the original resolution should be kept,falseotherwise (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 returnsfalsefor the original resolution.- Returns:
truefor smart cropping,falseotherwise.- 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-truefor smart cropping,falseotherwise.- Since:
- 5.2.200705
-
getTags
Get the tags of this resolution. If this resolution is the original resolution, theTAG_SMART_CROPPINGtag 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_CROPPINGtag is ignored and not set.- Parameters:
tags- One or more tags which apply to this resolution.- Since:
- 5.2.210803
-