es.unex.sextante.additionalInfo
Class AdditionalInfoFilepath

java.lang.Object
  extended by es.unex.sextante.additionalInfo.AdditionalInfoFilepath
All Implemented Interfaces:
AdditionalInfo

public class AdditionalInfoFilepath
extends java.lang.Object
implements AdditionalInfo

Additional info for a parameter representing a filepath

Author:
Victor Olaya volaya@unex.es

Constructor Summary
AdditionalInfoFilepath()
           
AdditionalInfoFilepath(boolean bFolder, boolean bOpenDialog, java.lang.String[] sExtensions)
           
 
Method Summary
 java.lang.String[] getExtensions()
          Returns the extensions that the file must have
 boolean getIsVoxelData()
          Checks whether the file is a voxel data file.
 java.lang.String getTextDescription()
           
 boolean isFolder()
          Return true if the parameter contains a folder and not a file path
 boolean isOpenDialog()
          Returns whether a open file dialog or a save file dialog should be used to set the value of this parameter
 void setExtensions(java.lang.String[] sExt)
          Sets a new mandatory extension for the filename
 void setIsFolder(boolean folder)
          Sets whether the parameter contains a folder and not a file path
 void setIsOpenDialog(boolean openDialog)
          Sets whether a open file dialog or a save file dialog should be used to set the value of this parameter
 void setIsVoxelData(boolean isVoxelData)
          Sets whether the file is a voxel data file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdditionalInfoFilepath

public AdditionalInfoFilepath()

AdditionalInfoFilepath

public AdditionalInfoFilepath(boolean bFolder,
                              boolean bOpenDialog,
                              java.lang.String[] sExtensions)
Parameters:
bFolder - true if the parameter contains a folder and not a file path
bOpenDialog - true if it is a file to be opened. False if it is a filename to be used to save something. This will define the type of file chooser dialog to show.
sExtension - the allowed extensions extensions
Method Detail

getExtensions

public java.lang.String[] getExtensions()
Returns the extensions that the file must have

Returns:
the file extension

setExtensions

public void setExtensions(java.lang.String[] sExt)
Sets a new mandatory extension for the filename

Parameters:
sExt - the new extension

isFolder

public boolean isFolder()
Return true if the parameter contains a folder and not a file path

Returns:
whether the paramete contais a folder and not a file path

setIsFolder

public void setIsFolder(boolean folder)
Sets whether the parameter contains a folder and not a file path

Parameters:
folder -

isOpenDialog

public boolean isOpenDialog()
Returns whether a open file dialog or a save file dialog should be used to set the value of this parameter

Returns:
whether a open file dialog or a save file dialog should be used to set the value of this parameter

setIsOpenDialog

public void setIsOpenDialog(boolean openDialog)
Sets whether a open file dialog or a save file dialog should be used to set the value of this parameter

Parameters:
openDialog - true if a open file dialog should be used

setIsVoxelData

public void setIsVoxelData(boolean isVoxelData)
Sets whether the file is a voxel data file.

Parameters:
isVoxelData - true if it is a voxel data file.

getIsVoxelData

public boolean getIsVoxelData()
Checks whether the file is a voxel data file.

Returns:
true if it is a voxel data file, false otherwise.

getTextDescription

public java.lang.String getTextDescription()
Specified by:
getTextDescription in interface AdditionalInfo