settingsOptionsPanel.add(loadDefaultEnvLabel);
settingsOptionsPanel.add(defaultDirLabel);
loadDefaultEnv= new JTextField();
loadDefaultEnv.setText(Configuration.getInstance().getDefaultEnvironment());
loadDefaultEnv.setBorder(new EtchedBorder(EtchedBorder.LOWERED));
settingsOptionsPanel.add(loadDefaultEnv);
defaultDirectory= new JTextField();
defaultDirectory.setText(config.getDefaultWorkingDirectory());
defaultDirectory.setBorder(new EtchedBorder(EtchedBorder.LOWERED));
settingsOptionsPanel.add(defaultDirectory);
//JCOMBO
languageCombo = new JComboBox(loadLanguages().toArray());
languageCombo.setBorder(new EtchedBorder(EtchedBorder.LOWERED));
try{
for (int i=0; i<languageCombo.getItemCount(); i++){
if (((StringItem)languageCombo.getItemAt(i)).getId().equals(config.getSelectedLanguage())){
languageCombo.setSelectedItem(languageCombo.getItemAt(i));
break;
}
}
}catch (Exception e){
log.error(GettextResource.gettext(config.getI18nResourceBundle(),"Error: "), e);
}
comboLaf = new JComboBox(ThemeUtility.getLAFList().toArray());
comboLaf.setBorder(new EtchedBorder(EtchedBorder.LOWERED));
try{
String lookAndFeel = Integer.toString(Configuration.getInstance().getLookAndFeel());
for (int i=0; i<comboLaf.getItemCount(); i++){
if (((StringItem)comboLaf.getItemAt(i)).getId().equals(lookAndFeel)){
comboLaf.setSelectedItem(comboLaf.getItemAt(i));
break;
}
}
}catch (Exception e){
log.error(GettextResource.gettext(config.getI18nResourceBundle(),"Error: "), e);
}
comboTheme = new JComboBox(ThemeUtility.getThemeList().toArray());
comboTheme.setBorder(new EtchedBorder(EtchedBorder.LOWERED));
try{
String theme = Integer.toString(Configuration.getInstance().getTheme());
for (int i=0; i<comboTheme.getItemCount(); i++){
if (((StringItem)comboTheme.getItemAt(i)).getId().equals(theme)){
comboTheme.setSelectedItem(comboTheme.getItemAt(i));
break;
}
}
}catch (Exception e){
log.error(GettextResource.gettext(config.getI18nResourceBundle(),"Error: "), e);
}
if (!ThemeUtility.isPlastic(Integer.parseInt(((StringItem)(comboLaf.getSelectedItem())).getId()))){
comboTheme.setEnabled(false);
}
comboLaf.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try{
if (!(ThemeUtility.isPlastic(Integer.parseInt(((StringItem)comboLaf.getSelectedItem()).getId())))){
comboTheme.setEnabled(false);
}
else{
comboTheme.setEnabled(true);
}
}
catch(Exception exc){
comboTheme.setFocusable(false);
}
}
});
comboLog = new JComboBox(loadLogLevels().toArray());
comboLog.setBorder(new EtchedBorder(EtchedBorder.LOWERED));
try{
for (int i=0; i<comboLog.getItemCount(); i++){
if (((StringItem)comboLog.getItemAt(i)).getId().equals(Integer.toString(Configuration.getInstance().getLoggingLevel()))){
comboLog.setSelectedItem(comboLog.getItemAt(i));
break;
}
}
}catch (Exception e){
log.error(GettextResource.gettext(config.getI18nResourceBundle(),"Error: "), e);
}
checkNewVersion = new JCheckBox(GettextResource.gettext(config.getI18nResourceBundle(),"Check for updates at startup"));
checkNewVersion.setSelected(config.isCheckForUpdates());
settingsOptionsPanel.add(checkNewVersion);
comboThumbnailsCreators = new JComboBox(ThumbnailCreatorsRegisty.getInstalledCreators().toArray());
comboThumbnailsCreators.setBorder(new EtchedBorder(EtchedBorder.LOWERED));
try{
for (int i=0; i<comboThumbnailsCreators.getItemCount(); i++){
if (((StringItem)comboThumbnailsCreators.getItemAt(i)).getId().equals(config.getThumbnailsCreatorIdentifier())){
comboThumbnailsCreators.setSelectedItem(comboThumbnailsCreators.getItemAt(i));
break;