|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.rssowl.controller.NewsTabFolder
This is the TabFolder that holds the opened feeds displaying a table with all news header and some informations about the channel.
Field Summary | |
private org.eclipse.swt.widgets.MenuItem |
close
|
private org.eclipse.swt.widgets.MenuItem |
closeAll
|
(package private) org.eclipse.swt.widgets.MenuItem |
closeAllKeepCurrent
|
(package private) org.eclipse.swt.widgets.MenuItem |
closeAllKeepFeeds
|
(package private) org.eclipse.swt.custom.SashForm |
contentPane
|
private org.eclipse.swt.widgets.Display |
display
|
static int |
DISPLAY_MODE_FOCUS
Display Mode: Focus Feed |
static int |
DISPLAY_MODE_FOCUS_FIRST
Display Mode: Focus Feed that is on Tabposition 1 |
static int |
DISPLAY_MODE_NO_FOCUS
Display Mode: Do not Focus Feed |
(package private) EventManager |
eventManager
|
private Vector |
lastOpenedFeeds
|
private int |
lastTabState
|
private static int |
MAX_TAB_TITLE_LENGTH
Maximum number of chars for a TabItem Title |
(package private) boolean |
mouseInTab
|
(package private) org.eclipse.swt.custom.CTabFolder |
newsHeaderTabFolder
|
private org.eclipse.swt.widgets.Composite |
newsHeaderTabFolderHolder
|
(package private) ViewForm |
newsHeaderViewForm
|
(package private) GUI |
rssOwlGui
|
private NewsTabFolderDND |
rssOwlNewsTabFolderDND
|
(package private) org.eclipse.swt.widgets.Shell |
shell
|
private static int |
TAB_STATE_BROWSER
Tab State: Displaying a browser |
private static int |
TAB_STATE_EMPTY
Tab State: TabFolder empty |
private static int |
TAB_STATE_ERROR
Tab State: Displaying an error |
private static int |
TAB_STATE_FEED
Tab State: Displaying a feed |
private static int |
TAB_STATE_MESSAGE
Tab State: Displaying a message |
(package private) org.eclipse.swt.widgets.Menu |
tabFolderMenu
|
(package private) org.eclipse.swt.widgets.MenuItem |
tabPositionBottom
|
private org.eclipse.swt.widgets.MenuItem |
tabPositionMenu
|
(package private) org.eclipse.swt.widgets.MenuItem |
tabPositionTop
|
Constructor Summary | |
NewsTabFolder(org.eclipse.swt.widgets.Display display,
org.eclipse.swt.widgets.Shell shell,
org.eclipse.swt.custom.SashForm contentPane,
GUI rssOwlGui,
EventManager eventManager)
Instantiate a new NewsTabFolder holding the opened news feeds and the news header. |
Method Summary | |
void |
addFeedToLastOpened(String url)
Add the URL of a feed to the list of feeds that RSSOwl shall open after restart. |
(package private) void |
announceTabFolderState(TabItemData data,
int state)
Announce the state of the TabFolder. |
(package private) void |
closeAll()
Close all opened tabs |
(package private) void |
closeAll(boolean keepCurrent,
boolean keepFeeds)
Close all tabs but keep newsfeeds |
(package private) void |
closeCurrent()
Close current opened tab |
void |
closeTab(org.eclipse.swt.custom.CTabItem tabItem)
Close the given tabItem |
org.eclipse.swt.browser.Browser |
createBrowserPopupTab()
Create a new Tab for a popup. |
(package private) void |
createBrowserTab(org.eclipse.swt.custom.CTabItem tabItem,
String url)
Create the browser in the given Tab and open the given URL. |
void |
displayBrowserTab(String url)
Display a new browser tab in the tabfolder |
void |
displayNewsfeed(Channel rssChannel,
String url,
String searchPattern,
boolean reselectNews,
int displayMode)
Display the selected newsfeed in the TabFolder |
(package private) void |
exportToDocument(File targetFile,
int format,
String newsTitle)
Export the selected RSS feed to PDF / RTF or HTML into the given targetFile. |
(package private) void |
exportToDocument(int format,
String newsTitle)
Export the selected RSS feed to PDF / RTF or HTML. |
boolean |
focusTab()
Check wether new tabs should get focus. |
(package private) Channel |
getChannel(org.eclipse.swt.custom.CTabItem tabItem)
Get Channel from the given Tab |
org.eclipse.swt.custom.CTabItem |
getFeedTabItem(String title)
Get the tabitem showing the given Feed or NULL. |
Vector |
getLastOpenedFeeds()
Get the Vector with the last opened newsfeeds. |
org.eclipse.swt.custom.CTabFolder |
getNewsHeaderTabFolder()
Let other objects access this controll (for example to focus on it) |
NewsTabFolderDND |
getRSSOwlNewsTabFolderDND()
Get the DND class that allows drag and drop on this tabfolder |
Channel |
getSelectedChannel()
Get Channel from the selected Tab |
(package private) NewsItem |
getSelectedNewsItem()
Get the selected newsitem |
(package private) NewsItem |
getSelectedNewsItem(String newsTitle)
Get the selected newsitem from the given title |
org.eclipse.swt.custom.CTabItem |
getTabItem(Category aggregatedCategory)
Get the tabitem for the given category or NULL. |
(package private) void |
gotoNextTab()
Goto next tab |
(package private) void |
gotoPreviousTab()
Goto previous tab |
private void |
initComponents()
Init all components |
private void |
initTabFolderPopup()
Init the Popupmenu on the TabFolder |
boolean |
isAggregationOpened(String title)
Check if a tab with the given title of the Aggregation is opened in the tabfolder. |
(package private) boolean |
isNoFeedOpen()
Check if no Feed is currently opened in the TabFolder. |
(package private) boolean |
isOnlyFeedsOpen()
Check if only Feeds are currently opened in the TabFolder. |
void |
loadURLInTab(String url)
Load a URL in a new TabItem. |
(package private) void |
onMaximize()
Called whenever the CTabFolder becomes maximized. |
(package private) void |
onMouseDoubleClick(org.eclipse.swt.events.MouseEvent e)
Called whenever the tabfolder is doubleclicked |
(package private) void |
onRestore()
Called whenever the CTabFolder becomes restored. |
void |
reloadFeed()
Reload the feed in the selected tab |
(package private) void |
reloadFeed(org.eclipse.swt.custom.CTabItem anItem)
Reload the given feed |
void |
searchInSelectedFeed()
Open search dialog and perform search on the selected tab |
void |
searchInSelectedFeed(String searchFor,
boolean reselectNews)
Search in visible Tab for the given String |
(package private) void |
setMaximized(boolean maximize)
Maximize the Newsheader Tabfolder if maximized is TRUE, otherwise restore the normal state. |
void |
showErrorTab(org.eclipse.swt.custom.CTabItem tabItem,
NewsfeedFactoryException e)
Display an error as a new tab in the tab folder |
void |
showErrorTab(String url,
NewsfeedFactoryException e)
Display an warning as a new tab in the tab folder |
void |
showLicenseTab(InputStream inS,
org.eclipse.swt.graphics.Image icon)
Display the License in a new tab |
(package private) void |
showMessageTab(String message,
String title,
org.eclipse.swt.graphics.Image icon)
Display a message in a new tab |
void |
showUpdateAvailableTab(String title,
String message)
Show information about new RSSOwl version in th UpdatePanel. |
(package private) void |
showWelcomeTab()
Show the Welcome Tab |
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 |
updateLastOpenedFeeds()
This method updates the lastOpenedFeeds Vector. |
void |
updateTabFolderState()
Update the state of the TabFolder and tell the MenuManager. |
void |
updateTabItemStatus(org.eclipse.swt.custom.CTabItem tabItem)
Update the state of the given TabItem to reflect wether unread news are available in the Channel that is displayed. |
(package private) void |
updateViewFormBorder()
Update state of 3D Border outside the ViewForm if neccessary |
(package private) void |
viewNewsInDocument(int format)
View the current opened feed as PDF / RTF or HTML document. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DISPLAY_MODE_FOCUS
public static final int DISPLAY_MODE_FOCUS_FIRST
public static final int DISPLAY_MODE_NO_FOCUS
private static final int MAX_TAB_TITLE_LENGTH
private static final int TAB_STATE_BROWSER
private static final int TAB_STATE_EMPTY
private static final int TAB_STATE_ERROR
private static final int TAB_STATE_FEED
private static final int TAB_STATE_MESSAGE
private org.eclipse.swt.widgets.MenuItem close
private org.eclipse.swt.widgets.MenuItem closeAll
private org.eclipse.swt.widgets.Display display
private Vector lastOpenedFeeds
private int lastTabState
private org.eclipse.swt.widgets.Composite newsHeaderTabFolderHolder
private NewsTabFolderDND rssOwlNewsTabFolderDND
private org.eclipse.swt.widgets.MenuItem tabPositionMenu
org.eclipse.swt.widgets.MenuItem closeAllKeepCurrent
org.eclipse.swt.widgets.MenuItem closeAllKeepFeeds
org.eclipse.swt.custom.SashForm contentPane
EventManager eventManager
boolean mouseInTab
org.eclipse.swt.custom.CTabFolder newsHeaderTabFolder
ViewForm newsHeaderViewForm
GUI rssOwlGui
org.eclipse.swt.widgets.Shell shell
org.eclipse.swt.widgets.Menu tabFolderMenu
org.eclipse.swt.widgets.MenuItem tabPositionBottom
org.eclipse.swt.widgets.MenuItem tabPositionTop
Constructor Detail |
public NewsTabFolder(org.eclipse.swt.widgets.Display display, org.eclipse.swt.widgets.Shell shell, org.eclipse.swt.custom.SashForm contentPane, GUI rssOwlGui, EventManager eventManager)
display
- The displayshell
- The shellcontentPane
- The Sashform where to add the ViewFormrssOwlGui
- Access some methods of the main controllereventManager
- The event managerMethod Detail |
public void addFeedToLastOpened(String url)
url
- The URL of the feedpublic void closeTab(org.eclipse.swt.custom.CTabItem tabItem)
tabItem
- Selected tabItempublic org.eclipse.swt.browser.Browser createBrowserPopupTab()
public void displayBrowserTab(String url)
url
- URL of the website to displaypublic void displayNewsfeed(Channel rssChannel, String url, String searchPattern, boolean reselectNews, int displayMode)
rssChannel
- The newsfeed to displayurl
- URL / Path to the RSS XMLsearchPattern
- Optional pattern for a searchreselectNews
- Wether to reselect an already selected newsdisplayMode
- One of the supported displaymodespublic boolean focusTab()
public org.eclipse.swt.custom.CTabItem getFeedTabItem(String title)
title
- The title of the Feed
public Vector getLastOpenedFeeds()
public org.eclipse.swt.custom.CTabFolder getNewsHeaderTabFolder()
public NewsTabFolderDND getRSSOwlNewsTabFolderDND()
public Channel getSelectedChannel()
public org.eclipse.swt.custom.CTabItem getTabItem(Category aggregatedCategory)
aggregatedCategory
- The category that is aggregated
public boolean isAggregationOpened(String title)
title
- The title of the Aggregation to look for
public void loadURLInTab(String url)
url
- URL of the Newspublic void reloadFeed()
public void searchInSelectedFeed()
public void searchInSelectedFeed(String searchFor, boolean reselectNews)
searchFor
- The String to search forreselectNews
- Wether to reselect a selected newspublic void showErrorTab(org.eclipse.swt.custom.CTabItem tabItem, NewsfeedFactoryException e)
tabItem
- The tabitem to load the error intoe
- The exception that occuredpublic void showErrorTab(String url, NewsfeedFactoryException e)
url
- URL / Path that caused the exceptione
- The exception that occuredpublic void showLicenseTab(InputStream inS, org.eclipse.swt.graphics.Image icon)
inS
- Source of the license fileicon
- The icon to use for the tabpublic void showUpdateAvailableTab(String title, String message)
title
- Title of the TabItemmessage
- Message containing the Changelogpublic void updateFonts()
IFontChangeable
updateFonts
in interface IFontChangeable
IFontChangeable.updateFonts()
public void updateI18N()
updateI18N
in interface ITranslatable
public void updateLastOpenedFeeds()
public void updateTabFolderState()
public void updateTabItemStatus(org.eclipse.swt.custom.CTabItem tabItem)
tabItem
- The TabItem to update the statusprivate void initComponents()
private void initTabFolderPopup()
void announceTabFolderState(TabItemData data, int state)
data
- The TabItemData model objectstate
- One of the five states of the TabFoldervoid closeAll()
void closeAll(boolean keepCurrent, boolean keepFeeds)
keepCurrent
- TRUE if the current tab should remain openedkeepFeeds
- TRUE if newsfeeds should remain openedvoid closeCurrent()
void createBrowserTab(org.eclipse.swt.custom.CTabItem tabItem, String url)
tabItem
- The TabItem to add the browserurl
- The URL to openvoid exportToDocument(File targetFile, int format, String newsTitle)
targetFile
- The target file to export the news intoformat
- PDF, RTF or HTMLnewsTitle
- If given, just export one newsitemvoid exportToDocument(int format, String newsTitle)
format
- PDF, RTF or HTMLnewsTitle
- If given, just export one newsitemChannel getChannel(org.eclipse.swt.custom.CTabItem tabItem)
tabItem
- The TabItem to get the Channel from
NewsItem getSelectedNewsItem()
NewsItem getSelectedNewsItem(String newsTitle)
newsTitle
- Title of the selected news
void gotoNextTab()
void gotoPreviousTab()
boolean isNoFeedOpen()
boolean isOnlyFeedsOpen()
void onMaximize()
void onMouseDoubleClick(org.eclipse.swt.events.MouseEvent e)
e
- The occuring MouseEventvoid onRestore()
void reloadFeed(org.eclipse.swt.custom.CTabItem anItem)
anItem
- the feed to reloadvoid setMaximized(boolean maximize)
maximize
- TRUE if maximizedvoid showMessageTab(String message, String title, org.eclipse.swt.graphics.Image icon)
message
- Message Stringtitle
- Title Stringicon
- The image icon to displayvoid showWelcomeTab()
void updateViewFormBorder()
void viewNewsInDocument(int format)
format
- PDF, RTF or HTML
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |