Package com.install4j.api.beaninfo
Class FilePropertyDescriptor
- java.lang.Object
-
- java.beans.FeatureDescriptor
-
- java.beans.PropertyDescriptor
-
- com.install4j.api.beaninfo.Install4JPropertyDescriptor
-
- com.install4j.api.beaninfo.FilePropertyDescriptor
-
public class FilePropertyDescriptor extends Install4JPropertyDescriptor
Property descriptor for properties that contain one or several file. The supported property types are- java.io.File
ExternalFile
LocalizedExternalFile
- File[]
Using this class is not strictly required. In principle, you could also set values for the
ATTRIBUTE_*
constants in the property descriptor of an unrelated property descriptor class.- See Also:
ExternalFile
,LocalizedExternalFile
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATTRIBUTE_FILE_CONTENT_TYPE
static java.lang.String
ATTRIBUTE_FILTER_NAME
static java.lang.String
ATTRIBUTE_SELECTION_MODE
static java.lang.String
ATTRIBUTE_SUFFIXES
static java.lang.String
CONTEXT_EXTERNAL_OR_INTERNAL
Special context for properties of typecom.install4j.api.beans.ExternalFile
that tells the install4j GUI to offer the user the possibility to select a file from the distribution tree instead.-
Fields inherited from class com.install4j.api.beaninfo.Install4JPropertyDescriptor
ATTRIBUTE_ACTION_LIST_HIDDEN_KEYS, ATTRIBUTE_ACTION_LIST_SHOWN_KEYS, ATTRIBUTE_ALLOW_TEXT_OVERRIDE, ATTRIBUTE_CONTEXT, ATTRIBUTE_EMPTY_MESSAGE, ATTRIBUTE_PARENT_PROPERTY, ATTRIBUTE_PROPERTY_CATEGORY, ATTRIBUTE_PROPERTY_CHANGE_LISTENER, ATTRIBUTE_SORT_KEY, ATTRIBUTE_SUGGESTED_VALUES, ATTRIBUTE_VARIABLE_VALUE_CLASS, ATTRIBUTE_VISIBILITY_DISCRIMINATOR, CATEGORY_CONFIGURATION, CONTEXT_ANCHOR_CORNERS, CONTEXT_ANCHOR_HORIZONTAL, CONTEXT_ANCHOR_SIDES, CONTEXT_ANCHOR_VERTICAL, CONTEXT_COMPONENT_ID, CONTEXT_DATETIME, CONTEXT_DOWNLOADABLE_COMPONENT_ID, CONTEXT_FORM_COMPONENT_ID, CONTEXT_HTML, CONTEXT_LAUNCHER_ID, CONTEXT_MULTILINE, CONTEXT_NO_INSTALLER_VARIABLES, CONTEXT_NON_SERVICE_LAUNCHER_ID, CONTEXT_SERVICE_LAUNCHER_ID, CONTEXT_STRING_TO_STRING_MAP, CONTEXT_STYLE_ID, CONTEXT_VARIABLE_NAME
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FilePropertyDescriptor
create(java.lang.String propertyName, java.lang.Class beanClass, java.lang.String displayName, java.lang.String shortDescription, FileSelectionMode selectionMode)
Same ascreate(String, Class, String, String, FileSelectionMode, String[], String, String)
withsuffixes
,filterName
andcontext
set tonull
.static FilePropertyDescriptor
create(java.lang.String propertyName, java.lang.Class beanClass, java.lang.String displayName, java.lang.String shortDescription, FileSelectionMode selectionMode, java.lang.String context)
Same ascreate(String, Class, String, String, FileSelectionMode, String[], String, String)
withsuffixes
andfilterName
set tonull
.static FilePropertyDescriptor
create(java.lang.String propertyName, java.lang.Class beanClass, java.lang.String displayName, java.lang.String shortDescription, FileSelectionMode selectionMode, java.lang.String[] suffixes, java.lang.String filterName)
Same ascreate(String, Class, String, String, FileSelectionMode, String[], String, String)
withcontext
set tonull
.static FilePropertyDescriptor
create(java.lang.String propertyName, java.lang.Class beanClass, java.lang.String displayName, java.lang.String shortDescription, FileSelectionMode selectionMode, java.lang.String[] suffixes, java.lang.String filterName, java.lang.String context)
Create a file property descriptor as withInstall4JPropertyDescriptor.create(String, Class, String, String)
and additional configuration specific to file properties.FilePropertyDescriptor
setFileContentType(FileContentType fileContentType)
Set the file content type.-
Methods inherited from class com.install4j.api.beaninfo.Install4JPropertyDescriptor
create, create, setActionListHiddenKeys, setActionListShownKeys, setAllowTextOverride, setContext, setDisplayName, setEmptyMessage, setHiddenInActionLists, setParentProperty, setPropertyCategory, setPropertyChangeListener, setSortKey, setSuggestedValues, setVariableValueClass, setVisibilityDiscriminator
-
Methods inherited from class java.beans.PropertyDescriptor
createPropertyEditor, equals, getPropertyEditorClass, getPropertyType, getReadMethod, getWriteMethod, hashCode, isBound, isConstrained, setBound, setConstrained, setPropertyEditorClass, setReadMethod, setWriteMethod
-
-
-
-
Field Detail
-
ATTRIBUTE_SELECTION_MODE
public static final java.lang.String ATTRIBUTE_SELECTION_MODE
-
ATTRIBUTE_SUFFIXES
public static final java.lang.String ATTRIBUTE_SUFFIXES
-
ATTRIBUTE_FILTER_NAME
public static final java.lang.String ATTRIBUTE_FILTER_NAME
-
ATTRIBUTE_FILE_CONTENT_TYPE
public static final java.lang.String ATTRIBUTE_FILE_CONTENT_TYPE
-
CONTEXT_EXTERNAL_OR_INTERNAL
public static final java.lang.String CONTEXT_EXTERNAL_OR_INTERNAL
Special context for properties of typecom.install4j.api.beans.ExternalFile
that tells the install4j GUI to offer the user the possibility to select a file from the distribution tree instead. The selected file will then be prepended with${installer:sys.installationDir}
and will not be packaged separately. In that case, the enclosing action or screen can only be used if the "Install files" action has already run.- See Also:
- Constant Field Values
-
-
Method Detail
-
create
public static FilePropertyDescriptor create(java.lang.String propertyName, java.lang.Class beanClass, java.lang.String displayName, java.lang.String shortDescription, FileSelectionMode selectionMode)
Same ascreate(String, Class, String, String, FileSelectionMode, String[], String, String)
withsuffixes
,filterName
andcontext
set tonull
.
-
create
public static FilePropertyDescriptor create(java.lang.String propertyName, java.lang.Class beanClass, java.lang.String displayName, java.lang.String shortDescription, FileSelectionMode selectionMode, java.lang.String context)
Same ascreate(String, Class, String, String, FileSelectionMode, String[], String, String)
withsuffixes
andfilterName
set tonull
.
-
create
public static FilePropertyDescriptor create(java.lang.String propertyName, java.lang.Class beanClass, java.lang.String displayName, java.lang.String shortDescription, FileSelectionMode selectionMode, java.lang.String[] suffixes, java.lang.String filterName)
Same ascreate(String, Class, String, String, FileSelectionMode, String[], String, String)
withcontext
set tonull
.
-
create
public static FilePropertyDescriptor create(java.lang.String propertyName, java.lang.Class beanClass, java.lang.String displayName, java.lang.String shortDescription, FileSelectionMode selectionMode, java.lang.String[] suffixes, java.lang.String filterName, java.lang.String context)
Create a file property descriptor as withInstall4JPropertyDescriptor.create(String, Class, String, String)
and additional configuration specific to file properties.- Parameters:
selectionMode
- the file selection mode when the user invokes the file choosersuffixes
- the accepted suffixes in the file chooserfilterName
- the filter name in the file choosercontext
- the context. The context allows to specify different editors for the same property types. See theCONTEXT_*
properties for the built-in contexts.- Returns:
- the property descriptor
-
setFileContentType
public FilePropertyDescriptor setFileContentType(FileContentType fileContentType)
Set the file content type. The install4j IDE has the capability to create some file types as described in the documentation forFileContentType
. If you do not call this method, users will only be able to select the file, but there will be no way to create or edit a selected file.- Parameters:
fileContentType
- the file content type- Returns:
this
, for chained calls on this property descriptor
-
-