Interface I_CmsFormatRestriction
- All Known Implementing Classes:
CmsFreeFormatRestriction
,CmsImageFormatRestriction
,CmsOriginalFormatRestriction
,CmsUserFormatRestriction
public interface I_CmsFormatRestriction
Image format restriction. To be used within the image format tab of the image preview.
- Since:
- 8.0.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Value to indicate this dimension is not set. -
Method Summary
Modifier and TypeMethodDescriptionvoid
adjustCroppingParam
(CmsCroppingParamBean croppingParam) Adjust the given cropping parameter bean to this format restriction.int
getHeight
(int orgHeight, int orgWidth) Returns the preset height for this format restriction.getLabel()
Returns the label for the format.getName()
Returns the format name.int
getWidth
(int orgHeight, int orgWidth) Returns the preset width for this format restriction.boolean
Returns if this format allows cropping.boolean
Returns if this format has a fixed height/width ratio.boolean
Returns if height is editable.boolean
Returns if width is editable.boolean
matchesCroppingParam
(CmsCroppingParamBean croppingParam) Checks whether the given cropping parameter matches these restrictions.
-
Field Details
-
DIMENSION_NOT_SET
Value to indicate this dimension is not set.- See Also:
-
-
Method Details
-
adjustCroppingParam
Adjust the given cropping parameter bean to this format restriction.Execute on selection of this restriction.
- Parameters:
croppingParam
- the cropping parameter bean to adjust
-
getHeight
Returns the preset height for this format restriction.- Parameters:
orgHeight
- the original image heightorgWidth
- the original image width- Returns:
- the height
-
getLabel
Returns the label for the format.- Returns:
- the label
-
getName
Returns the format name.- Returns:
- the format name
-
getWidth
Returns the preset width for this format restriction.- Parameters:
orgHeight
- the original image heightorgWidth
- the original image width- Returns:
- the width
-
isCroppingEnabled
boolean isCroppingEnabled()Returns if this format allows cropping.- Returns:
true
if cropping is allowed
-
isFixedRatio
boolean isFixedRatio()Returns if this format has a fixed height/width ratio.- Returns:
true
if the ratio is fixed
-
isHeightEditable
boolean isHeightEditable()Returns if height is editable.- Returns:
true
if height is editable
-
isWidthEditable
boolean isWidthEditable()Returns if width is editable.- Returns:
true
if width is editable
-
matchesCroppingParam
Checks whether the given cropping parameter matches these restrictions.- Parameters:
croppingParam
- the cropping parameter to match- Returns:
true
if the restrictions are matched by the given cropping parameter
-