@Override
protected void initialize(RPrefs rPrefs)
{
// general prefs
GeneralPrefs generalPrefs = rPrefs.getGeneralPrefs();
saveWorkspace_.setEnabled(true);
loadRData_.setEnabled(true);
dirChooser_.setEnabled(true);
int saveWorkspaceIndex;
switch (generalPrefs.getSaveAction())
{
case SaveAction.NOSAVE:
saveWorkspaceIndex = 1;
break;
case SaveAction.SAVE:
saveWorkspaceIndex = 0;
break;
case SaveAction.SAVEASK:
default:
saveWorkspaceIndex = 2;
break;
}
saveWorkspace_.getListBox().setSelectedIndex(saveWorkspaceIndex);
loadRData_.setValue(generalPrefs.getLoadRData());
dirChooser_.setText(generalPrefs.getInitialWorkingDirectory());
// history prefs
HistoryPrefs historyPrefs = rPrefs.getHistoryPrefs();
alwaysSaveHistory_.setEnabled(true);
removeHistoryDuplicates_.setEnabled(true);
alwaysSaveHistory_.setValue(historyPrefs.getAlwaysSave());
removeHistoryDuplicates_.setValue(historyPrefs.getRemoveDuplicates());
rProfileOnResume_.setValue(generalPrefs.getRprofileOnResume());
rProfileOnResume_.setEnabled(true);
// projects prefs
ProjectsPrefs projectsPrefs = rPrefs.getProjectsPrefs();
restoreLastProject_.setEnabled(true);