|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.java.feednread.backend.model.newstable.NewsFeedTableContentProvider
Takes a single NewsFeed model object to supply its contained
NewsFeedEntries to a JFace TableViewer
instance.
| Field Summary | |
static int |
AUTHOR_COLUMN
The index of the column to display the news author |
static int |
CATEGORY_COLUMN
The index of the column to display the NewsFeed category
|
static String[] |
COLUMN_IDENTIFIERS
The column identifiers used |
static int |
ENCLOSURE_COLUMN
The index of the enclosure column which shows an Image if
a news has an enclosure
|
private NewsFeed |
newsFeed
The NewsFeed that this content provider queries to supply
the data
|
static int |
NEWSFEED_COLUMN
The index of the column to display the NewsFeed title
|
static int |
PUBLISHED_DATE_COLUMN
The index of the column to display the publishing date of a news |
static int |
READ_STATUS_COLUMN
The index of the read status column which shows an Image representing a read/unread
news
|
static int |
TAGGED_STATUS_COLUMN
The index of the tagged status column which shows an image representing a tagged/untagged news |
static int |
TITLE_COLUMN
The index of the column to display the news title |
| Constructor Summary | |
NewsFeedTableContentProvider(NewsFeed newsFeed)
Creates a new NewsFeedTableContentProvider instance using
the specified newsfeed to collect the embedded news and store them in a
table structure.
|
|
| Method Summary | |
void |
defaultLanguageChanged(LanguageResourceChangeEvent lrce)
Called whenever the default language changes. |
void |
dispose()
Disposes of this content provider. |
int |
getColumnCount()
Gets the number of columns stored in this NewsFeedTableContentProvider.
|
String |
getColumnName(int columnIndex)
Gets the name of the column at the specified index. |
Object |
getColumnValue(Object value,
int columnIndex)
Gets the textual representation of a news column. |
Object[] |
getElements(Object inputElement)
Returns the elements to display in the viewer when its input is set to the given element. |
NewsFeed |
getNewsFeed()
Gets the NewsFeed that this
NewsFeedTableContentProvider collects the
news from
|
NewsFeedEntry[] |
getNewsFeedEntries()
Returns the NewsFeedEntry objects held by this
NewsFeedTableContentProvider.
|
NewsFeedEntry |
getNewsFeedEntry(int rowIndex)
Gets the news at the specified row. |
String |
getNewsFeedTitle()
Gets the title of the newsfeed represented by this NewsFeedTableContentProvider.
|
String |
getNewsFeedType()
Gets the type of the newsfeed represented by this NewsFeedTableContentProvider.
|
int |
getRowCount()
Gets the number of rows, i.e. news stored in this NewsFeedTableContentProvider.
|
void |
inputChanged(Viewer viewer,
Object oldInput,
Object newInput)
Notifies this content provider that the given viewer's input has been switched to a different element. |
void |
setNewsFeed(NewsFeed newsFeed)
Sets the NewsFeed that this
NewsFeedTableContentProvider collects the
news from
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int READ_STATUS_COLUMN
The index of the read status column which shows an Image representing a read/unread
news
public static final int TAGGED_STATUS_COLUMN
The index of the tagged status column which shows an image representing a tagged/untagged news
public static final int ENCLOSURE_COLUMN
The index of the enclosure column which shows an Image if
a news has an enclosure
public static final int PUBLISHED_DATE_COLUMN
The index of the column to display the publishing date of a news
public static final int TITLE_COLUMN
The index of the column to display the news title
public static final int AUTHOR_COLUMN
The index of the column to display the news author
public static final int CATEGORY_COLUMN
The index of the column to display the NewsFeed category
public static final int NEWSFEED_COLUMN
The index of the column to display the NewsFeed title
public static final String[] COLUMN_IDENTIFIERS
The column identifiers used
private NewsFeed newsFeed
The NewsFeed that this content provider queries to supply
the data
| Constructor Detail |
public NewsFeedTableContentProvider(NewsFeed newsFeed)
Creates a new NewsFeedTableContentProvider instance using
the specified newsfeed to collect the embedded news and store them in a
table structure.
newsFeed - the NewsFeed to collect the news from| Method Detail |
public void defaultLanguageChanged(LanguageResourceChangeEvent lrce)
Called whenever the default language changes.
defaultLanguageChanged in interface ILanguageResourceChangeListenerlrce - the triggered LanguageResourceChangeEventpublic void setNewsFeed(NewsFeed newsFeed)
Sets the NewsFeed that this
NewsFeedTableContentProvider collects the
news from
newsFeed - the NewsFeed to collect the
news frompublic NewsFeed getNewsFeed()
Gets the NewsFeed that this
NewsFeedTableContentProvider collects the
news from
NewsFeed that this
NewsFeedTableContentProvider collects the
news frompublic NewsFeedEntry[] getNewsFeedEntries()
Returns the NewsFeedEntry objects held by this
NewsFeedTableContentProvider.
NewsFeedEntry objects held by this
NewsFeedTableContentProvider.public String getNewsFeedTitle()
Gets the title of the newsfeed represented by this
NewsFeedTableContentProvider.
public String getNewsFeedType()
Gets the type of the newsfeed represented by this
NewsFeedTableContentProvider.
public int getRowCount()
Gets the number of rows, i.e. news stored in this
NewsFeedTableContentProvider.
public NewsFeedEntry getNewsFeedEntry(int rowIndex)
Gets the news at the specified row.
rowIndex - int the index of the row to get the news for
public int getColumnCount()
Gets the number of columns stored in this
NewsFeedTableContentProvider.
public String getColumnName(int columnIndex)
Gets the name of the column at the specified index.
columnIndex - int the index of the column to query the name for
public Object getColumnValue(Object value,
int columnIndex)
Gets the textual representation of a news column. The column indices are mapped to the internal data attributes of a single news.
getColumnValue in interface ITableContentProvidervalue - Object the NewsFeedEntry newscolumnIndex - int the index of the column to query the value for
public Object[] getElements(Object inputElement)
Returns the elements to display in the viewer when its input is set to the given element. These elements can be presented as rows in a table, items in a list, etc. The result is not modified by the viewer.
getElements in interface IStructuredContentProviderinputElement - the input element
public void dispose()
The viewer should not be updated during this call, as it is in the process of being disposed.
dispose in interface IContentProvider
public void inputChanged(Viewer viewer,
Object oldInput,
Object newInput)
A typical use for this method is registering the content provider as a listener to changes on the new input (using model-specific means), and deregistering the viewer from the old input. In response to these change notifications, the content provider should update the viewer (see the add, remove, update and refresh methods on the viewers).
The viewer should not be updated during this call, as it might be in the process of being disposed.
inputChanged in interface IContentProviderviewer - the vieweroldInput - the old input element, or null if the
viewer did not previously have an inputnewInput - the new input element, or null if the
viewer does not have an input
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||