com.jgoodies.jdiskreport.model.settings
Class GUISettings

java.lang.Object
  extended by com.jgoodies.binding.beans.Model
      extended by com.jgoodies.jdiskreport.model.settings.GUISettings
All Implemented Interfaces:
com.jgoodies.binding.beans.Observable, Serializable

public final class GUISettings
extends com.jgoodies.binding.beans.Model

Provides bound properties for GUI related settings.

Version:
$Revision: 1.11 $
Author:
Karsten Lentzsch
See Also:
Serialized Form

Nested Class Summary
static class GUISettings.NodeMode
           
static class GUISettings.SizeMode
           
static class GUISettings.SortMode
           
static class GUISettings.ViewMode
           
 
Field Summary
static int MAX_STATISTICS_DEPTH
           
static int MIN_STATISTICS_DEPTH
           
static String PROPERTYNAME_BOLDNESS_THRESHOD
           
static String PROPERTYNAME_COLLAPSE_DESELECTED_PATHS
           
static String PROPERTYNAME_EXPAND_SELECTED_PATHS
           
static String PROPERTYNAME_NODE_MODE
           
static String PROPERTYNAME_SHOW_FILES
           
static String PROPERTYNAME_SIZE_MODE
           
static String PROPERTYNAME_SORT_MODE
           
static String PROPERTYNAME_STATISTICS_DEPTH
           
static String PROPERTYNAME_VIEW_MODE
           
 
Constructor Summary
GUISettings()
           
 
Method Summary
 ChartSettings chartSettings()
          Returns the Bean that describes the ChartSettings.
 float getBoldnessThreshold()
          Returns the threshold that indicates when a directory node shall be emphasized.
 boolean getCollapseDeselectedPaths()
          Returns whether the navigator collapses deselected paths.
 boolean getExpandSelectedPaths()
          Returns if the navigator expands paths on selection.
 GUISettings.NodeMode getNodeMode()
          Returns the mode that indicates how directory nodes are rendered in the navigation tree: plain, percent, size.
 boolean getShowFiles()
          Returns if individual files are shown in the relevant views.
 com.jgoodies.uif.action.ToggleAction getShowFilesAction()
           
 GUISettings.SizeMode getSizeMode()
          Returns the current size mode: size vs. count.
 com.jgoodies.uif.action.ToggleAction getSizeModeCountAction()
           
 com.jgoodies.uif.action.ToggleAction getSizeModeSizeAction()
           
 GUISettings.SortMode getSortMode()
          Returns the current sort mode, one of: by name, by size or unsorted.
 com.jgoodies.uif.action.ToggleAction getSortModeNameAction()
           
 com.jgoodies.uif.action.ToggleAction getSortModeSizeAction()
           
 int getStatisticsDepth()
          Returns the current statistics depth that indicates for how many levels we collect and store the cumulated statistics: top lists, distributions and types.
 GUISettings.ViewMode getViewMode()
          Returns the current view mode used to determine which presentation is shown.
 void restoreFrom(Preferences prefs)
          Restores the persistent properties from the specified Preferences.
 void setBoldnessThreshold(float newValue)
          Sets a new boldness threshold.
 void setCollapseDeselectedPaths(boolean newValue)
          Enables or disables that deselected paths are collapsed automatically.
 void setExpandSelectedPaths(boolean newValue)
          Enables or disables the automatic expansion of selected paths.
 void setNodeMode(GUISettings.NodeMode newMode)
          Sets a new mode for the rendering of directory nodes.
 void setShowFiles(boolean newValue)
          Sets whether individual files shall be shown in the relevant views, or if they shall be collapsed to a synthetic node "Files in this folder".
 void setSizeMode(GUISettings.SizeMode newMode)
          Sets a new size mode: size vs. count.
 void setSortMode(GUISettings.SortMode newMode)
          Sets a new sort mode: by name, by size or unsorted.
 void setStatisticsDepth(int newDepth)
          Sets a new statistics depth.
 void setViewMode(GUISettings.ViewMode newMode)
          Sets a new view mode.
 void storeIn(Preferences prefs)
          Stores the persistent properties in the specified Preferences.
 
Methods inherited from class com.jgoodies.binding.beans.Model
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, equals, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTYNAME_BOLDNESS_THRESHOD

public static final String PROPERTYNAME_BOLDNESS_THRESHOD
See Also:
Constant Field Values

PROPERTYNAME_COLLAPSE_DESELECTED_PATHS

public static final String PROPERTYNAME_COLLAPSE_DESELECTED_PATHS
See Also:
Constant Field Values

PROPERTYNAME_EXPAND_SELECTED_PATHS

public static final String PROPERTYNAME_EXPAND_SELECTED_PATHS
See Also:
Constant Field Values

PROPERTYNAME_STATISTICS_DEPTH

public static final String PROPERTYNAME_STATISTICS_DEPTH
See Also:
Constant Field Values

PROPERTYNAME_SORT_MODE

public static final String PROPERTYNAME_SORT_MODE
See Also:
Constant Field Values

PROPERTYNAME_SIZE_MODE

public static final String PROPERTYNAME_SIZE_MODE
See Also:
Constant Field Values

PROPERTYNAME_SHOW_FILES

public static final String PROPERTYNAME_SHOW_FILES
See Also:
Constant Field Values

PROPERTYNAME_NODE_MODE

public static final String PROPERTYNAME_NODE_MODE
See Also:
Constant Field Values

PROPERTYNAME_VIEW_MODE

public static final String PROPERTYNAME_VIEW_MODE
See Also:
Constant Field Values

MIN_STATISTICS_DEPTH

public static final int MIN_STATISTICS_DEPTH
See Also:
Constant Field Values

MAX_STATISTICS_DEPTH

public static final int MAX_STATISTICS_DEPTH
See Also:
Constant Field Values
Constructor Detail

GUISettings

public GUISettings()
Method Detail

chartSettings

public ChartSettings chartSettings()
Returns the Bean that describes the ChartSettings.

Returns:
the Bean that describes the chart properties

getSortModeSizeAction

public com.jgoodies.uif.action.ToggleAction getSortModeSizeAction()

getSortModeNameAction

public com.jgoodies.uif.action.ToggleAction getSortModeNameAction()

getSizeModeSizeAction

public com.jgoodies.uif.action.ToggleAction getSizeModeSizeAction()

getSizeModeCountAction

public com.jgoodies.uif.action.ToggleAction getSizeModeCountAction()

getShowFilesAction

public com.jgoodies.uif.action.ToggleAction getShowFilesAction()

getBoldnessThreshold

public float getBoldnessThreshold()
Returns the threshold that indicates when a directory node shall be emphasized. Nodes with a percentage large than this threshold will be rendered with a bold font.

Returns:
a size threshold used to render nodes plain or bold

setBoldnessThreshold

public void setBoldnessThreshold(float newValue)
Sets a new boldness threshold.

Parameters:
newValue - the boldness threshold to be set

getCollapseDeselectedPaths

public boolean getCollapseDeselectedPaths()
Returns whether the navigator collapses deselected paths.


setCollapseDeselectedPaths

public void setCollapseDeselectedPaths(boolean newValue)
Enables or disables that deselected paths are collapsed automatically.

Parameters:
newValue - true to enable the auto collapse, false to disable it

getExpandSelectedPaths

public boolean getExpandSelectedPaths()
Returns if the navigator expands paths on selection.

Returns:
true if selected paths are expanded, false otherwise

setExpandSelectedPaths

public void setExpandSelectedPaths(boolean newValue)
Enables or disables the automatic expansion of selected paths.

Parameters:
newValue - true to enable the auto expansion, false to disable it

getSortMode

public GUISettings.SortMode getSortMode()
Returns the current sort mode, one of: by name, by size or unsorted.

Returns:
the current sort mode

setSortMode

public void setSortMode(GUISettings.SortMode newMode)
Sets a new sort mode: by name, by size or unsorted.

Parameters:
newMode - the sort mode to be set

getSizeMode

public GUISettings.SizeMode getSizeMode()
Returns the current size mode: size vs. count.

Returns:
the current size mode

setSizeMode

public void setSizeMode(GUISettings.SizeMode newMode)
Sets a new size mode: size vs. count.

Parameters:
newMode - the size mode to be set

getNodeMode

public GUISettings.NodeMode getNodeMode()
Returns the mode that indicates how directory nodes are rendered in the navigation tree: plain, percent, size.

Returns:
the mode that indicates how directory nodes are rendered

setNodeMode

public void setNodeMode(GUISettings.NodeMode newMode)
Sets a new mode for the rendering of directory nodes.

Parameters:
newMode - the mode to be set

getViewMode

public GUISettings.ViewMode getViewMode()
Returns the current view mode used to determine which presentation is shown.

Returns:
the current view mode

setViewMode

public void setViewMode(GUISettings.ViewMode newMode)
Sets a new view mode.

Parameters:
newMode - the view mode to be set

getShowFiles

public boolean getShowFiles()
Returns if individual files are shown in the relevant views.

Returns:
true if files are shown, false if they are collapsed to a synthetic node "Files in this folder".

setShowFiles

public void setShowFiles(boolean newValue)
Sets whether individual files shall be shown in the relevant views, or if they shall be collapsed to a synthetic node "Files in this folder".

Parameters:
newValue - true to show leafs, false to hide leafs

getStatisticsDepth

public int getStatisticsDepth()
Returns the current statistics depth that indicates for how many levels we collect and store the cumulated statistics: top lists, distributions and types.

Returns:
the number of levels we provide the statistics

setStatisticsDepth

public void setStatisticsDepth(int newDepth)
Sets a new statistics depth.

Parameters:
newDepth - the statistics depth to be set

restoreFrom

public void restoreFrom(Preferences prefs)
Restores the persistent properties from the specified Preferences.

Parameters:
prefs - the Preferences object that holds the property values

storeIn

public void storeIn(Preferences prefs)
Stores the persistent properties in the specified Preferences.

Parameters:
prefs - the Preferences object that holds the property values


Copyright © 2000-2008 JGoodies Karsten Lentzsch. All Rights Reserved.