|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.browser.TagHandler
de.enough.polish.browser.rss.RssTagHandler
public class RssTagHandler
| Field Summary | |
|---|---|
static String |
ATTR_RSS_ITEM
Deprecated. use RssItem.ATTRIBUTE_KEY instead |
static Command |
CMD_GO_TO_ARTICLE
default go to article command |
static Command |
CMD_RSS_ITEM_SELECT
default select command |
| Constructor Summary | |
|---|---|
RssTagHandler(Command linkCommand,
ItemCommandListener listener)
|
|
RssTagHandler(Command linkCommand,
ItemCommandListener listener)
Creates a new RSS tag handler |
|
| Method Summary | |
|---|---|
protected void |
addRssItem(String rssTitle,
String rssDescription,
String rssUrl)
Creates a new RSS item and it's link to the entry. |
protected void |
applyStylingForRssLink(Item item,
int index,
String rssUrl)
Subclasses can override this method for adding complex styles to RSS links. |
boolean |
handleTag(Container parentItem,
SimplePullParser parser,
String tagName,
boolean opening,
HashMap attributeMap,
Style style)
|
boolean |
isIncludeDescriptions()
Determines whether RSS descriptions should be included directly on the overview page |
protected void |
onViewUrl(String rssUrl,
Item item)
This method is called when an RSS item is actually being shown (visited). |
void |
register(Browser browser)
Register a given browser object for this TagHandler. |
void |
setIncludeDescriptions(boolean includeDescriptions)
Specifies whether RSS descriptions should be included directly on the overview page |
void |
setLinkCommand(Command link)
Sets the command that is used for opening <a href...> links. |
void |
setRssLinkStyle()
Sets a style different from .browserLink for items that point to RSS entries. |
void |
setRssLinkStyle(Style style)
Sets a style different from .browserLink for items that point to RSS entries. |
| Methods inherited from class de.enough.polish.browser.TagHandler |
|---|
addAttributeCommand, addCommands, addCommands, addTagCommand, getCommandsForTag, handleCommand, trim |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ATTR_RSS_ITEM
RssItem.ATTRIBUTE_KEY,
Constant Field Valuespublic static Command CMD_RSS_ITEM_SELECT
public static Command CMD_GO_TO_ARTICLE
| Constructor Detail |
|---|
public RssTagHandler(Command linkCommand,
ItemCommandListener listener)
public RssTagHandler(Command linkCommand,
ItemCommandListener listener)
linkCommand - the command that should be used for linkslistener - the corresponding command listener| Method Detail |
|---|
public void setLinkCommand(Command link)
link - the new commandpublic void register(Browser browser)
TagHandler
register in class TagHandlerbrowser - the browser to register.
public boolean handleTag(Container parentItem,
SimplePullParser parser,
String tagName,
boolean opening,
HashMap attributeMap,
Style style)
handleTag in class TagHandlerparentItem - the container item the put the browser items intoparser - the parsertagName - the name of the tag to handleopening - true if this is an opening tag, false otherwiseattributeMap - all attributes for the tagstyle - the style for the next item, can be null
true if the tag was handled, false otherwise
protected void addRssItem(String rssTitle,
String rssDescription,
String rssUrl)
rssTitle - the title of the RSS entryrssDescription - the descriptionrssUrl - the URL for the complete article
protected void applyStylingForRssLink(Item item,
int index,
String rssUrl)
item - the item that contains a link to the articleindex - the index of the itemrssUrl - the URL of the RSS item
protected void onViewUrl(String rssUrl,
Item item)
rssUrl - the URL of the RSS item that is to be shownitem - the UI item that is associated with the specified RSS URLapplyStylingForRssLink(Item, int, String)public void setRssLinkStyle()
.browserLink for items that point to RSS entries.
This method needs to be used with a #style preprocessing directive, e.g.
//#style rssLink myRssTagHandler.setRssLinkStyle();
public void setRssLinkStyle(Style style)
.browserLink for items that point to RSS entries.
style - the stylepublic boolean isIncludeDescriptions()
public void setIncludeDescriptions(boolean includeDescriptions)
includeDescriptions - true when descriptions should be included
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||