|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.jface.window.Window
org.eclipse.jface.window.ApplicationWindow
net.sourceforge.java.feednread.frontend.MainApplicationWindow
The Feed'n Read main window holding all accessible application components.
| Nested Class Summary | |
private class |
MainApplicationWindow.CoolBarResizeHandler
Handles the resize of the enclosing Shell if the visual
CoolBar representation of the CoolBarManager
is resized due to rearrangements.
|
private class |
MainApplicationWindow.ShellHandler
Handles ShellEvents to map the application's tray behaviour.
|
| Nested classes inherited from class org.eclipse.jface.window.ApplicationWindow |
|
| Nested classes inherited from class org.eclipse.jface.window.Window |
Window.IExceptionHandler |
| Field Summary | |
private NewsFeedAddressBar |
addressBar
The address bar to enter a newsfeed url |
private MenuManager |
aggregateMenu
Aggregate menu |
private MainApplicationWindow.CoolBarResizeHandler |
coolBarResizeHandler
Handles resize events in the CoolBar |
private MenuManager |
editMenu
Edit menu |
private EventCentral |
eventCentral
|
private MenuManager |
exportMenu
Export menu |
private MenuManager |
extrasMenu
Extras menu |
private PShelfItem |
favoritesSideBarItem
The favorites tree sidebar item |
private SashForm |
feedViewDivider
The sash dividing the NewsFeedTabBar and the NewsContentView |
private MenuManager |
fileMenu
File menu |
private MenuManager |
helpMenu
Help menu |
private MenuManager |
importMenu
Import menu |
private Composite |
mainContainer
The container holding all application components |
private MenuManager |
mainMenu
Main menu |
private SashForm |
mainViewDivider
The sash dividing the news area (NewsFeedTabBar + NewsContentView) and the NewsFeedFavoritesTree |
static int |
MAXIMIZED_NEWS_VIEW
Constant for the maximized news view (NewsFeedTabBar + NewsContentView) |
private MenuManager |
newMenu
New menu |
static int |
NEWS_CONTENT_VIEW
Constant for the NewsContentView component |
private NewsContentView |
newsContent
The component showing the currently selected news content |
static int |
NEWSFEED_TAB_BAR
Constant for the NewsFeedTabBar component |
private NewsFeedFavoritesTree |
newsFeedFavoritesTree
The tree holding all favorite newsfeeds |
private NewsFeedWatchesTree |
newsFeedWatchesTree
The tree holding all newsfeed watches |
private NewsFeedTabBar |
newsTabBar
The tab bar to hold the single newsfeed, browser and filter tabs |
static int |
NOTIFICATION_BAR
Constant for the NotificationBar component |
private NotificationBar |
notificationBar
The component to show user notifications, i.e. progress and logging messages |
private SashForm |
outputViewDivider
The sash dividing the news area (NewsFeedTabBar + NewsContentView) and the NotificationBar |
private MainApplicationWindow.ShellHandler |
shellHandler
Handles ShellEvents in the Shell |
private SideBar |
sideBar
The sidebar to select from the various side bar items |
static int |
SIDEBAR
Constant for the SideBar component |
private ExtendedStatusLineManager |
statusLineMgr
The StatusLineManager extension |
private TrayHandler |
trayHandler
The TrayHandler of this application: Manages the system tray |
private TrayNotificationHandler |
trayNotificationHandler
The TrayNotificationHandler of this application: Manages notifications displayed in the system tray |
private MenuManager |
viewMenu
View menu |
private PShelfItem |
watchesSideBarItem
The newsfeed watches sidebar item |
| Fields inherited from class org.eclipse.jface.window.ApplicationWindow |
seperator1 |
| Fields inherited from class org.eclipse.jface.window.Window |
CANCEL, OK |
| Constructor Summary | |
MainApplicationWindow(SplashScreen splash)
Creates the MainApplicationWindow and disposes the
specified SplasScreen when finished.
|
|
| Method Summary | |
protected boolean |
canHandleShellCloseEvent()
Returns false if
ConfigurationManager.SEND_TO_TRAY_ON_CLOSE_KEY
is set to true. |
boolean |
close()
Closes this window, disposes its shell, and removes this window from its window manager (if it has one). |
protected void |
configureShell(Shell shell)
Configures the enclosed Shell of this
MainApplicationWindow.
|
protected void |
createComponents()
Creates the components used by this MainApplicationWindow.
|
protected Control |
createContents(Composite parent)
Creates the contents of this MainApplicationWindow.
|
protected CoolBarManager |
createCoolBarManager(int style)
Creates the CoolBarManager of this
MainApplicationWindow.
|
protected MenuManager |
createMenuManager()
Creates the MenuManager of this
MainApplicationWindow.
|
protected StatusLineManager |
createStatusLineManager()
Creates the StatusLineManager of this
MainApplicationWindow.
|
private void |
createTray()
Creates the tray control and notification handler. |
protected void |
createTrimWidgets(Shell shell)
Creates the trim widgets around the content area of this MainApplicationWindow
|
void |
defaultLanguageChanged(LanguageResourceChangeEvent lrce)
Called whenever the default language changes. |
private void |
dispose()
Disposes all resources claimed by this MainApplicationWindow.
|
protected Control |
getCoolBarControl()
Returns the control for this MainApplicationWindow 's
coolbar.
|
EventCentral |
getEventCentral()
Gets the EventCentral which grants access to all
Actions defined by this application.
|
protected Point |
getInitialLocation(Point initialSize)
Gets the initial location of this MainApplicationWindow.
|
protected Point |
getInitialSize()
Gets the initial size of this MainApplicationWindow.
|
Composite |
getMainContainer()
Gets the main container Composite which holds the
content area of this MainApplicationWindow.
|
Display |
getMainDisplay()
Gets the main Display that this
MainApplicationWindow is show in.
|
NewsContentView |
getNewsContentView()
Gets the NewsContentView component.
|
NewsFeedAddressBar |
getNewsFeedAddressBar()
Gets the NewsFeedAddressBar component.
|
NewsFeedFavoritesTree |
getNewsFeedFavoritesTree()
Gets the NewsFeedFavoritesTree component.
|
NewsFeedTabBar |
getNewsFeedTabBar()
Gets the NewsFeedTabBar component.
|
NewsFeedWatchesTree |
getNewsFeedWatchesTree()
Gets the NewsFeedWatchesTree component.
|
NotificationBar |
getNotificationBar()
Gets the NotificationBar component.
|
ProgressMonitor |
getProgressMonitor()
Gets the ProgressMonitor used by this
MainApplicationWindow to show the progress of a long
running task.
|
protected Control |
getToolBarControl()
Returns the control for this MainApplicationWindow 's
toolbar.
|
TrayNotificationHandler |
getTrayNotificationHandler()
Gets the TrayNotificationHandler of this application.
|
private void |
importTrees(SplashScreen splash)
Imports the NewsFeedFavoritesTree and
NewsFeedWatchesTree structures.
|
boolean |
isMinimized()
Returns true if the Shell that this
MainApplicationWindow is displayed in is minimized.
|
boolean |
isNewsFeedFavoritesTreeSelected()
Returns true if the NewsFeedFavoritesTree
component is currently selected in the SideBar component.
|
boolean |
isNewsFeedWatchesTreeSelected()
Returns true if the NewsFeedWatchesTree
component is currently selected in the SideBar component.
|
static void |
main(String[] args)
Feed'n Read Startup method. |
void |
maximize(int component)
Maxmimizes the specified component(s). |
int |
open()
Opens this window, creating it first if it has not yet been created. |
private void |
registerEventHandler()
Registers all event handlers required in this MainApplicationWindow context.
|
void |
restore(int component)
Restores the specified component(s). |
private void |
restoreSettings()
Restores the settings for this MainApplicationWindow
from the underlying configuration.
|
private void |
runEventLoop(Shell loopShell)
Runs the event loop for the given Shell.
|
void |
showNewsFeedFavoritesTree()
Shows the NewsFeedFavoritesTree, i.e. makes it
visible in the SideBar.
|
void |
showNewsFeedWatchesTree()
Shows the NewsFeedWatchesTree, i.e. makes it
visible in the SideBar.
|
private void |
storeSettings()
Stores the settings of this MainApplicationWindow in the
underlying configuration.
|
private void |
unregisterEventHandler()
Unregisters all event handlers from this MainApplicationWindow.
|
private void |
updateBrowserToolBarActions(LanguageResource resource)
Updates the browser toolbar Actions to reflect a change in
the current LanguageResource.
|
private void |
updateCoolBarManager(LanguageResource resource)
Updates the CoolBarManager to reflect a change in the
current LanguageResource.
|
private void |
updateMenuManager(LanguageResource resource)
Updates the MenuManager to reflect a change in
the current LanguageResource.
|
| Methods inherited from class org.eclipse.jface.window.ApplicationWindow |
addCoolBar, addMenuBar, addStatusLine, addToolBar, coolBarChildrenExist, createCoolBarControl, createCoolBarManager2, createStatusLine, createToolBarControl, createToolBarManager, createToolBarManager2, getCoolBarManager, getCoolBarManager2, getFont, getLayout, getMenuBarManager, getSeperator1, getStatusLineManager, getSymbolicFontName, getToolBarManager, getToolBarManager2, run, setStatus, showTopSeperator, toolBarChildrenExist |
| Methods inherited from class org.eclipse.jface.window.Window |
constrainShellSize, create, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, initializeBounds, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int SIDEBAR
Constant for the SideBar component
public static final int NEWSFEED_TAB_BAR
Constant for the NewsFeedTabBar component
public static final int NEWS_CONTENT_VIEW
Constant for the NewsContentView component
public static final int MAXIMIZED_NEWS_VIEW
Constant for the maximized news view (NewsFeedTabBar + NewsContentView)
public static final int NOTIFICATION_BAR
Constant for the NotificationBar component
private Composite mainContainer
The container holding all application components
private SashForm outputViewDivider
The sash dividing the news area (NewsFeedTabBar + NewsContentView) and the NotificationBar
private SashForm feedViewDivider
The sash dividing the NewsFeedTabBar and the NewsContentView
private SashForm mainViewDivider
The sash dividing the news area (NewsFeedTabBar + NewsContentView) and the NewsFeedFavoritesTree
private NewsFeedAddressBar addressBar
The address bar to enter a newsfeed url
private SideBar sideBar
The sidebar to select from the various side bar items
private PShelfItem favoritesSideBarItem
The favorites tree sidebar item
private PShelfItem watchesSideBarItem
The newsfeed watches sidebar item
private NewsFeedFavoritesTree newsFeedFavoritesTree
The tree holding all favorite newsfeeds
private NewsFeedWatchesTree newsFeedWatchesTree
The tree holding all newsfeed watches
private NewsFeedTabBar newsTabBar
The tab bar to hold the single newsfeed, browser and filter tabs
private NewsContentView newsContent
The component showing the currently selected news content
private NotificationBar notificationBar
The component to show user notifications, i.e. progress and logging messages
private TrayHandler trayHandler
The TrayHandler of this application: Manages the system tray
private TrayNotificationHandler trayNotificationHandler
The TrayNotificationHandler of this application: Manages notifications displayed in the system tray
private MenuManager mainMenu
Main menu
private MenuManager fileMenu
File menu
private MenuManager newMenu
New menu
private MenuManager viewMenu
View menu
private MenuManager extrasMenu
Extras menu
private MenuManager helpMenu
Help menu
private MenuManager editMenu
Edit menu
private MenuManager aggregateMenu
Aggregate menu
private MenuManager importMenu
Import menu
private MenuManager exportMenu
Export menu
private ExtendedStatusLineManager statusLineMgr
The StatusLineManager extension
private EventCentral eventCentral
private MainApplicationWindow.ShellHandler shellHandler
Handles ShellEvents in the Shell
private MainApplicationWindow.CoolBarResizeHandler coolBarResizeHandler
Handles resize events in the CoolBar
| Constructor Detail |
public MainApplicationWindow(SplashScreen splash)
Creates the MainApplicationWindow and disposes the
specified SplasScreen when finished.
splash - the SplashScreen instance to dispose if
the creation of this MainApplicationWindow is finished| Method Detail |
public void defaultLanguageChanged(LanguageResourceChangeEvent lrce)
Called whenever the default language changes.
defaultLanguageChanged in interface ILanguageResourceChangeListenerlrce - the triggered LanguageResourceChangeEventpublic Display getMainDisplay()
Gets the main Display that this
MainApplicationWindow is show in.
Display that this
MainApplicationWindow is show inpublic Composite getMainContainer()
Gets the main container Composite which holds the
content area of this MainApplicationWindow.
Composite which holds the
content area of this MainApplicationWindow.public NewsFeedAddressBar getNewsFeedAddressBar()
Gets the NewsFeedAddressBar component.
NewsFeedAddressBar componentpublic NewsFeedFavoritesTree getNewsFeedFavoritesTree()
Gets the NewsFeedFavoritesTree component.
NewsFeedFavoritesTree componentpublic NewsFeedWatchesTree getNewsFeedWatchesTree()
Gets the NewsFeedWatchesTree component.
NewsFeedWatchesTree componentpublic NewsFeedTabBar getNewsFeedTabBar()
Gets the NewsFeedTabBar component.
NewsFeedTabBar componentpublic NewsContentView getNewsContentView()
Gets the NewsContentView component.
NewsContentView componentpublic NotificationBar getNotificationBar()
Gets the NotificationBar component.
NotificationBar componentpublic EventCentral getEventCentral()
Gets the EventCentral which grants access to all
Actions defined by this application.
EventCentralpublic TrayNotificationHandler getTrayNotificationHandler()
Gets the TrayNotificationHandler of this application.
It is used to create notifications in the system tray.
TrayNotificationHandler; null if
the system the application is running on does not support a system traypublic void showNewsFeedFavoritesTree()
Shows the NewsFeedFavoritesTree, i.e. makes it
visible in the SideBar.
public void showNewsFeedWatchesTree()
Shows the NewsFeedWatchesTree, i.e. makes it
visible in the SideBar.
public boolean isNewsFeedFavoritesTreeSelected()
Returns true if the NewsFeedFavoritesTree
component is currently selected in the SideBar component.
true if the NewsFeedFavoritesTree
component is currently selected in the SideBar component;
false otherwiseisNewsFeedWatchesTreeSelected()public boolean isNewsFeedWatchesTreeSelected()
Returns true if the NewsFeedWatchesTree
component is currently selected in the SideBar component.
true if the NewsFeedWatchesTree
component is currently selected in the SideBar component;
false otherwiseisNewsFeedFavoritesTreeSelected()public boolean isMinimized()
Returns true if the Shell that this
MainApplicationWindow is displayed in is minimized.
true if the Shell that this
MainApplicationWindow is displayed in is minimized:
false otherwisepublic void maximize(int component)
Maxmimizes the specified component(s).
component - a constant for the component(s) to maximize;
the constants can be bitwise ored (combined with the | [OR] operator)
to maximize several components at the same time.SIDEBAR,
NEWSFEED_TAB_BAR,
NEWS_CONTENT_VIEWpublic void restore(int component)
Restores the specified component(s).
component - a constant for the component(s) to restore;
the constants can be bitwise ored (combined with the | [OR] operator)
to restore several components at the same time.SIDEBAR,
NEWSFEED_TAB_BAR,
NEWS_CONTENT_VIEWpublic ProgressMonitor getProgressMonitor()
Gets the ProgressMonitor used by this
MainApplicationWindow to show the progress of a long
running task.
ProgressMonitor used by this
MainApplicationWindow to show the progress of a long
running taskpublic int open()
Opens this window, creating it first if it has not yet been created.
If this window has been configured to block on open (
setBlockOnOpen), this method waits until the window is
closed by the end user, and then it returns the window's return code;
otherwise, this method returns immediately. A window's return codes are
window-specific, although two standard return codes are predefined:
OK and CANCEL.
Window.create()public boolean close()
Closes this window, disposes its shell, and removes this window from its
window manager (if it has one). Saves the
NewsFeedFavoritesTree to the default OPML file and
disposes all resources claimed.
true if the window is (or was already) closed, and
false if it is still openprotected boolean canHandleShellCloseEvent()
Returns false if
ConfigurationManager.SEND_TO_TRAY_ON_CLOSE_KEY
is set to true. In this case the shell close event is not
handled, i.e. the application stays open as long as not being closed from
the menu in the application system tray item.
false if
ConfigurationManager.SEND_TO_TRAY_ON_CLOSE_KEY
is set to true; true otherwiseprotected Control getCoolBarControl()
Returns the control for this MainApplicationWindow 's
coolbar.
MainApplicationWindow 's
coolbarApplicationWindow.getToolBarControl()protected Control getToolBarControl()
Returns the control for this MainApplicationWindow 's
toolbar.
MainApplicationWindow 's
toolbarApplicationWindow.getToolBarControl()protected void configureShell(Shell shell)
Configures the enclosed Shell of this
MainApplicationWindow.
Window.configureShell(org.eclipse.swt.widgets.Shell)protected Point getInitialSize()
Gets the initial size of this MainApplicationWindow.
MainApplicationWindowWindow.getInitialSize()protected Point getInitialLocation(Point initialSize)
Gets the initial location of this MainApplicationWindow.
Tries to query the configuration for the window location. If no setting
is found it centers the MainApplicationWindow horizontally
and vertically relative Monitor's client area. Otherwise the
location is set back to the setting found in the configuration.
initialSize - the initial size of the shell, as returned by
getInitialSize.
Shellprotected MenuManager createMenuManager()
Creates the MenuManager of this
MainApplicationWindow.
ApplicationWindow.createMenuManager()protected StatusLineManager createStatusLineManager()
Creates the StatusLineManager of this
MainApplicationWindow.
ApplicationWindow.createStatusLineManager()protected CoolBarManager createCoolBarManager(int style)
Creates the CoolBarManager of this
MainApplicationWindow.
ApplicationWindow.createCoolBarManager(int)protected void createTrimWidgets(Shell shell)
Creates the trim widgets around the content area of this
MainApplicationWindow
shell - the shellApplicationWindow.createTrimWidgets(org.eclipse.swt.widgets.Shell)protected Control createContents(Composite parent)
Creates the contents of this MainApplicationWindow.
parent - the parent component to embed the created contents
into
Control holding the contents of
this MainApplicationWindowWindow.createContents(org.eclipse.swt.widgets.Composite)protected void createComponents()
Creates the components used by this MainApplicationWindow.
private void dispose()
Disposes all resources claimed by this MainApplicationWindow.
private void storeSettings()
Stores the settings of this MainApplicationWindow in the
underlying configuration.
private void restoreSettings()
Restores the settings for this MainApplicationWindow
from the underlying configuration.
private void createTray()
Creates the tray control and notification handler.
private void runEventLoop(Shell loopShell)
Runs the event loop for the given Shell.
loopShell - the Shell for which to run the
event loopprivate void updateMenuManager(LanguageResource resource)
Updates the MenuManager to reflect a change in
the current LanguageResource.
resource - the changed LanguageResourceprivate void updateCoolBarManager(LanguageResource resource)
Updates the CoolBarManager to reflect a change in the
current LanguageResource.
resource - the changed LanguageResourceprivate void updateBrowserToolBarActions(LanguageResource resource)
Updates the browser toolbar Actions to reflect a change in
the current LanguageResource.
resource - the changed LanguageResourceprivate void importTrees(SplashScreen splash)
Imports the NewsFeedFavoritesTree and
NewsFeedWatchesTree structures.
splash - the SplashScreen to display the import
progress inprivate void registerEventHandler()
Registers all event handlers required in this
MainApplicationWindow context.
private void unregisterEventHandler()
Unregisters all event handlers from this
MainApplicationWindow.
public static void main(String[] args)
Feed'n Read Startup method.
args - the arguments handed over to the application
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||