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
FieldsModifier and TypeFieldDescriptionstatic final intValue to indicate this dimension is not set. -
Method Summary
Modifier and TypeMethodDescriptionvoidadjustCroppingParam(CmsCroppingParamBean croppingParam) Adjust the given cropping parameter bean to this format restriction.intgetHeight(int orgHeight, int orgWidth) Returns the preset height for this format restriction.getLabel()Returns the label for the format.getName()Returns the format name.intgetWidth(int orgHeight, int orgWidth) Returns the preset width for this format restriction.booleanReturns if this format allows cropping.booleanReturns if this format has a fixed height/width ratio.booleanReturns if height is editable.booleanReturns if width is editable.booleanmatchesCroppingParam(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:
trueif cropping is allowed
-
isFixedRatio
boolean isFixedRatio()Returns if this format has a fixed height/width ratio.- Returns:
trueif the ratio is fixed
-
isHeightEditable
boolean isHeightEditable()Returns if height is editable.- Returns:
trueif height is editable
-
isWidthEditable
boolean isWidthEditable()Returns if width is editable.- Returns:
trueif width is editable
-
matchesCroppingParam
Checks whether the given cropping parameter matches these restrictions.- Parameters:
croppingParam- the cropping parameter to match- Returns:
trueif the restrictions are matched by the given cropping parameter
-