Class FileSettings
- java.lang.Object
-
- com.jalios.jcms.taglib.settings.BasicSettings<FileSettings>
-
- com.jalios.jcms.taglib.settings.impl.FileSettings
-
- All Implemented Interfaces:
ControlSettings<FileSettings>,java.lang.Cloneable
public class FileSettings extends BasicSettings<FileSettings>
File Settings- Author:
- Nicolas Dos Santos
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFileSettings.FileFilterEnumeration of available file filters.static classFileSettings.ModeEnumeration of File Mode (standard input file, ajax input file).
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAJAX_TOKENstatic java.lang.StringBACKGROUND_ICONstatic intDEFAULT_IMAGE_MAX_HEIGHTstatic intDEFAULT_IMAGE_MAX_WIDTHstatic intDEFAULT_IMAGE_QUALITYstatic java.lang.StringFILTERstatic java.lang.StringIMAGE_QUALITYstatic java.lang.StringMAX_IMAGE_HEIGHTstatic java.lang.StringMAX_IMAGE_WIDTHstatic java.lang.StringMODEstatic java.lang.StringSELECTED_FILE_LABELstatic java.lang.StringSINGLE_FILE-
Fields inherited from class com.jalios.jcms.taglib.settings.BasicSettings
APPEND, ARIA_ATTR_PREFIX, ARIA_ATTRIBUTES, AUTOFOCUS, CLEAR_BUTTON, CSS, DATA_ATTR_PREFIX, DATA_ATTRIBUTES, DISABLED, HIDE_CLEAR_BUTTON, HTML_ATTRIBUTES, ID, LANGUAGE_CHOOSER, MAX_LENGTH, NAME, PLACEHOLDER, PREPEND, READONLY, REQUIRED, TITLE, TRIGGER_ACTION, TRIGGER_EVENT, VALUE
-
-
Constructor Summary
Constructors Constructor Description FileSettings()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileSettingsajaxToken(java.lang.String token)Specify the Ajax token.FileSettingsbackgroundIcon(java.lang.String icon)Adds a background image to the drop wrapperFileSettingsfilter(FileSettings.FileFilter filter)Specify theFileSettings.FileFilterto apply on the input file.FileSettingsfilter(java.lang.String filter)Specify theFileSettings.FileFilterto apply on the input file.
the String represents a FileFilter and it's resolved withFileSettings.FileFilter.getFilter(String).protected FileSettingsgetThis()Returns the exact type of the this reference.
It's a way to recover the type of thethisobject in a class hierarchy (cf.ControlTypegetType()Returns theControlTyperelated to the currentControlSettingsimplementation.FileSettingsmode(FileSettings.Mode mode)Specify the FileFileSettings.Mode.FileSettingsresizeImage(int maxWidth, int maxHeight)Specify the size to which the images to upload are resized.FileSettingsresizeImage(int maxWidth, int maxHeight, int quality)Specify the size to which the images to upload are resized.FileSettingsresizeImage(java.lang.String resizeImage)Resize images from the given parameter at format"{maxWidth}x{maxHeight}x{quality}"FileSettingsselectedFileLabel(java.lang.String[] labels)Specify the labels of the files already selected.FileSettingsselectedFileLabel(java.lang.String label, java.lang.String... otherLabels)Specify the labels of the files already selected.FileSettingssingleFile()Specify the current control accepts only one file.-
Methods inherited from class com.jalios.jcms.taglib.settings.BasicSettings
addOption, append, aria, aria, autofocus, clearOption, clone, css, dataAttribute, dataAttribute, dataAttributes, disable, getOption, getOptionNames, htmlAttributes, htmlAttributes, id, isChannelReady, maxLength, merge, name, onChange, onFocusOut, placeholder, prepend, readonly, removeOption, require, resolveOptions, showLanguageChooser, sortSet, title, toStringArray, toStringArray, toStringArray, toStringArray, toStringArray, trigger, value
-
-
-
-
Field Detail
-
MODE
public static final java.lang.String MODE
- See Also:
- Constant Field Values
-
SINGLE_FILE
public static final java.lang.String SINGLE_FILE
- See Also:
- Constant Field Values
-
MAX_IMAGE_WIDTH
public static final java.lang.String MAX_IMAGE_WIDTH
- See Also:
- Constant Field Values
-
MAX_IMAGE_HEIGHT
public static final java.lang.String MAX_IMAGE_HEIGHT
- See Also:
- Constant Field Values
-
IMAGE_QUALITY
public static final java.lang.String IMAGE_QUALITY
- See Also:
- Constant Field Values
-
AJAX_TOKEN
public static final java.lang.String AJAX_TOKEN
- See Also:
- Constant Field Values
-
FILTER
public static final java.lang.String FILTER
- See Also:
- Constant Field Values
-
SELECTED_FILE_LABEL
public static final java.lang.String SELECTED_FILE_LABEL
- See Also:
- Constant Field Values
-
BACKGROUND_ICON
public static final java.lang.String BACKGROUND_ICON
- See Also:
- Constant Field Values
-
DEFAULT_IMAGE_MAX_WIDTH
public static final int DEFAULT_IMAGE_MAX_WIDTH
- See Also:
- Constant Field Values
-
DEFAULT_IMAGE_MAX_HEIGHT
public static final int DEFAULT_IMAGE_MAX_HEIGHT
- See Also:
- Constant Field Values
-
DEFAULT_IMAGE_QUALITY
public static final int DEFAULT_IMAGE_QUALITY
- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
public ControlType getType()
Description copied from interface:ControlSettingsReturns theControlTyperelated to the currentControlSettingsimplementation.- Returns:
ControlType
-
getThis
protected FileSettings getThis()
Description copied from class:BasicSettingsReturns the exact type of the this reference.
It's a way to recover the type of thethisobject in a class hierarchy (cf. getThis "trick").- Specified by:
getThisin classBasicSettings<FileSettings>- Returns:
- The exact type of the this reference
-
mode
public FileSettings mode(FileSettings.Mode mode)
Specify the FileFileSettings.Mode.- Parameters:
mode-FileSettings.Mode- Returns:
- a reference to this object - used to chain calls
- See Also:
FileSettings.Mode
-
singleFile
public FileSettings singleFile()
Specify the current control accepts only one file.- Returns:
- a reference to this object - used to chain calls
-
resizeImage
public FileSettings resizeImage(int maxWidth, int maxHeight)
Specify the size to which the images to upload are resized.- Parameters:
maxWidth- Maximum widthmaxHeight- Maximum height- Returns:
- a reference to this object - used to chain calls
-
resizeImage
public FileSettings resizeImage(int maxWidth, int maxHeight, int quality)
Specify the size to which the images to upload are resized.- Parameters:
maxWidth- Maximum widthmaxHeight- Maximum heightquality- quality of the image to resize- Returns:
- a reference to this object - used to chain calls
-
resizeImage
public FileSettings resizeImage(java.lang.String resizeImage)
Resize images from the given parameter at format"{maxWidth}x{maxHeight}x{quality}"- Parameters:
resizeImage- defines how to resize images using the following format:"{maxWidth}x{maxHeight}x{quality}"- Returns:
- a reference to this object - used to chain calls
-
ajaxToken
public FileSettings ajaxToken(java.lang.String token)
Specify the Ajax token. Append a input hidden with name is plupload-token and value is the given token.- Parameters:
token- Ajax token- Returns:
- a reference to this object - used to chain calls
-
filter
public FileSettings filter(FileSettings.FileFilter filter)
Specify theFileSettings.FileFilterto apply on the input file.- Parameters:
filter-FileSettings.FileFilter- Returns:
- a reference to this object - used to chain calls
-
filter
public FileSettings filter(java.lang.String filter)
Specify theFileSettings.FileFilterto apply on the input file.
the String represents a FileFilter and it's resolved withFileSettings.FileFilter.getFilter(String).- Parameters:
filter-FileSettings.FileFilter- Returns:
- a reference to this object - used to chain calls
-
selectedFileLabel
public FileSettings selectedFileLabel(java.lang.String label, java.lang.String... otherLabels)
Specify the labels of the files already selected.- Parameters:
label- The first file labelotherLabels- The other file labels- Returns:
- a reference to this object - used to chain calls
-
selectedFileLabel
public FileSettings selectedFileLabel(java.lang.String[] labels)
Specify the labels of the files already selected.- Parameters:
labels- Array of file labels- Returns:
- a reference to this object - used to chain calls
-
backgroundIcon
public FileSettings backgroundIcon(java.lang.String icon)
Adds a background image to the drop wrapper- Parameters:
icon- the icon source- Returns:
- a reference to this object - used to chain calls
- Since:
- jcms-10.0.8
-
-