Class CmsFreeFormatRestriction
java.lang.Object
org.opencms.ade.galleries.client.preview.CmsFreeFormatRestriction
- All Implemented Interfaces:
- I_CmsFormatRestriction
Free image format restriction. To be used within the image format tab of the image preview.
- Since:
- 8.0.0
- 
Field SummaryFields inherited from interface org.opencms.ade.galleries.client.preview.I_CmsFormatRestrictionDIMENSION_NOT_SET
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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.
- 
Constructor Details- 
CmsFreeFormatRestrictionConstructor.- Parameters:
- name- the format name
- label- the format label
 
 
- 
- 
Method Details- 
adjustCroppingParamDescription copied from interface:I_CmsFormatRestrictionAdjust the given cropping parameter bean to this format restriction.Execute on selection of this restriction. - Specified by:
- adjustCroppingParamin interface- I_CmsFormatRestriction
- Parameters:
- croppingParam- the cropping parameter bean to adjust
- See Also:
 
- 
getHeightDescription copied from interface:I_CmsFormatRestrictionReturns the preset height for this format restriction.- Specified by:
- getHeightin interface- I_CmsFormatRestriction
- Parameters:
- orgHeight- the original image height
- orgWidth- the original image width
- Returns:
- the height
- See Also:
 
- 
getLabelDescription copied from interface:I_CmsFormatRestrictionReturns the label for the format.- Specified by:
- getLabelin interface- I_CmsFormatRestriction
- Returns:
- the label
- See Also:
 
- 
getNameDescription copied from interface:I_CmsFormatRestrictionReturns the format name.- Specified by:
- getNamein interface- I_CmsFormatRestriction
- Returns:
- the format name
- See Also:
 
- 
getWidthDescription copied from interface:I_CmsFormatRestrictionReturns the preset width for this format restriction.- Specified by:
- getWidthin interface- I_CmsFormatRestriction
- Parameters:
- orgHeight- the original image height
- orgWidth- the original image width
- Returns:
- the width
- See Also:
 
- 
isCroppingEnabledDescription copied from interface:I_CmsFormatRestrictionReturns if this format allows cropping.- Specified by:
- isCroppingEnabledin interface- I_CmsFormatRestriction
- Returns:
- trueif cropping is allowed
- See Also:
 
- 
isFixedRatioDescription copied from interface:I_CmsFormatRestrictionReturns if this format has a fixed height/width ratio.- Specified by:
- isFixedRatioin interface- I_CmsFormatRestriction
- Returns:
- trueif the ratio is fixed
- See Also:
 
- 
isHeightEditableDescription copied from interface:I_CmsFormatRestrictionReturns if height is editable.- Specified by:
- isHeightEditablein interface- I_CmsFormatRestriction
- Returns:
- trueif height is editable
- See Also:
 
- 
isWidthEditableDescription copied from interface:I_CmsFormatRestrictionReturns if width is editable.- Specified by:
- isWidthEditablein interface- I_CmsFormatRestriction
- Returns:
- trueif width is editable
- See Also:
 
- 
matchesCroppingParamDescription copied from interface:I_CmsFormatRestrictionChecks whether the given cropping parameter matches these restrictions.- Specified by:
- matchesCroppingParamin interface- I_CmsFormatRestriction
- Parameters:
- croppingParam- the cropping parameter to match
- Returns:
- trueif the restrictions are matched by the given cropping parameter
- See Also:
 
 
-