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
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
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_LAUNCHER_ID_OR_OTHER, 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
Modifier and TypeMethodDescriptionstatic FilePropertyDescriptor
create
(String propertyName, Class beanClass, String displayName, String shortDescription, FileSelectionMode selectionMode) Same ascreate(String, Class, String, String, FileSelectionMode, String[], String, String)
withsuffixes
,filterName
andcontext
set tonull
.static FilePropertyDescriptor
create
(String propertyName, Class beanClass, String displayName, String shortDescription, FileSelectionMode selectionMode, String context) Same ascreate(String, Class, String, String, FileSelectionMode, String[], String, String)
withsuffixes
andfilterName
set tonull
.static FilePropertyDescriptor
create
(String propertyName, Class beanClass, String displayName, String shortDescription, FileSelectionMode selectionMode, String[] suffixes, String filterName) Same ascreate(String, Class, String, String, FileSelectionMode, String[], String, String)
withcontext
set tonull
.static FilePropertyDescriptor
create
(String propertyName, Class beanClass, String displayName, String shortDescription, FileSelectionMode selectionMode, String[] suffixes, String filterName, String context) Create a file property descriptor as withInstall4JPropertyDescriptor.create(String, Class, String, String)
and additional configuration specific to file properties.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, setPreferred, 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
Methods inherited from class java.beans.FeatureDescriptor
attributeNames, getDisplayName, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setExpert, setHidden, setName, setShortDescription, setValue, toString
-
Field Details
-
ATTRIBUTE_SELECTION_MODE
- See Also:
-
ATTRIBUTE_SUFFIXES
- See Also:
-
ATTRIBUTE_FILTER_NAME
- See Also:
-
ATTRIBUTE_FILE_CONTENT_TYPE
- See Also:
-
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:
-
-
Method Details
-
create
public static FilePropertyDescriptor create(String propertyName, Class beanClass, String displayName, String shortDescription, FileSelectionMode selectionMode) Same ascreate(String, Class, String, String, FileSelectionMode, String[], String, String)
withsuffixes
,filterName
andcontext
set tonull
. -
create
public static FilePropertyDescriptor create(String propertyName, Class beanClass, String displayName, String shortDescription, FileSelectionMode selectionMode, String context) Same ascreate(String, Class, String, String, FileSelectionMode, String[], String, String)
withsuffixes
andfilterName
set tonull
. -
create
public static FilePropertyDescriptor create(String propertyName, Class beanClass, String displayName, String shortDescription, FileSelectionMode selectionMode, String[] suffixes, String filterName) Same ascreate(String, Class, String, String, FileSelectionMode, String[], String, String)
withcontext
set tonull
. -
create
public static FilePropertyDescriptor create(String propertyName, Class beanClass, String displayName, String shortDescription, FileSelectionMode selectionMode, String[] suffixes, String filterName, 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 specifying different editors for the same property types. See theCONTEXT_*
properties for the built-in contexts.- Returns:
- the property descriptor
-
setFileContentType
Set the file content type. The install4j IDE can 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
-