@OpenApiAll public class FileProperty extends Property
java.io.File value.File| Modifier and Type | Field and Description | 
|---|---|
static int | 
DIRECTORIES_ONLY
Instruction to choose only directories. 
 | 
static java.lang.String | 
FILE_TYPE_ANY
Deprecated.  
 | 
static java.lang.String | 
FILE_TYPE_IMAGE
Deprecated.  
 | 
static int | 
FILES_AND_DIRECTORIES
Instruction to choose both files and directories. 
 | 
static int | 
FILES_ONLY
Instruction to choose only files. 
 | 
DEFAULT_PROPERTY_RESOURCE_PROVIDER, EDITABLE, mAdditionalProperties, mDescriptionID, mEditable, mGroupName, mID, mResourceProvider, mSources, mSupport, mUndefinedState, mValue, NULL, NULL_ID_PROPERTY_RESOURCE_PROVIDER, UNDEFINED, VALUE| Constructor and Description | 
|---|
FileProperty()
Default constructor. 
 | 
FileProperty(java.lang.String id,
            java.lang.String path)
The property constructor. 
 | 
FileProperty(java.lang.String id,
            java.lang.String path,
            int selectionMode)
The property constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
accept(PropertyVisitor v)
Accepts the given visitor. 
 | 
FileProperty | 
clone()
Clones the property. 
 | 
java.lang.String | 
getClassType()
Returns property class type. 
 | 
java.io.File | 
getFile(java.lang.String requestFrom)
Returns value as file. 
 | 
java.util.List<java.lang.String> | 
getFileExtensions()
Get supported file extensions. 
 | 
java.lang.String | 
getFileType()
Deprecated. 
 
 | 
java.lang.String | 
getPathAndExpand(java.lang.String purpose)
Get expanded (using path variables) path. 
 | 
int | 
getSelectionMode()
Returns file selection mode. 
 | 
java.lang.String | 
getValueStringRepresentation()
Returns value's string representation. 
 | 
boolean | 
isDisplayAllFiles()
Returns display all files flag. 
 | 
boolean | 
isDisplayFullPath()
Returns display full path flag. 
 | 
boolean | 
isUseFilePreviewer()
Returns use file preview flag. 
 | 
void | 
setDisplayAllFiles(boolean displayAllFiles)
Sets display all files flag. 
 | 
void | 
setDisplayFullPath(boolean displayFullPath)
Sets display full path flag. 
 | 
void | 
setFileExtensions(java.util.List<java.lang.String> fileExtensions)
Set supported file extensions. 
 | 
void | 
setFileType(java.lang.String fileType)
Deprecated. 
 
 | 
void | 
setPathAndCollapse(java.lang.String path)
Set Path and Collapse it by using path variables. 
 | 
void | 
setSelectionMode(int selectionMode)
Sets the file selection mode for this property. 
 | 
void | 
setUseFilePreviewer(boolean useFilePreviewer)
Sets use file previewer flag. 
 | 
void | 
setValue(java.lang.Object value)
Sets new property value. 
 | 
_isFrozen, _setFrozen, addPropertyChangeListener, addSource, addSources, areValuesEqual, createCellEditor, createTableCellRenderer, equals, firePropertyChange, generateDefaultDescriptionID, getAdditionalProperties, getAdditionalProperty, getDescription, getDescriptionID, getGroup, getID, getIntroductoryVersion, getName, getNonEditableReason, getProjectFromSourcesOrActive, getPureDescription, getResourceProvider, getResourceProviderID, getSources, getUndefinedString, getUndefinedString, getValue, hashCode, isEditable, isUndefinedState, removePropertyChangeListener, setAdditionalProperties, setAdditionalProperty, setDescription, setDescriptionID, setEditable, setGroup, setID, setIntroductoryVersion, setNonEditableReason, setResourceProvider, setResourceProviderID, setSources, setUndefinedState, toStringpublic static final int FILES_ONLY
public static final int DIRECTORIES_ONLY
public static final int FILES_AND_DIRECTORIES
@Deprecated public static final java.lang.String FILE_TYPE_ANY
@Deprecated public static final java.lang.String FILE_TYPE_IMAGE
public FileProperty()
public FileProperty(java.lang.String id,
                    java.lang.String path)
id - the ID of property.path - the file path.public FileProperty(java.lang.String id,
                    java.lang.String path,
                    int selectionMode)
id - the ID of property.path - the file path.selectionMode - the file selection mode - FILES_ONLY, DIRECTORIES_ONLY or FILES_AND_DIRECTORIES.public void setSelectionMode(int selectionMode)
selectionMode - the file selection mode. Possible values are FILES_ONLY, DIRECTORIES_ONLY
                      and FILES_AND_DIRECTORIES.public int getSelectionMode()
public java.lang.String getValueStringRepresentation()
PropertygetValueStringRepresentation in class Propertyvalue.
 toString() if property has value.Property.getValueStringRepresentation()public void accept(PropertyVisitor v) throws java.lang.Exception
accept in interface PropertyVisitorAcceptoraccept in class Propertyv - the PropertyVisitor.java.lang.Exceptionpublic java.io.File getFile(@CheckForNull
                            java.lang.String requestFrom)
                     throws com.nomagic.magicdraw.pathvariables.RecursivePathVariableException
requestFrom - request stringcom.nomagic.magicdraw.pathvariables.RecursivePathVariableException - in case of errorpublic java.lang.String getClassType()
getClassType in interface PropertyVisitorAcceptorgetClassType in class PropertyPropertyID.FILE_PROPERTYpublic void setValue(@CheckForNull
                     java.lang.Object value)
PropertyPropertyChangeEvent with propertyName - property
 ID, newValue and oldValue.setValue in class Propertyvalue - a new property value.Property.setValue(java.lang.Object)public void setPathAndCollapse(java.lang.String path)
path - Path string.public java.lang.String getPathAndExpand(@CheckForNull
                                         java.lang.String purpose)
                                  throws com.nomagic.magicdraw.pathvariables.RecursivePathVariableException
purpose - used in an undefined-path-variable prompt for a user, e.g. 'The path variable <variable> used for <purpose> is not set.com.nomagic.magicdraw.pathvariables.RecursivePathVariableException - in case of errorpublic void setDisplayFullPath(boolean displayFullPath)
displayFullPath - - display full path flag.public boolean isDisplayFullPath()
public boolean isUseFilePreviewer()
public void setUseFilePreviewer(boolean useFilePreviewer)
useFilePreviewer - - use file previewer flag.public boolean isDisplayAllFiles()
public void setDisplayAllFiles(boolean displayAllFiles)
displayAllFiles - - display all files flag.@Deprecated public java.lang.String getFileType()
getFileExtensions()@Deprecated
public void setFileType(@CheckForNull
                                    java.lang.String fileType)
setFileExtensions(java.util.List)fileType - - type of the file.@CheckForNull public java.util.List<java.lang.String> getFileExtensions()
public void setFileExtensions(java.util.List<java.lang.String> fileExtensions)
fileExtensions - file extensions.public FileProperty clone()
Property