net.sourceforge.rssowl.controller
Class Quickview

java.lang.Object
  extended bynet.sourceforge.rssowl.controller.Quickview
All Implemented Interfaces:
IFontChangeable, ITranslatable

public class Quickview
extends Object
implements ITranslatable, IFontChangeable

This is the RSS Quickview controll that is displayed directly under the menue.

Version:
1.1.3
Author:
Benjamin Pasero

Field Summary
private  org.eclipse.swt.widgets.MenuItem aggregateFavorites
           
private  org.eclipse.swt.widgets.Composite bottomContainer
           
(package private)  org.eclipse.swt.dnd.DropTarget comboDNDTarget
           
private  org.eclipse.swt.widgets.ToolItem discoverFeedItem
           
(package private)  EventManager eventManager
           
(package private)  org.eclipse.swt.widgets.ToolItem exportItem
           
(package private)  org.eclipse.swt.widgets.Menu exportMenu
           
private  org.eclipse.swt.widgets.MenuItem exportOPML
           
(package private)  org.eclipse.swt.widgets.ToolItem favoritesItem
           
(package private)  org.eclipse.swt.widgets.Menu favoritesMenu
           
private  org.eclipse.swt.widgets.MenuItem importBlogroll
           
(package private)  org.eclipse.swt.widgets.ToolItem importItem
           
(package private)  org.eclipse.swt.widgets.Menu importMenu
           
private  org.eclipse.swt.widgets.MenuItem importOPML
           
(package private)  org.eclipse.swt.widgets.Text liveSearch
           
private  org.eclipse.swt.custom.CLabel liveSearchLabel
           
private  org.eclipse.swt.widgets.MenuItem markAllRead
           
private  org.eclipse.swt.widgets.ToolItem markReadItem
           
private  org.eclipse.swt.widgets.MenuItem newCategory
           
private  org.eclipse.swt.widgets.MenuItem newFavorite
           
(package private)  org.eclipse.swt.widgets.ToolItem newItem
           
(package private)  org.eclipse.swt.widgets.Menu newMenu
           
private  org.eclipse.swt.widgets.MenuItem newSubCategory
           
private  org.eclipse.swt.widgets.ToolItem nextUnreadNewsItem
           
private  org.eclipse.swt.widgets.Menu quickviewMenu
           
(package private)  org.eclipse.swt.widgets.MenuItem quickviewState
           
private  org.eclipse.swt.widgets.MenuItem reloadFavorites
           
private  org.eclipse.swt.widgets.ToolItem reloadItem
           
(package private)  GUI rssOwlGui
           
private static int SEARCH_DELAY
          Delay before the Search is beginning
private  ExtendedThread searchDelayThread
           
(package private)  org.eclipse.swt.dnd.DropTarget searchDNDTarget
           
private  org.eclipse.swt.widgets.MenuItem searchFavorites
           
private  org.eclipse.swt.widgets.ToolItem searchFeedItem
           
private  org.eclipse.swt.widgets.ToolItem searchItem
           
(package private)  org.eclipse.swt.widgets.Shell shell
           
(package private)  boolean stopLiveSearch
           
(package private)  org.eclipse.swt.widgets.MenuItem toolBarState
           
private  ViewForm toolbarViewForm
           
private  org.eclipse.swt.widgets.Composite topContainer
           
(package private)  org.eclipse.swt.widgets.ToolBar topToolBar
           
private  org.eclipse.swt.widgets.Label urlLabelQuickView
           
(package private)  org.eclipse.swt.widgets.Combo urlTestCombo
           
private  org.eclipse.swt.widgets.ToolItem validateFeedItem
           
 
Constructor Summary
Quickview(GUI rssOwlGui, org.eclipse.swt.widgets.Shell shell, EventManager eventManager)
          Instantiate a new Quickview
 
Method Summary
(package private)  void addUrlToCombo(String url)
          Add the URL to the combo if its not yet in
 void clearLiveSearch()
          Clear the live search input field
private  void createToolBar(org.eclipse.swt.widgets.Composite topToolBarContainer)
          Create the Top ToolBar
private  void createWildCardMenu(String[] wildcards)
          Apply a wildcard popup menu to the text.
private  int getIndex(String url)
          Get the index from the combo where the given URL is located or -1 if the URL is not part of the combo
private  void initComponents()
          Init all components
private  void initContextMenu(org.eclipse.swt.widgets.Control parent)
          Initialize the Context Menu showing two items to hide/show ToolBar and Quickview control.
(package private)  void search()
          Perform the search in the displayed channel.
 void setNewMenuDisabled()
          Disable the "New" dropdown ToolItem
 void setShowQuickview(boolean show, boolean save)
          Show / Hide the quickview control
 void setShowToolBar(boolean show, boolean save)
          Show / Hide the ToolBar control
 void setShowViewForm(boolean show)
          Show / Hide the ViewForm containing ToolBar and Quickview
 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 updateNewMenu(boolean showSubCategory, boolean isBlogroll)
          Update the new menu in dependance of the selection in the favorites tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEARCH_DELAY

private static final int SEARCH_DELAY
Delay before the Search is beginning

See Also:
Constant Field Values

aggregateFavorites

private org.eclipse.swt.widgets.MenuItem aggregateFavorites

bottomContainer

private org.eclipse.swt.widgets.Composite bottomContainer

discoverFeedItem

private org.eclipse.swt.widgets.ToolItem discoverFeedItem

exportOPML

private org.eclipse.swt.widgets.MenuItem exportOPML

importBlogroll

private org.eclipse.swt.widgets.MenuItem importBlogroll

importOPML

private org.eclipse.swt.widgets.MenuItem importOPML

liveSearchLabel

private org.eclipse.swt.custom.CLabel liveSearchLabel

markAllRead

private org.eclipse.swt.widgets.MenuItem markAllRead

markReadItem

private org.eclipse.swt.widgets.ToolItem markReadItem

newCategory

private org.eclipse.swt.widgets.MenuItem newCategory

newFavorite

private org.eclipse.swt.widgets.MenuItem newFavorite

newSubCategory

private org.eclipse.swt.widgets.MenuItem newSubCategory

nextUnreadNewsItem

private org.eclipse.swt.widgets.ToolItem nextUnreadNewsItem

quickviewMenu

private org.eclipse.swt.widgets.Menu quickviewMenu

reloadFavorites

private org.eclipse.swt.widgets.MenuItem reloadFavorites

reloadItem

private org.eclipse.swt.widgets.ToolItem reloadItem

searchDelayThread

private ExtendedThread searchDelayThread

searchFavorites

private org.eclipse.swt.widgets.MenuItem searchFavorites

searchFeedItem

private org.eclipse.swt.widgets.ToolItem searchFeedItem

searchItem

private org.eclipse.swt.widgets.ToolItem searchItem

toolbarViewForm

private ViewForm toolbarViewForm

topContainer

private org.eclipse.swt.widgets.Composite topContainer

urlLabelQuickView

private org.eclipse.swt.widgets.Label urlLabelQuickView

validateFeedItem

private org.eclipse.swt.widgets.ToolItem validateFeedItem

comboDNDTarget

org.eclipse.swt.dnd.DropTarget comboDNDTarget

eventManager

EventManager eventManager

exportItem

org.eclipse.swt.widgets.ToolItem exportItem

exportMenu

org.eclipse.swt.widgets.Menu exportMenu

favoritesItem

org.eclipse.swt.widgets.ToolItem favoritesItem

favoritesMenu

org.eclipse.swt.widgets.Menu favoritesMenu

importItem

org.eclipse.swt.widgets.ToolItem importItem

importMenu

org.eclipse.swt.widgets.Menu importMenu

liveSearch

org.eclipse.swt.widgets.Text liveSearch

newItem

org.eclipse.swt.widgets.ToolItem newItem

newMenu

org.eclipse.swt.widgets.Menu newMenu

quickviewState

org.eclipse.swt.widgets.MenuItem quickviewState

rssOwlGui

GUI rssOwlGui

searchDNDTarget

org.eclipse.swt.dnd.DropTarget searchDNDTarget

shell

org.eclipse.swt.widgets.Shell shell

stopLiveSearch

boolean stopLiveSearch

toolBarState

org.eclipse.swt.widgets.MenuItem toolBarState

topToolBar

org.eclipse.swt.widgets.ToolBar topToolBar

urlTestCombo

org.eclipse.swt.widgets.Combo urlTestCombo
Constructor Detail

Quickview

public Quickview(GUI rssOwlGui,
                 org.eclipse.swt.widgets.Shell shell,
                 EventManager eventManager)
Instantiate a new Quickview

Parameters:
rssOwlGui - Access some methods of the main controller
shell - The shell
eventManager - The event manager
Method Detail

clearLiveSearch

public void clearLiveSearch()
Clear the live search input field


setNewMenuDisabled

public void setNewMenuDisabled()
Disable the "New" dropdown ToolItem


setShowQuickview

public void setShowQuickview(boolean show,
                             boolean save)
Show / Hide the quickview control

Parameters:
show - TRUE if visible
save - If TRUE save state to GlobalSettings

setShowToolBar

public void setShowToolBar(boolean show,
                           boolean save)
Show / Hide the ToolBar control

Parameters:
show - TRUE if visible
save - If TRUE save state to GlobalSettings

setShowViewForm

public void setShowViewForm(boolean show)
Show / Hide the ViewForm containing ToolBar and Quickview

Parameters:
show - TRUE if visible

updateFonts

public void updateFonts()
Description copied from interface: IFontChangeable
All implementing classes must provide a method to update the fonts of all GUI elements that provide a setFont() Method.

Specified by:
updateFonts in interface IFontChangeable
See Also:
IFontChangeable.updateFonts()

updateI18N

public void updateI18N()
Update all controlls text with i18n

Specified by:
updateI18N in interface ITranslatable

updateNewMenu

public void updateNewMenu(boolean showSubCategory,
                          boolean isBlogroll)
Update the new menu in dependance of the selection in the favorites tree.

Parameters:
showSubCategory - If TRUE, show the "New > Sub Category" item.
isBlogroll - If TRUE, selection is set on a Blogroll.

createToolBar

private void createToolBar(org.eclipse.swt.widgets.Composite topToolBarContainer)
Create the Top ToolBar

Parameters:
topToolBarContainer - The Top ToolBar Container

createWildCardMenu

private void createWildCardMenu(String[] wildcards)
Apply a wildcard popup menu to the text. Wildcards a displayed as "[TEXT]" and represent replaceable parameters.

Parameters:
wildcards - The wildcards to add to the menu

getIndex

private int getIndex(String url)
Get the index from the combo where the given URL is located or -1 if the URL is not part of the combo

Parameters:
url - Any URL to search for
Returns:
int The index or -1

initComponents

private void initComponents()
Init all components


initContextMenu

private void initContextMenu(org.eclipse.swt.widgets.Control parent)
Initialize the Context Menu showing two items to hide/show ToolBar and Quickview control.

Parameters:
parent - The parent to use for Initialization.

addUrlToCombo

void addUrlToCombo(String url)
Add the URL to the combo if its not yet in

Parameters:
url - Any URL

search

void search()
Perform the search in the displayed channel. Delay the search using a Thread that first sleeps for a short amount of time. This allows the user to complete the typing of a word before the search is beginning.



RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo