Klasse ViewSettings
java.lang.Object
net.sf.jguiraffe.examples.tutorial.viewset.ViewSettings
- Alle implementierten Schnittstellen:
- Serializable
A data class for storing a view definition.
The tutorial application allows creating a view definition for each directory. A view definition stores several properties which define how a specific directory is displayed, e.g. colors, sort order, filter conditions, etc. This class stores all the data of a view definition. An instance is used by the view settings dialog as model bean.
- Version:
- $Id: ViewSettings.java 205 2012-01-29 18:29:57Z oheger $
- Autor:
- Oliver Heger
- Siehe auch:
- 
FeldübersichtFelder
- 
KonstruktorübersichtKonstruktorenKonstruktorBeschreibungCreates a new instance ofViewSettingsand initializes it with default values.
- 
MethodenübersichtModifizierer und TypMethodeBeschreibungCreates aComparatorobject that implements the sort order specified in this object.Creates aFileFilterobject that implements the filter criteria defined for this object.static ViewSettingsforDirectory(File directory) Returns theViewSettingsobject for the specified directory.String[]booleanbooleanbooleanbooleanvoidStores this object in the specified directory.voidsetBackgroundColor(Color backgroundColor) voidsetFileDateFrom(Date fileDateFrom) voidsetFileDateTo(Date fileDateTo) voidsetFileTypes(String[] fileTypes) voidsetFilterDate(boolean filterDate) voidsetFilterSize(boolean filterSize) voidsetFilterTypes(boolean filterTypes) voidsetForegroundColor(Color foregroundColor) voidsetMinFileSize(Integer minFileSize) voidsetSelectionBackground(Color selectionBackground) voidsetSelectionForeground(Color selectionForeground) voidsetSortColumn(Integer sortColumn) voidsetSortDescending(boolean sortDescending) voidsetSortDirectories(Integer sortDirectories) 
- 
Felddetails- 
VIEW_SETTINGS_FILEConstant for the name of the file with the view settings.- Siehe auch:
 
- 
CTX_NAMEConstant for the name under which this instance is stored in the context.- Siehe auch:
 
 
- 
- 
Konstruktordetails- 
ViewSettingspublic ViewSettings()Creates a new instance ofViewSettingsand initializes it with default values.
 
- 
- 
Methodendetails- 
saveStores this object in the specified directory. Using this method the view settings for this directory can be made persistent.- Parameter:
- directory- the target directory
- Löst aus:
- IOException- if an error occurs
 
- 
forDirectoryReturns theViewSettingsobject for the specified directory. If in this directory a file with the reserved name for theViewSettingsobject exists, it is loaded. If this file does not exist or if loading this file causes an error, a default instance is returned.- Parameter:
- directory- the directory in question
- Gibt zurück:
- the ViewSettingsobject for this directory
 
- 
getBackgroundColor
- 
setBackgroundColor
- 
getForegroundColor
- 
setForegroundColor
- 
getSelectionBackground
- 
setSelectionBackground
- 
getSelectionForeground
- 
setSelectionForeground
- 
getSortColumn
- 
setSortColumn
- 
getSortDirectories
- 
setSortDirectories
- 
isSortDescendingpublic boolean isSortDescending()
- 
setSortDescendingpublic void setSortDescending(boolean sortDescending) 
- 
isFilterTypespublic boolean isFilterTypes()
- 
setFilterTypespublic void setFilterTypes(boolean filterTypes) 
- 
getFileTypes
- 
setFileTypes
- 
isFilterSizepublic boolean isFilterSize()
- 
setFilterSizepublic void setFilterSize(boolean filterSize) 
- 
getMinFileSize
- 
setMinFileSize
- 
isFilterDatepublic boolean isFilterDate()
- 
setFilterDatepublic void setFilterDate(boolean filterDate) 
- 
getFileDateFrom
- 
setFileDateFrom
- 
getFileDateTo
- 
setFileDateTo
- 
createComparatorCreates aComparatorobject that implements the sort order specified in this object.- Gibt zurück:
- the Comparator
 
- 
createFileFilterCreates aFileFilterobject that implements the filter criteria defined for this object. This filter can be used directly when listing the directory thisViewSettingsobject is associated with.- Gibt zurück:
- a FileFilterfor filtering a directory listing
 
 
-