setLocationRelativeTo(getOwner());
}
private void initValues() {
ClientConfiguration conf = ClientConfiguration.getDefault();
compressionCombo.setSelectedIndex(conf.getCompression());
multiImageCheck.setSelected(conf.isUseMultiImage());
Destination dest = conf.getDestination();
if (dest != null) {
hotsyncRadio.setSelected(dest.isHotsync());
directoryRadio.setSelected(!dest.isHotsync());
dest = conf.getHotSyncDestination();
if (dest != null) {
userCombo.setSelectedItem(dest.getUser());
memoryCardCheck.setSelected(dest.isMemoryCard());
}
dest = conf.getDirectoryDestination();
if (dest != null) {
directoryText.setText(dest.getDirectory().getAbsolutePath());
}
}
String backupDirectory = conf.getBackupDirectory();
if (backupDirectory != null) {
backupText.setText(backupDirectory);
}
categoryDirectoriesCheck.setSelected(conf.isCreateCategoryDirectories());
String s = conf.getDateFormatName();
int idx;
if (s.equals("short")) {
idx = 0;
} else if (s.equals("medium")) {
idx = 1;
} else if (s.equals("long")) {
idx = 2;
} else {
// Full
idx = 3;
}
dateFormatCombo.setSelectedIndex(idx);
feedDateCheck.setSelected(conf.isUseFeedDate());
bookmarksCheck.setSelected(conf.isGenerateBookmarks());
maxConnectionsSpinner.setValue(new Integer(conf.getMaxConnections()));
timeoutSpinner.setValue(new Integer(conf.getTimeout()));
downloadAttemptsSpinner.setValue(new Integer(conf.getDownloadAttempts()));
acceptCharsetText.setText(conf.getAcceptCharset());
cacheDirectoryText.setText(conf.getCacheDirectory());
cacheExpirySpinner.setValue(new Integer(conf.getCacheExpiration()));
compactCacheCheck.setSelected(conf.isAutoCompactCache());
useProxyCheck.setSelected(conf.isUseProxy());
proxyHostText.setText(conf.getProxyHost());
proxyPortSpinner.setValue(new Integer(conf.getProxyPort()));
proxyUserText.setText(conf.getProxyUser());
proxyPasswordText.setText(conf.getProxyPassword());
logFileCheck.setSelected(conf.isLogEnabled());
logFileText.setText(conf.getLogFile());
logFileSizeSpinner.setValue(new Integer(conf.getMaxLogSize()));
logLevelCombo.setSelectedItem(conf.getLogLevel().getName());
cookiesTxtText.setText(conf.getCookiesTxt());
pluckthisJXLText.setText(conf.getPluckThisJXL());
autoUpdatePanel.setFiles(conf.getAutoUpdateJXLs());
autoUpdatePeriodCheck.setSelected(conf.isAutoUpdatePeriodEnabled());
Period period = conf.getAutoUpdatePeriod();
autoUpdateFromSpinner.setValue(period.getFrom().toDate());
autoUpdateToSpinner.setValue(period.getTo().toDate());
autoUpdateIntervalSpinner.setValue(new Integer(conf.getAutoUpdateInterval()));
lafBox.selectCurrent();
lafListener = new LAFListener();
lafBox.addItemListener(lafListener);
plasticThemeCombo.setSelectedTheme(conf.getPlasticTheme());
browserText.setText(conf.getBrowser());
autoCloseCheck.setSelected(conf.isAutoCloseConversion());
displayFullFilePathCheck.setSelected(conf.isDisplayFullFilePath());
autoSelectDueCheck.setSelected(conf.isAutoSelectDue());
showSplashScreenCheck.setSelected(conf.isShowSplashScreen());
confirmCutCheck.setSelected(conf.isConfirmCut());
trayIconCheck.setSelected(conf.isMinimizeToTrayIcon());
imageIOCheck.setSelected(conf.isUseImageIO());
hotSyncListener.itemStateChanged(null);
destinationListener.itemStateChanged(null);
proxyListener.stateChanged(null);
logListener.stateChanged(null);