public class FileChooserParameters extends PropertyList
PropertyList.NullPropertyList
Modifier and Type | Field and Description |
---|---|
static String |
CHOSEN_FILE
This is set on return - it is the chosen file as an eve.io.File object.
|
static String |
CHOSEN_FILES
This is set on return - it is the list of chosen files as an array of File objects.
|
static String |
DEFAULT_EXTENSION
This is property is used to set the default extension.
|
static String |
FILE_MASK
This is a property for the FileChooser - you can have more than one, which should be a String value.
|
static String |
FILE_MODEL
This is a property for the FileChooser - it should be of type eve.io.File.
|
static String |
FILE_TYPE_HINT
This property is used to indicate what type of file is being loaded.
|
static String |
ICONS
This is a property for the FileChooser and is the list of icons associated with
file extensions - it should be of type java.util.Hashtable.
|
static String |
LOCATION
This property is used with a FileChooserLink object to specify a location
folder the user can select.
|
static int |
OPTION_ACCEPT_ANY
This is an option to be used with the OPTIONS property
- it indicates
You can bitwise OR together this option with any of the others.
|
static int |
OPTION_DESKTOP_VERSION
This is an option to be used with the OPTIONS property
- it indicates
You can bitwise OR together this option with any of the others.
|
static int |
OPTION_DIRECTORY_TREE
This is an option to be used with the OPTIONS property
- it indicates
You can bitwise OR together this option with any of the others.
|
static int |
OPTION_DONT_SHOW_FILE_EXTENSION
This is an option to be used with the OPTIONS property
- it indicates that file extensions should not be displayed.
|
static int |
OPTION_FILE_MUST_EXIST
This is an option to be used with the OPTIONS property
- it indicates
You can bitwise OR together this option with any of the others.
|
static int |
OPTION_INSTALL_SELECT
This is an option to be used with the OPTIONS property
- it indicates
You can bitwise OR together this option with any of the others.
|
static int |
OPTION_MULTI_SELECT
This is an option to be used with the OPTIONS property
- it indicates
You can bitwise OR together this option with any of the others.
|
static int |
OPTION_NO_CONFIRM_OVERWRITE
This is an option to be used with the OPTIONS property
- it indicates
You can bitwise OR together this option with any of the others.
|
static int |
OPTION_NO_DIRECTORY_CHANGE
This is an option to be used with the OPTIONS property
- it indicates
You can bitwise OR together this option with any of the others.
|
static int |
OPTION_NO_EXECUTE
This is an option to be used with the OPTIONS property
- it indicates
You can bitwise OR together this option with any of the others.
|
static int |
OPTION_QUICK_SELECT
This is an option to be used with the OPTIONS property
- it indicates
You can bitwise OR together this option with any of the others.
|
static int |
OPTION_READ_ONLY
This is an option to be used with the OPTIONS property
- it indicates
You can bitwise OR together this option with any of the others.
|
static int |
OPTION_SHOW_DIRECTORIES_WITH_TREE
This is an option to be used with the OPTIONS property
- it indicates that file extensions should not be displayed.
|
static int |
OPTION_SHOW_FILES_WITH_DIRECTORY_SELECT
This is an option to be used with the OPTIONS property
- it indicates that files will be displayed in Directory Select
mode.
|
static int |
OPTION_SIMPLE
This is an option to be used with the OPTIONS property.
- it is OPTION_DONT_SHOW_EXTENSION|OPTION_NO_DIRECTORY_CHANGE.
|
static String |
OPTIONS
This is used to set the options for the FileChooser.
|
static String |
PERSISTENT_HISTORY |
static String |
START_LOCATION
This is a property for the FileChooser, which should be a String value.
|
static String |
TITLE
This property is used to set the title of the FileChooser.
|
static String |
TYPE
This is property is used to select the type of the FileChooser.
|
static String |
TYPE_BROWSE |
static String |
TYPE_DIRECTORY_SELECT |
static String |
TYPE_OPEN |
static String |
TYPE_SAVE |
static boolean |
useIcons |
nullPropertyList
capacityIncrement, elementCount, elementData
serialVersionUID
Constructor and Description |
---|
FileChooserParameters() |
Modifier and Type | Method and Description |
---|---|
FileChooserParameters |
addMask(String mask,
boolean setAsDefaultExtension)
Use this to add a file mask to the chooser's mask list.
|
static void |
associateFileIcon(Hashtable destination,
String extension,
Object image)
Correctly associate a file extension with an 16x16 Image icon.
|
static void |
associateFileIcon(String extension,
ImageData image,
Hashtable destination)
Correctly associate a file extension with an 16x16 Image icon.
|
static void |
doubleSizeAll(Hashtable icons) |
File |
getChosenFile() |
File[] |
getChosenFiles() |
static ImageData |
getFileIcon(String extension,
Hashtable lookup,
ImageData defaultIfNotFound)
Correctly lookup a 16x16 Image icon for a file extension.
|
static Hashtable |
getFileIconsHashtable()
Retrieve the global File Icons hashtable, which will be setup with the
default values.
|
int |
setOptions(int optionsToSet,
int optionsToClear)
Set or clear bits in the OPTIONS value.
|
FileChooserParameters |
setParameter(String parameter,
Object value) |
FileChooserParameters |
setTypeAndHistoryKey(String type,
String historyKey)
Set the type of the FileChooser (e.g.
|
_getSetField, add, add, add, add, defaultTo, defaultTo, fromHashtable, fromStrings, get, get, getBoolean, getBoolean, getDouble, getDouble, getInt, getInt, getLong, getNames, getProperties, getProperties, getProperties, getPropertyValues, getSetProperties, getString, getString, getStrings, getValue, getValue, getValue, getValue, getValue, make, readConfigFile, remove, set, set, set, set, setBoolean, setClassValue, setDouble, setInt, setLong, setStrings, toHashtable, toPropertyList
add, add, addAll, addAll, addAll, addAll, addCopiesFrom, cacheAllElements, clear, compareTo, copied, copyCopiesFrom, copyFrom, copyInto, copyInto, del, find, get, getCopy, getCount, getFullCopy, getNew, insert, iterator, newVector, pop, push, size, toArray, toArray, toArray, toArray, toArray, toObjectArray, toString
add, addAll, addAll, addElement, capacity, clone, contains, containsAll, elementAt, elements, ensureCapacity, firstElement, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, setElementAt, setSize, size, trimToSize
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode
public static final String TYPE_OPEN
public static final String TYPE_SAVE
public static final String TYPE_BROWSE
public static final String TYPE_DIRECTORY_SELECT
public static final String FILE_TYPE_HINT
public static final String LOCATION
public static final String PERSISTENT_HISTORY
public static final String TITLE
public static final String TYPE
public static final String DEFAULT_EXTENSION
public static final String START_LOCATION
public static final String FILE_MASK
public static final String FILE_MODEL
public static final String CHOSEN_FILES
public static final String CHOSEN_FILE
public static final String OPTIONS
public static final String ICONS
public static final int OPTION_QUICK_SELECT
public static final int OPTION_FILE_MUST_EXIST
public static final int OPTION_DIRECTORY_TREE
public static final int OPTION_NO_DIRECTORY_CHANGE
public static final int OPTION_ACCEPT_ANY
public static final int OPTION_READ_ONLY
public static final int OPTION_INSTALL_SELECT
public static final int OPTION_DESKTOP_VERSION
public static final int OPTION_NO_CONFIRM_OVERWRITE
public static final int OPTION_MULTI_SELECT
public static final int OPTION_SHOW_FILES_WITH_DIRECTORY_SELECT
public static final int OPTION_NO_EXECUTE
public static final int OPTION_DONT_SHOW_FILE_EXTENSION
public static final int OPTION_SHOW_DIRECTORIES_WITH_TREE
public static final int OPTION_SIMPLE
public static boolean useIcons
public int setOptions(int optionsToSet, int optionsToClear)
optionsToSet
- the bits to set.optionsToClear
- the bits to clear.public File getChosenFile()
public File[] getChosenFiles()
public static Hashtable getFileIconsHashtable()
public static void associateFileIcon(Hashtable destination, String extension, Object image)
destination
- a destination Hashtable. If this is null the default icons hashtableextension
- the extension or a semicolon seperated list of extensions, in any case, with or without the leading "."an
- Object to be sent to Device.loadPicture() to be used.
will be used.public static void associateFileIcon(String extension, ImageData image, Hashtable destination)
extension
- the extension or a semicolon seperated list of extensions, in any case, with or without the leading "."image
- the ImageData to be used.destination
- a destination Hashtable. If this is null the default icons hashtable
will be used.public static ImageData getFileIcon(String extension, Hashtable lookup, ImageData defaultIfNotFound)
extension
- the extension, in any case, with or without the leading "."lookup
- a lookup Hashtable. If this is null the default icons hashtable
will be used.defaultIfNotFound
- the value to return if no icon was found.public static void doubleSizeAll(Hashtable icons)
public FileChooserParameters addMask(String mask, boolean setAsDefaultExtension)
For example: "*.jpg,*.png - Image files."
mask
- The mask to add.setAsDefaultExtension
- if this is true then the extension for the mask (or for the first if it is more than
one) is set to be the default extension.public FileChooserParameters setTypeAndHistoryKey(String type, String historyKey)
type
- one of the TYPE_XXX values.historyKey
- An optional history key name that
will store in the registry the history of directories where previous files were selected by the
user. The most recent directory where a file was selected will also be used as the start locationpublic FileChooserParameters setParameter(String parameter, Object value)