private void preferencesHaveChanged(PropertyChangeEvent evt)
{
String propName = evt != null ? evt.getPropertyName() : null;
final SquirrelPreferences prefs = _app.getSquirrelPreferences();
if (propName == null
|| propName.equals(
SquirrelPreferences.IPropertyNames.SHOW_CONTENTS_WHEN_DRAGGING))
{
if (prefs.getShowContentsWhenDragging())
{
getDesktopContainer().putClientProperty("JDesktopPane.dragMode", null);
}
else
{
getDesktopContainer().putClientProperty("JDesktopPane.dragMode", "outline");
}
}
if (propName == null
|| propName.equals(SquirrelPreferences.IPropertyNames.SHOW_MAIN_STATUS_BAR))
{
final boolean show = prefs.getShowMainStatusBar();
if (!show && _statusBarVisible)
{
getContentPane().remove(_statusBar);
_statusBarVisible = false;
}
else if (show && !_statusBarVisible)
{
getContentPane().add(_statusBar, BorderLayout.SOUTH);
_statusBarVisible = true;
}
}
if (propName == null
|| propName.equals(SquirrelPreferences.IPropertyNames.SHOW_MAIN_TOOL_BAR))
{
final boolean show = prefs.getShowMainToolBar();
if (!show && _toolBar != null)
{
getContentPane().remove(_toolBar);
_toolBar = null;
}