Interface I_CmsFormatRestriction

    • Method Detail

      • adjustCroppingParam

        void adjustCroppingParam​(CmsCroppingParamBean croppingParam)
        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

        int getHeight​(int orgHeight,
                      int orgWidth)
        Returns the preset height for this format restriction.

        Parameters:
        orgHeight - the original image height
        orgWidth - the original image width
        Returns:
        the height
      • getLabel

        java.lang.String getLabel()
        Returns the label for the format.

        Returns:
        the label
      • getName

        java.lang.String getName()
        Returns the format name.

        Returns:
        the format name
      • getWidth

        int getWidth​(int orgHeight,
                     int orgWidth)
        Returns the preset width for this format restriction.

        Parameters:
        orgHeight - the original image height
        orgWidth - 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

        boolean matchesCroppingParam​(CmsCroppingParamBean croppingParam)
        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