Package es.java.otro.model

Examples of es.java.otro.model.Entry


        feedTable.setHeaderVisible(true);
        feedTable.setLayoutData(gridData);
        feedTable.setLinesVisible(true);
        feedTable.addSelectionListener(new org.eclipse.swt.events.SelectionAdapter() {
          public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
            Entry entry = (Entry) ((StructuredSelection)getSite().getSelectionProvider().getSelection()).getFirstElement();

            BrowserEditorInput input = new BrowserEditorInput();
            input.setEntry(entry);
            IWorkbenchPage page = PlatformUI.getWorkbench()
        .getActiveWorkbenchWindow().getActivePage();
View Full Code Here


    this.columnIndex = columnIndex;
  }
 
  @Override
  public int compare(Viewer viewer, Object o1, Object o2) {
    Entry e1 = (Entry) o1;
    Entry e2 = (Entry) o2;
    int rc = 0;
    switch (columnIndex) {
    case 0:
      rc = new Boolean( e1.isUnread()).compareTo(e2.isUnread());
      break;
    case 1:
      rc = e1.getTitle().compareTo(e2.getTitle());
      break;
    case 2:
      rc = e1.getPublishDate().compareTo(e2.getPublishDate());
      break;
    case 3:
      rc = e1.getAuthor().compareTo(e2.getAuthor());
      break;
    default:
      rc = 0;
    }
    TableViewer tableViewer = (TableViewer) viewer;
View Full Code Here


  public String getColumnText(Object element, int columnIndex) {
    String ret = null;
    if (element instanceof Entry) {
      Entry entry = (Entry) element;
      switch (columnIndex) {
      case COLUMN_TITLE:
        ret = entry.getTitle();
        break;
      case COLUMN_PUBLISHED:
        ret = (entry.getPublishDate() == null) ? "" : entry.getPublishDate().toString();
      case COLUMN_AUTHOR:
        ret = entry.getAuthor();
           
      default:
        break;
      }
    }
View Full Code Here

      Feed feed = (Feed) element;
      return feed.getName();
    } else if (element instanceof Root) {
      return "Feeds";
    } else if (element instanceof Entry) {
      Entry entry = (Entry) element;
      return entry.getTitle();
    } else
      return element.toString();
  }
View Full Code Here

      f = new Feed();
      f.setName(feed.getTitle());
      f.setUrl(feed.getLink());
      for (Iterator it = feed.getEntries().iterator(); it.hasNext();) {
        SyndEntry entry = (SyndEntry) it.next();
        Entry modelEntry = new Entry();
        modelEntry.setTitle(entry.getTitle());
        modelEntry.setUrl(entry.getLink());
        modelEntry.setPublishDate(entry.getPublishedDate());
        modelEntry.setAuthor(entry.getAuthor());
        modelEntry.setHtml(entry.getDescription().getValue());
        f.addEntry(modelEntry);

      }
    }
    return f;
View Full Code Here

TOP

Related Classes of es.java.otro.model.Entry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.