net.sourceforge.rssowl.controller
Class NewsTable

java.lang.Object
  extended bynet.sourceforge.rssowl.controller.NewsTable
All Implemented Interfaces:
ITranslatable

public class NewsTable
extends Object
implements ITranslatable

Class to create a table holding news from a NewsItem.

Version:
1.1.3
Author:
Benjamin Pasero

Field Summary
private  org.eclipse.swt.widgets.MenuItem addFeedToFav
           
private  org.eclipse.swt.widgets.MenuItem blogNews
           
private  org.eclipse.swt.widgets.MenuItem cascadeItemRateBad
           
private  org.eclipse.swt.widgets.MenuItem cascadeItemRateFantastic
           
private  org.eclipse.swt.widgets.MenuItem cascadeItemRateGood
           
private  org.eclipse.swt.widgets.MenuItem cascadeItemRateModerate
           
private  org.eclipse.swt.widgets.MenuItem cascadeItemRateVeryBad
           
private static String[] columnOrder
          Sort order of columns in newstable
private  org.eclipse.swt.widgets.MenuItem copyUrlItem
           
(package private)  EventManager eventManager
           
private  org.eclipse.swt.widgets.MenuItem generateHTML
           
private  org.eclipse.swt.widgets.MenuItem generatePDF
           
private  org.eclipse.swt.widgets.MenuItem generateRTF
           
(package private)  boolean isNewsSelected
           
(package private)  String language
           
private  org.eclipse.swt.widgets.MenuItem mailLinkToFriend
           
private  org.eclipse.swt.widgets.MenuItem markAllReadItem
           
private  org.eclipse.swt.widgets.MenuItem markUnreadItem
           
private  org.eclipse.swt.widgets.MenuItem rateNews
           
private  org.eclipse.swt.widgets.MenuItem reloadFeed
           
(package private)  GUI rssOwlGui
           
private  org.eclipse.swt.widgets.MenuItem searchFeed
           
private  org.eclipse.swt.custom.CTabItem tabItem
           
private  org.eclipse.swt.widgets.Menu tableMenu
           
 
Constructor Summary
NewsTable(GUI rssOwlGui, org.eclipse.swt.custom.CTabItem tabItem, EventManager eventManager)
          Instantiate a new NewsTable
 
Method Summary
(package private) static void actionDisplayNextNews(boolean showUnread)
          Display the next news in the table.
(package private) static boolean actionDisplayNextNews(org.eclipse.swt.custom.CTabItem tabItem, boolean showUnread)
          Try to select the next (unread/read) news from the given TabItem
(package private)  void actionNavigateNews(boolean next)
          Display the selected news in the table
(package private)  void actionSelectNews(org.eclipse.swt.widgets.Table newsTable, int index)
          Select the index on the given Newstable
 org.eclipse.swt.widgets.Table createNewsTable(org.eclipse.swt.widgets.Composite newsHeaderTableHolder)
          Create a new table holding news
static void fillTable(org.eclipse.swt.widgets.Table table, Hashtable newsItems, Vector newsItemOrder, Vector newsItemInfos, boolean performSearch)
          Fill the given table using the given items.
static void fillTable(org.eclipse.swt.widgets.Table table, Hashtable newsItems, Vector newsItemOrder, Vector newsItemInfos, boolean performSearch, int[] columnWidth)
          Fill the given table using the given items.
static void fillTableColumns(org.eclipse.swt.widgets.Table table, Hashtable newsItems, Vector newsItemOrder, Vector newsItemInfos, boolean performSearch)
          Fill columns of the given table
(package private) static void markAllRead(org.eclipse.swt.widgets.Table newsTable)
          Mark all tableitems of the given table read
(package private)  void onKeyPressed(org.eclipse.swt.widgets.Table newsTable, org.eclipse.swt.events.KeyEvent e)
          Called whenever a key is pressed on the Table
(package private)  void onMouseDoubleClick(org.eclipse.swt.widgets.Table newsTable)
          Called whenever the table is doubleclicked on
(package private)  void onMouseDown(org.eclipse.swt.widgets.Table newsTable, org.eclipse.swt.widgets.Event e)
          An item of the newstable has been selected with the Mouse
(package private)  void onMouseUp(org.eclipse.swt.widgets.Table newsTable, org.eclipse.swt.widgets.Event event)
          Called whenever the mouse button is released
(package private)  void setNewsSelectedState(boolean newsSelected)
          Set a new state to some items of the popup
private  void updateAccelerators()
          Update the accelerators on the menuitems
 void updateI18N()
          Update translation of all String literals
(package private) static void updateTableItemStyle(org.eclipse.swt.widgets.TableItem item)
          Update the table items style.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

columnOrder

private static final String[] columnOrder
Sort order of columns in newstable


addFeedToFav

private org.eclipse.swt.widgets.MenuItem addFeedToFav

blogNews

private org.eclipse.swt.widgets.MenuItem blogNews

cascadeItemRateBad

private org.eclipse.swt.widgets.MenuItem cascadeItemRateBad

cascadeItemRateFantastic

private org.eclipse.swt.widgets.MenuItem cascadeItemRateFantastic

cascadeItemRateGood

private org.eclipse.swt.widgets.MenuItem cascadeItemRateGood

cascadeItemRateModerate

private org.eclipse.swt.widgets.MenuItem cascadeItemRateModerate

cascadeItemRateVeryBad

private org.eclipse.swt.widgets.MenuItem cascadeItemRateVeryBad

copyUrlItem

private org.eclipse.swt.widgets.MenuItem copyUrlItem

generateHTML

private org.eclipse.swt.widgets.MenuItem generateHTML

generatePDF

private org.eclipse.swt.widgets.MenuItem generatePDF

generateRTF

private org.eclipse.swt.widgets.MenuItem generateRTF

mailLinkToFriend

private org.eclipse.swt.widgets.MenuItem mailLinkToFriend

markAllReadItem

private org.eclipse.swt.widgets.MenuItem markAllReadItem

markUnreadItem

private org.eclipse.swt.widgets.MenuItem markUnreadItem

rateNews

private org.eclipse.swt.widgets.MenuItem rateNews

reloadFeed

private org.eclipse.swt.widgets.MenuItem reloadFeed

searchFeed

private org.eclipse.swt.widgets.MenuItem searchFeed

tabItem

private org.eclipse.swt.custom.CTabItem tabItem

tableMenu

private org.eclipse.swt.widgets.Menu tableMenu

eventManager

EventManager eventManager

isNewsSelected

boolean isNewsSelected

language

String language

rssOwlGui

GUI rssOwlGui
Constructor Detail

NewsTable

public NewsTable(GUI rssOwlGui,
                 org.eclipse.swt.custom.CTabItem tabItem,
                 EventManager eventManager)
Instantiate a new NewsTable

Parameters:
rssOwlGui - The maincontroller
tabItem - The CTabItem this Newstable is added to
eventManager - The event manager
Method Detail

fillTable

public static void fillTable(org.eclipse.swt.widgets.Table table,
                             Hashtable newsItems,
                             Vector newsItemOrder,
                             Vector newsItemInfos,
                             boolean performSearch)
Fill the given table using the given items. Ludovic Kim-Xuan Galibert

Parameters:
table - the Table to fill.
newsItems - the Hashtable of RSSNewsItems to be displayed.
newsItemOrder - the ordering of the RSSNewsItems as keys to retrieve the RSSNewsItems from the Hashtable.
newsItemInfos - a vector of identifiers for the type of info.
performSearch - true if a search should be performed, otherwise false.

fillTable

public static void fillTable(org.eclipse.swt.widgets.Table table,
                             Hashtable newsItems,
                             Vector newsItemOrder,
                             Vector newsItemInfos,
                             boolean performSearch,
                             int[] columnWidth)
Fill the given table using the given items. Ludovic Kim-Xuan Galibert

Parameters:
table - the Table to fill.
newsItems - the Hashtable of RSSNewsItems to be displayed.
newsItemOrder - the ordering of the RSSNewsItems as keys to retrieve the RSSNewsItems from the Hashtable.
newsItemInfos - a vector of identifiers for the type of info.
performSearch - true if a search should be performed, otherwise false.
columnWidth - The widths of each column in an int array

fillTableColumns

public static void fillTableColumns(org.eclipse.swt.widgets.Table table,
                                    Hashtable newsItems,
                                    Vector newsItemOrder,
                                    Vector newsItemInfos,
                                    boolean performSearch)
Fill columns of the given table

Parameters:
table - The table to add the columns
newsItems - The Newsitems
newsItemOrder - The order of the Newsitems
newsItemInfos - Infos to the Newsitems
performSearch - TRUE if a search is performed

actionDisplayNextNews

static void actionDisplayNextNews(boolean showUnread)
Display the next news in the table. If the last news (either unread or read) is reached, continue with news displayed in other opened Tabs.

Parameters:
showUnread - TRUE if only unread news shoulb be displayed

actionDisplayNextNews

static boolean actionDisplayNextNews(org.eclipse.swt.custom.CTabItem tabItem,
                                     boolean showUnread)
Try to select the next (unread/read) news from the given TabItem

Parameters:
tabItem - The tabitem containing news
showUnread - If TRUE only show unread news
Returns:
boolean TRUE if the next news was selected

markAllRead

static void markAllRead(org.eclipse.swt.widgets.Table newsTable)
Mark all tableitems of the given table read

Parameters:
newsTable - The table to mark read

updateTableItemStyle

static void updateTableItemStyle(org.eclipse.swt.widgets.TableItem item)
Update the table items style. Style unread items different from read ones.

Parameters:
item - A TableItem

createNewsTable

public org.eclipse.swt.widgets.Table createNewsTable(org.eclipse.swt.widgets.Composite newsHeaderTableHolder)
Create a new table holding news

Parameters:
newsHeaderTableHolder - The composite that holds the table
Returns:
Table The created table for the news

updateI18N

public void updateI18N()
Description copied from interface: ITranslatable
Update translation of all String literals

Specified by:
updateI18N in interface ITranslatable
See Also:
ITranslatable.updateI18N()

updateAccelerators

private void updateAccelerators()
Update the accelerators on the menuitems


actionNavigateNews

void actionNavigateNews(boolean next)
Display the selected news in the table

Parameters:
next - If TRUE select next news, if FALSE select previous news

actionSelectNews

void actionSelectNews(org.eclipse.swt.widgets.Table newsTable,
                      int index)
Select the index on the given Newstable

Parameters:
newsTable - The table the event occurs
index - The index to select in the table

onKeyPressed

void onKeyPressed(org.eclipse.swt.widgets.Table newsTable,
                  org.eclipse.swt.events.KeyEvent e)
Called whenever a key is pressed on the Table

Parameters:
newsTable - The newstable the event is occuring on
e - The occuring event

onMouseDoubleClick

void onMouseDoubleClick(org.eclipse.swt.widgets.Table newsTable)
Called whenever the table is doubleclicked on

Parameters:
newsTable - The table the event is occuring on

onMouseDown

void onMouseDown(org.eclipse.swt.widgets.Table newsTable,
                 org.eclipse.swt.widgets.Event e)
An item of the newstable has been selected with the Mouse

Parameters:
newsTable - The selected Table
e - The occured event

onMouseUp

void onMouseUp(org.eclipse.swt.widgets.Table newsTable,
               org.eclipse.swt.widgets.Event event)
Called whenever the mouse button is released

Parameters:
newsTable - The newstable the event is occuring on
event - The occuring Event

setNewsSelectedState

void setNewsSelectedState(boolean newsSelected)
Set a new state to some items of the popup

Parameters:
newsSelected - TRUE if a news is selected


RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo