@Override
    public void init() {

        if (CmsImageLoader.isEnabled()) {
            try {
                //reads the optional parameters for the gallery from the XML configuration
                I_CmsResourceType type = OpenCms.getResourceManager().getResourceType(GALLERYTYPE_NAME);
                if (type instanceof CmsResourceTypeFolderExtended) {
                    m_galleryTypeParams = ((CmsResourceTypeFolderExtended)type).getFolderClassParams();
                } else {
                    m_galleryTypeParams = null;
                }
            } catch (CmsLoaderException e) {
                if (LOG.isErrorEnabled()) {
                    LOG.error(e.getLocalizedMessage(), e);
                }
            }
            m_defaultScaleParams = new CmsImageScaler(m_galleryTypeParams);
            if (!m_defaultScaleParams.isValid()) {
                // no valid parameters have been provided, use defaults
                m_defaultScaleParams.setType(0);
                m_defaultScaleParams.setPosition(0);
                m_defaultScaleParams.setWidth(120);
                m_defaultScaleParams.setHeight(90);
                m_defaultScaleParams.setColor(new Color(221, 221, 221));
            }
        } else {
            m_defaultScaleParams = null;
        }
    }
@ Override public void init ( ) { if ( CmsImageLoader . isEnabled ( ) ) { try { I_CmsResourceType type = OpenCms . getResourceManager ( ) . getResourceType ( GALLERYTYPE_NAME ) ; if ( type instanceof CmsResourceTypeFolderExtended ) { m_galleryTypeParams = ( ( CmsResourceTypeFolderExtended ) type ) . getFolderClassParams ( ) ; } else { m_galleryTypeParams = null ; } } catch ( CmsLoaderException e ) { if ( LOG . isErrorEnabled ( ) ) { LOG . error ( e . getLocalizedMessage ( ) , e ) ; } } m_defaultScaleParams = new CmsImageScaler ( m_galleryTypeParams ) ; if ( ! m_defaultScaleParams . isValid ( ) ) { m_defaultScaleParams . setType ( 0 ) ; m_defaultScaleParams . setPosition ( 0 ) ; m_defaultScaleParams . setWidth ( 120 ) ; m_defaultScaleParams . setHeight ( 90 ) ; m_defaultScaleParams . setColor ( new Color ( 221 , 221 , 221 ) ) ; } } else { m_defaultScaleParams = null ; } }
Initializes the default image scaling parameters for the gallery preview.<p>

@see org.opencms.workplace.galleries.A_CmsAjaxGallery#init()