{
super(Dialog.this, Strings.message("whatshot.dialog.title") + " - " + Strings.message("whatshot.setup"));
taIgnorePatterns = new JTextArea();
taIgnorePatterns.setLineWrap(false);
taIgnorePatterns.setDocument(new DocumentAdapter(new BufferedValueModel(new PropertyAdapter(
prefs, UserPreferences.PROP_WH_IGNORE), getTriggerChannel())));
chDontCountSelfLinks = ComponentsFactory.createCheckBox(
Strings.message("whatshot.setup.no.self.links"),
prefs, UserPreferences.PROP_WH_NOSELFLINKS, getTriggerChannel());
chSuppressSameSource = ComponentsFactory.createCheckBox(
Strings.message("whatshot.setup.no.same.source"),
prefs, UserPreferences.PROP_WH_SUPPRESS_SAME_SOURCE_LINKS, getTriggerChannel());
// Guide selector
final Map<String, FGuide> guidesMap = new HashMap<String, FGuide>();
Vector<FGuide> guides = new Vector<FGuide>();
FGuide allGuides = new FGuide("", Strings.message("whatshot.setup.all.guides"));
guides.add(allGuides);
guidesMap.put(allGuides.key, allGuides);
int cnt = guidesSet.getGuidesCount();
for (int i = 0; i < cnt; i++)
{
String t = guidesSet.getGuideAt(i).getTitle();
FGuide fg = new FGuide(t);
guides.add(fg);
guidesMap.put(fg.key, fg);
}
ValueModel mdlGuides = new AbstractConverter(
new PropertyAdapter(prefs, UserPreferences.PROP_WH_TARGET_GUIDE))
{
public Object convertFromSubject(Object o)
{
return guidesMap.get(o);
}