public class FilePropertyDescriptor extends Install4JPropertyDescriptor
ExternalFile
LocalizedExternalFile
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.
ExternalFile
,
LocalizedExternalFile
Modifier and Type | Field and 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 type com.install4j.api.beans.ExternalFile that tells the install4j GUI
to offer the user the possibility to select a file from the distribution tree instead.
|
ATTRIBUTE_CONTEXT, ATTRIBUTE_PARENT_PROPERTY, ATTRIBUTE_PROPERTY_CATEGORY, ATTRIBUTE_PROPERTY_CHANGE_LISTENER, ATTRIBUTE_SORT_KEY, 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_VARIABLE_NAME
Modifier and Type | Method and Description |
---|---|
static FilePropertyDescriptor |
create(java.lang.String propertyName,
java.lang.Class beanClass,
java.lang.String displayName,
java.lang.String shortDescription,
FileSelectionMode selectionMode)
Same as
create(String, Class, String, String, FileSelectionMode, String[], String, String)
with suffixes, filterName and context set to null. |
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 as
create(String, Class, String, String, FileSelectionMode, String[], String, String)
with suffixes and filterName set to null. |
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 as
create(String, Class, String, String, FileSelectionMode, String[], String, String)
with context set to null. |
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 with
Install4JPropertyDescriptor.create(String, Class, String, String)
and additional configuration specific to file properties. |
FilePropertyDescriptor |
setFileContentType(FileContentType fileContentType)
Set the file content type.
|
create, create, setContext, setDisplayName, setParentProperty, setPropertyCategory, setPropertyChangeListener, setSortKey, setVariableValueClass, setVisibilityDiscriminator
createPropertyEditor, equals, getPropertyEditorClass, getPropertyType, getReadMethod, getWriteMethod, hashCode, isBound, isConstrained, setBound, setConstrained, setPropertyEditorClass, setReadMethod, setWriteMethod
public static final java.lang.String ATTRIBUTE_SELECTION_MODE
public static final java.lang.String ATTRIBUTE_SUFFIXES
public static final java.lang.String ATTRIBUTE_FILTER_NAME
public static final java.lang.String ATTRIBUTE_FILE_CONTENT_TYPE
public static final java.lang.String CONTEXT_EXTERNAL_OR_INTERNAL
public static FilePropertyDescriptor create(java.lang.String propertyName, java.lang.Class beanClass, java.lang.String displayName, java.lang.String shortDescription, FileSelectionMode selectionMode)
create(String, Class, String, String, FileSelectionMode, String[], String, String)
with suffixes, filterName and context set to null.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)
create(String, Class, String, String, FileSelectionMode, String[], String, String)
with suffixes and filterName set to null.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)
create(String, Class, String, String, FileSelectionMode, String[], String, String)
with context set to null.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)
Install4JPropertyDescriptor.create(String, Class, String, String)
and additional configuration specific to file properties.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 the CONTEXT_* properties for the built-in contexts.public FilePropertyDescriptor setFileContentType(FileContentType fileContentType)
FileContentType
.
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.fileContentType
- the file content type