List of usage examples for com.google.gwt.ajaxfeed.client.impl EntryWrapper getLink
public String getLink();
From source file:com.google.gwt.sample.feedreader.client.EntryPanel.java
License:Apache License
public EntryPanel(final EntryWrapper entry, final Configuration.Feed parentFeed, WallToWallPanel parent) { super(entry.getTitle(), parent); addStyleName("EntryPanel"); this.entry = entry; this.parentFeed = parentFeed; UnsunkLabel title = new UnsunkLabel(entry.getTitle()); title.addStyleName("title"); UnsunkLabel snippit = new UnsunkLabel(entry.getContentSnippet()); snippit.addStyleName("snippit"); FlowPanel vp = new FlowPanel(); vp.add(title);/*from w ww . j a va 2s .c o m*/ vp.add(snippit); this.panelLabel = new PanelLabel(vp, new Command() { public void execute() { History.newItem(parentFeed.getUrl() + "||" + entry.getLink()); } }); }
From source file:com.google.gwt.sample.feedreader.client.FeedPanel.java
License:Apache License
private void redraw() { if (drawn || !isAttached()) { return;// w w w. j a va 2s. c om } drawn = true; if (!loadFinished) { add(new PanelLabel("Loading")); return; } clear(); DeferredCommand.addCommand(new IncrementalCommand() { final Iterator i = entries.iterator(); PanelLabel lastLabel; public boolean execute() { EntryWrapper entry = (EntryWrapper) i.next(); EntryPanel panel = new EntryPanel(entry, feed, FeedPanel.this); entryPanels.put(entry.getLink(), panel); lastLabel = panel.getLabel(); add(lastLabel); if (i.hasNext()) { return true; } else { // We want to format the last element a little differently lastLabel.addStyleName("last"); if (requestedEntry != null) { showEntry(requestedEntry); requestedEntry = null; } return false; } } }); }