Class ImageParameter
java.lang.Object
org.ametys.skinfactory.parameters.AbstractSkinParameter
org.ametys.skinfactory.parameters.ImageParameter
Implementation of
AbstractSkinParameter
for an image-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Class representing a file valueNested classes/interfaces inherited from class org.ametys.skinfactory.parameters.AbstractSkinParameter
AbstractSkinParameter.SkinParameterType, AbstractSkinParameter.Widget
-
Constructor Summary
ConstructorDescriptionImageParameter
(String relPath, I18nizableText label, I18nizableText description) ConstructorImageParameter
(String relPath, I18nizableText label, I18nizableText description, String iconGlyph, String iconSmall, String iconLarge) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
Apply parameter to the skingetDefaultValue
(SkinModel model) Get the default valuegetDefaultValue
(SkinModel model, String lang) Get the default valueGet the CSS iconGet the large iconGet the small iconGet relative path of imagesgetType()
Get typeboolean
Determines if local upload is enabledvoid
setIconGlyph
(String iconGlyph) Set the CSS iconvoid
setIconLarge
(String iconLarge) Set the large icon relative pathvoid
setIconSmall
(String iconSmall) Set the small icon relative pathTransform the parameter into a JSON objectvoid
toSAX
(ContentHandler contentHandler, String modelName) SAX the parameterMethods inherited from class org.ametys.skinfactory.parameters.AbstractSkinParameter
getDescription, getId, getLabel, setDescription, setLabel
-
Constructor Details
-
ImageParameter
Constructor- Parameters:
relPath
- the relative path of the target imagelabel
- the labeldescription
- the description
-
ImageParameter
public ImageParameter(String relPath, I18nizableText label, I18nizableText description, String iconGlyph, String iconSmall, String iconLarge) Constructor- Parameters:
relPath
- the relative path of the target imagelabel
- the labeldescription
- the descriptioniconGlyph
- The CSS classe for icon, to use instead of small and large iconiconSmall
- The small iconiconLarge
- The large icon
-
-
Method Details
-
getType
Description copied from class:AbstractSkinParameter
Get type- Specified by:
getType
in classAbstractSkinParameter
- Returns:
- The type
-
isLocalUploadEnabled
Determines if local upload is enabled- Returns:
- true if local upload is enabled
-
getLibraryPath
Get relative path of images- Returns:
- the relative path of images
-
setIconGlyph
Set the CSS icon- Parameters:
iconGlyph
- the CSS icon
-
getIconGlyph
Get the CSS icon- Returns:
- The CSS icon
-
setIconSmall
Set the small icon relative path- Parameters:
iconSmall
- the relative path of the small icon
-
getIconSmall
Get the small icon- Returns:
- The small icon
-
setIconLarge
Set the large icon relative path- Parameters:
iconLarge
- the relative path of the large icon
-
getIconLarge
Get the large icon- Returns:
- The large icon
-
apply
Description copied from class:AbstractSkinParameter
Apply parameter to the skin- Specified by:
apply
in classAbstractSkinParameter
- Parameters:
tempDir
- the work directorymodelDir
- the model directoryvalue
- the valuelang
- The language. Can be null.
-
toSAX
Description copied from class:AbstractSkinParameter
SAX the parameter- Specified by:
toSAX
in classAbstractSkinParameter
- Parameters:
contentHandler
- The content handler to SAX intomodelName
- The model name- Throws:
SAXException
- if an error occurred while SAXing
-
toJson
Description copied from class:AbstractSkinParameter
Transform the parameter into a JSON object- Specified by:
toJson
in classAbstractSkinParameter
- Parameters:
modelName
- The model name- Returns:
- The JSON representation of the parameter
-
getDefaultValue
Description copied from class:AbstractSkinParameter
Get the default value- Specified by:
getDefaultValue
in classAbstractSkinParameter
- Parameters:
model
- The model- Returns:
- The default value
-
getDefaultValue
Description copied from class:AbstractSkinParameter
Get the default value- Specified by:
getDefaultValue
in classAbstractSkinParameter
- Parameters:
model
- The modellang
- The language- Returns:
- The default value
-