|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.rssowl.controller.NewsText
public class NewsText
This is the ViewForm where a newsitem is displayed with Title, URL to the news and the description.
| Field Summary | |
|---|---|
private BrowserPanel |
browserPanel
|
private SashForm |
contentSash
|
(package private) MenuItem |
copyItem
|
private MenuItem |
copyItemUrl
|
private Composite |
descriptionHolder
|
(package private) Display |
display
|
(package private) EventManager |
eventManager
|
(package private) boolean |
isReset
|
private boolean |
isShowingNews
|
(package private) int |
lastRate
|
private Menu |
linkMenu
|
private Composite |
newsContentHolder
|
private ViewForm |
newsContentViewForm
|
private Composite |
newsContentViewFormHeader
|
(package private) StyledText |
newsText
|
private Composite |
newsTextHolder
|
(package private) Menu |
newsTextMenu
|
(package private) StyledText |
newsTextTitle
|
(package private) ToolBar |
newsTextToolBar
|
(package private) net.sourceforge.rssowl.controller.forms.Hyperlink |
newsTextUrl
|
private MenuItem |
openExternalItem
|
(package private) MenuItem |
openInBrowserItem
|
private MenuItem |
printNews
|
private MenuItem |
rateBad
|
(package private) Composite |
rateComposite
|
(package private) Menu |
rateDropdown
|
private MenuItem |
rateFantastic
|
private MenuItem |
rateGood
|
private MenuItem |
rateModerate
|
(package private) ToolItem |
rateToolItem
|
private MenuItem |
rateVeryBad
|
private boolean |
requiresUpdate
|
(package private) NewsItem |
rssNewsItem
|
(package private) GUI |
rssOwlGui
|
private MenuItem |
selectAllItem
|
(package private) Shell |
shell
|
(package private) Composite |
urlTitleHolder
|
private MenuItem |
useBrowserForNewsText
|
(package private) int |
x
|
(package private) int |
y
|
| Constructor Summary | |
|---|---|
NewsText(Display display,
Shell shell,
SashForm contentSash,
GUI rssOwlGui,
EventManager eventManager)
Instantiate a new NewsText to display a newsitem |
|
| Method Summary | |
|---|---|
(package private) void |
checkWord(StyledText text)
Get the word from the position where the mouse is and check if the word is an URL. |
(package private) void |
clearNewstext()
Empty the newstext viewform |
private void |
createBrowserPanel(boolean onStartup)
Create the browser panel to display newstext in the internal browser |
private void |
createStyledText()
Create the StyledText to display the newstext. |
private void |
displayNews(NewsItem rssNewsItem)
Display news in the ViewForm |
(package private) void |
displayNews(java.lang.String urlOrTitle,
java.lang.String newsTitle)
Display the selected news in the newstext-viewform |
private void |
displayNewsInBrowser()
Display the selected news in the internal browser. |
private void |
displayNewsInStyledText()
Display selected news in a StyledText |
private void |
displayNewsLinkInBrowser(java.lang.String link)
Display the Link of the News using the internal browser. |
private void |
displayNewsMetaInfo()
Display Title and link of the news |
BrowserPanel |
getBrowserPanel()
Get the BrowserPanel of the Newstext panel in case internal browser view is activated for newstext |
StyledText |
getNewsTextTitle()
Let other objects access this controll (for example to focus on it) |
java.lang.String |
getPrintableNewstext()
Get the currently viewed newsitem's text to print. |
private void |
initComponents()
Init all the components |
private boolean |
isShowingNews(NewsItem newsItem)
Check if the given NewsItem is currently being displayed |
(package private) void |
onMouseMove(MouseEvent e)
Called whenever the mouse is moving |
(package private) void |
onMouseUp(MouseEvent e)
Called whenever the mouse button was released |
(package private) void |
rateNews(NewsItem rssNewsItem,
int rateLevel)
AmphetaRate has been Disabled for now! |
private void |
rebuildNewsText()
Rebuild the newstext area |
void |
setNewsTextToolBarVisible(boolean visible)
Set the NewsText-ToolBar visible or invisible based on the given argument. |
void |
setRequiresUpdate()
Explicitly marks the newstext as required to update. |
private void |
updateAccelerators()
Update the accelerators on the menuitems |
void |
updateFonts()
All implementing classes must provide a method to update the fonts of all GUI elements that provide a setFont() Method. |
void |
updateI18N()
Update all controlls text with i18n |
void |
updateLinkColor()
Update color of Link Label |
(package private) void |
updateNewsTextComposite()
Update the newstext composite to either show Internal Browser or StyledText for the newstext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private BrowserPanel browserPanel
private SashForm contentSash
private MenuItem copyItemUrl
private Composite descriptionHolder
private boolean isShowingNews
private Menu linkMenu
private Composite newsContentHolder
private ViewForm newsContentViewForm
private Composite newsContentViewFormHeader
private Composite newsTextHolder
private MenuItem openExternalItem
private MenuItem printNews
private MenuItem rateBad
private MenuItem rateFantastic
private MenuItem rateGood
private MenuItem rateModerate
private MenuItem rateVeryBad
private boolean requiresUpdate
private MenuItem selectAllItem
private MenuItem useBrowserForNewsText
MenuItem copyItem
Display display
EventManager eventManager
boolean isReset
int lastRate
StyledText newsText
Menu newsTextMenu
StyledText newsTextTitle
ToolBar newsTextToolBar
net.sourceforge.rssowl.controller.forms.Hyperlink newsTextUrl
MenuItem openInBrowserItem
Composite rateComposite
Menu rateDropdown
ToolItem rateToolItem
NewsItem rssNewsItem
GUI rssOwlGui
Shell shell
Composite urlTitleHolder
int x
int y
| Constructor Detail |
|---|
public NewsText(Display display,
Shell shell,
SashForm contentSash,
GUI rssOwlGui,
EventManager eventManager)
display - The displayshell - The shellcontentSash - The Sashform where to add the ViewFormrssOwlGui - Access some methods of the main controllereventManager - The event manager| Method Detail |
|---|
public BrowserPanel getBrowserPanel()
public StyledText getNewsTextTitle()
public java.lang.String getPrintableNewstext()
public void setNewsTextToolBarVisible(boolean visible)
visible - Set to TRUE if the Toolbar is to be visible.public void setRequiresUpdate()
public void updateFonts()
IFontChangeable
updateFonts in interface IFontChangeableIFontChangeable.updateFonts()public void updateI18N()
updateI18N in interface ITranslatablepublic void updateLinkColor()
private void createBrowserPanel(boolean onStartup)
onStartup - If TRUE this method is called on startup of RSSOwlprivate void createStyledText()
private void displayNews(NewsItem rssNewsItem)
rssNewsItem - The newsitem to displayprivate void displayNewsInBrowser()
private void displayNewsInStyledText()
private void displayNewsLinkInBrowser(java.lang.String link)
link - The valid link of the Newsitem to display.private void displayNewsMetaInfo()
private void initComponents()
private boolean isShowingNews(NewsItem newsItem)
newsItem - The newsitem to check if being displayed
private void rebuildNewsText()
private void updateAccelerators()
void checkWord(StyledText text)
text - StyledText to check the wordvoid clearNewstext()
void displayNews(java.lang.String urlOrTitle,
java.lang.String newsTitle)
urlOrTitle - The URL / Path or Title of the RSS XMLnewsTitle - Title of the selected newsvoid onMouseMove(MouseEvent e)
e - The occuring MouseEventvoid onMouseUp(MouseEvent e)
e - The occuring MouseEvent
void rateNews(NewsItem rssNewsItem,
int rateLevel)
rssNewsItem - The newsitem to raterateLevel - The rating levelvoid updateNewsTextComposite()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||