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übersicht
Felder -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungCreates a new instance ofViewSettings
and initializes it with default values. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungCreates aComparator
object that implements the sort order specified in this object.Creates aFileFilter
object that implements the filter criteria defined for this object.static ViewSettings
forDirectory
(File directory) Returns theViewSettings
object for the specified directory.String[]
boolean
boolean
boolean
boolean
void
Stores this object in the specified directory.void
setBackgroundColor
(Color backgroundColor) void
setFileDateFrom
(Date fileDateFrom) void
setFileDateTo
(Date fileDateTo) void
setFileTypes
(String[] fileTypes) void
setFilterDate
(boolean filterDate) void
setFilterSize
(boolean filterSize) void
setFilterTypes
(boolean filterTypes) void
setForegroundColor
(Color foregroundColor) void
setMinFileSize
(Integer minFileSize) void
setSelectionBackground
(Color selectionBackground) void
setSelectionForeground
(Color selectionForeground) void
setSortColumn
(Integer sortColumn) void
setSortDescending
(boolean sortDescending) void
setSortDirectories
(Integer sortDirectories)
-
Felddetails
-
VIEW_SETTINGS_FILE
Constant for the name of the file with the view settings.- Siehe auch:
-
CTX_NAME
Constant for the name under which this instance is stored in the context.- Siehe auch:
-
-
Konstruktordetails
-
ViewSettings
public ViewSettings()Creates a new instance ofViewSettings
and initializes it with default values.
-
-
Methodendetails
-
save
Stores 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
-
forDirectory
Returns theViewSettings
object for the specified directory. If in this directory a file with the reserved name for theViewSettings
object 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
ViewSettings
object for this directory
-
getBackgroundColor
-
setBackgroundColor
-
getForegroundColor
-
setForegroundColor
-
getSelectionBackground
-
setSelectionBackground
-
getSelectionForeground
-
setSelectionForeground
-
getSortColumn
-
setSortColumn
-
getSortDirectories
-
setSortDirectories
-
isSortDescending
public boolean isSortDescending() -
setSortDescending
public void setSortDescending(boolean sortDescending) -
isFilterTypes
public boolean isFilterTypes() -
setFilterTypes
public void setFilterTypes(boolean filterTypes) -
getFileTypes
-
setFileTypes
-
isFilterSize
public boolean isFilterSize() -
setFilterSize
public void setFilterSize(boolean filterSize) -
getMinFileSize
-
setMinFileSize
-
isFilterDate
public boolean isFilterDate() -
setFilterDate
public void setFilterDate(boolean filterDate) -
getFileDateFrom
-
setFileDateFrom
-
getFileDateTo
-
setFileDateTo
-
createComparator
Creates aComparator
object that implements the sort order specified in this object.- Gibt zurück:
- the
Comparator
-
createFileFilter
Creates aFileFilter
object that implements the filter criteria defined for this object. This filter can be used directly when listing the directory thisViewSettings
object is associated with.- Gibt zurück:
- a
FileFilter
for filtering a directory listing
-