final private Form initializeDetailsForm( final RssItunesFeed feed ) {
//#ifdef DTEST
System.gc();
long beginMem = Runtime.getRuntime().freeMemory();
//#endif
Form displayDtlForm = new Form( feed.getName() );
displayDtlForm.addCommand( m_backCommand );
displayDtlForm.setCommandListener(this);
final boolean pageEnabled = m_appSettings.getPageEnabled();
final boolean htmlEnabled = m_appSettings.getHtmlEnabled();
int fontSize = pageEnabled ? getFontSize() : 0;
if (m_itunesEnabled && feed.isItunes()) {
final String language = feed.getLanguage();
if (language.length() > 0) {
displayDtlForm.append(getTextItem(pageEnabled, htmlEnabled,
"Language:", language, fontSize, false,
displayDtlForm, this));
}
final String author = feed.getAuthor();
if (author.length() > 0) {
displayDtlForm.append(getTextItem(pageEnabled, htmlEnabled,
"Author:", author, fontSize, false,
displayDtlForm, this));
}
final String subtitle = feed.getSubtitle();
if (subtitle.length() > 0) {
displayDtlForm.append(getTextItem(pageEnabled, htmlEnabled,
"Subtitle:",
subtitle, fontSize, false, displayDtlForm, this));
}
final String summary = feed.getSummary();
if (summary.length() > 0) {
displayDtlForm.append(getTextItem(pageEnabled, htmlEnabled,
"Summary:", summary, fontSize, false,
displayDtlForm, this));
}
displayDtlForm.append(new StringItem("Explicit:", feed.getExplicit()));
final String title = feed.getTitle();
if (title.length() > 0) {
displayDtlForm.append(getTextItem(pageEnabled, htmlEnabled,
"title:", title, fontSize, false,
displayDtlForm, this));
}
final String description = feed.getDescription();
if (description.length() > 0) {
displayDtlForm.append(getTextItem(pageEnabled, htmlEnabled,
"Description:", description, fontSize, false,
displayDtlForm, this));
}
}
final String link = feed.getLink();
if (link.length() > 0) {
displayDtlForm.append(getTextItem(pageEnabled, htmlEnabled,
"Link:", link, fontSize, true,
displayDtlForm, this));
}
final Date feedDate = feed.getDate();
if (feedDate != null) {
displayDtlForm.append(getTextItem(pageEnabled, htmlEnabled,
"Date:", feedDate.toString(), fontSize, false,
displayDtlForm, this));
}
//#ifdef DTEST
System.gc();