net.sourceforge.rssowl.controller.dialog
Class FeedDiscoveryDialog

java.lang.Object
  extended bynet.sourceforge.rssowl.controller.dialog.FeedDiscoveryDialog

public class FeedDiscoveryDialog
extends Object

Class displays a Dialog prompting for a URL. A "search"-button calls the FeedDiscoveryManager to search on the given URL for newsfeeds. Any feeds that are found are displayed in a table. Each feed may be opened in the tabfolder with a doubleclick. A popup menuStructure is set to copy the XML Url.

Version:
1.1.3
Author:
Benjamin Pasero

Field Summary
(package private)  org.eclipse.swt.widgets.MenuItem addFeedToFav
           
private  Thread animator
           
(package private)  org.eclipse.swt.dnd.Clipboard cb
           
(package private)  org.eclipse.swt.widgets.Button clearButton
           
(package private)  org.eclipse.swt.widgets.TableColumn columnTitle
           
(package private)  org.eclipse.swt.widgets.TableColumn columnUrl
           
private  org.eclipse.swt.widgets.Composite composite
           
(package private)  org.eclipse.swt.widgets.MenuItem copyXmlLocation
           
private static int DIALOG_HEIGHT
          Height of the dialog in DLUs
private static int DIALOG_WIDTH
          Width of the dialog in DLUs
(package private)  org.eclipse.swt.widgets.Button exportToOpml
           
private  org.eclipse.swt.widgets.Button importButton
           
private  String message
           
(package private)  org.eclipse.swt.custom.CLabel messageLabel
           
(package private)  org.eclipse.swt.widgets.MenuItem openFeed
           
private  org.eclipse.swt.widgets.Shell parent
           
(package private)  Hashtable results
           
(package private)  org.eclipse.swt.widgets.Table resultTable
           
(package private)  FeedDiscoveryManager rssOwlFeedDiscoveryManager
           
(package private)  GUI rssOwlGui
           
(package private)  org.eclipse.swt.widgets.Button searchButton
           
(package private)  boolean searching
           
(package private)  org.eclipse.swt.widgets.Text searchWebsite
           
(package private)  org.eclipse.swt.widgets.Shell shell
           
(package private)  org.eclipse.swt.dnd.DragSource tableDragSource
           
(package private)  org.eclipse.swt.dnd.TextTransfer textTransfer
           
private  String title
           
 
Constructor Summary
FeedDiscoveryDialog(String dialogTitle, String dialogMessage, GUI rssOwlGui)
          Creates an input dialog with Search, Stop, OK and Cancel buttons.
FeedDiscoveryDialog(String url, String dialogTitle, String dialogMessage, GUI rssOwlGui)
          Creates an input dialog with Search, Stop, OK and Cancel buttons.
 
Method Summary
 void addResultElement(String url, String feedtitle)
          Display a new line in the table
private  void createDialogArea()
          Create the dialog components
(package private)  void generateOpml()
          Generate an OPML XML from the results
 Hashtable getResults()
          Get the results of the search
(package private)  void importResults()
          Import results from the search into a category
 boolean isSearching()
           
 void open()
          Display the dialog
(package private)  void openFeed(org.eclipse.swt.widgets.TableItem item)
          Open selected item as newsfeed in the tabfolder
(package private)  void performSearch(String webSiteURL)
          Begin the search
 void setButtonState(boolean searching)
          Set the state of the search- and stop button
 void setErrorMessage(String errorMessage)
          Set / unset the warning message on the dialog
 void setMessage(String message)
          Set a message to the messageLabel and the search image
(package private)  void setResultControlsEnabled(boolean enabled)
          Enable / Disable controls that are used when results are available.
 void setSearching(boolean searching)
          Set wether a search is currently running.
(package private)  void setStatusPoints(int number)
          Set a number of points to the status message
private  void startStatusMessageAnimate()
          Start a thread to animate the status message
(package private)  void stopSearch()
          Stop the running search
 void stopStatusMessageAnimate()
          Stop the animation on the status message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DIALOG_HEIGHT

private static final int DIALOG_HEIGHT
Height of the dialog in DLUs

See Also:
Constant Field Values

DIALOG_WIDTH

private static final int DIALOG_WIDTH
Width of the dialog in DLUs

See Also:
Constant Field Values

animator

private Thread animator

composite

private org.eclipse.swt.widgets.Composite composite

importButton

private org.eclipse.swt.widgets.Button importButton

message

private String message

parent

private org.eclipse.swt.widgets.Shell parent

title

private String title

addFeedToFav

org.eclipse.swt.widgets.MenuItem addFeedToFav

cb

org.eclipse.swt.dnd.Clipboard cb

clearButton

org.eclipse.swt.widgets.Button clearButton

columnTitle

org.eclipse.swt.widgets.TableColumn columnTitle

columnUrl

org.eclipse.swt.widgets.TableColumn columnUrl

copyXmlLocation

org.eclipse.swt.widgets.MenuItem copyXmlLocation

exportToOpml

org.eclipse.swt.widgets.Button exportToOpml

messageLabel

org.eclipse.swt.custom.CLabel messageLabel

openFeed

org.eclipse.swt.widgets.MenuItem openFeed

results

Hashtable results

resultTable

org.eclipse.swt.widgets.Table resultTable

rssOwlFeedDiscoveryManager

FeedDiscoveryManager rssOwlFeedDiscoveryManager

rssOwlGui

GUI rssOwlGui

searchButton

org.eclipse.swt.widgets.Button searchButton

searching

boolean searching

searchWebsite

org.eclipse.swt.widgets.Text searchWebsite

shell

org.eclipse.swt.widgets.Shell shell

tableDragSource

org.eclipse.swt.dnd.DragSource tableDragSource

textTransfer

org.eclipse.swt.dnd.TextTransfer textTransfer
Constructor Detail

FeedDiscoveryDialog

public FeedDiscoveryDialog(String dialogTitle,
                           String dialogMessage,
                           GUI rssOwlGui)
Creates an input dialog with Search, Stop, OK and Cancel buttons. Prompts for a URL to search on.

Parameters:
dialogTitle - the dialog title
dialogMessage - the dialog message
rssOwlGui - The RSSOwl Maincontroller

FeedDiscoveryDialog

public FeedDiscoveryDialog(String url,
                           String dialogTitle,
                           String dialogMessage,
                           GUI rssOwlGui)
Creates an input dialog with Search, Stop, OK and Cancel buttons. Prompts for a URL to search on.

Parameters:
url - If not NULL, start discovery on the given URL
dialogTitle - the dialog title
dialogMessage - the dialog message
rssOwlGui - The RSSOwl Maincontroller
Method Detail

addResultElement

public void addResultElement(String url,
                             String feedtitle)
Display a new line in the table

Parameters:
url - URL of the newsfeed
feedtitle - Title of the newsfeed

getResults

public Hashtable getResults()
Get the results of the search

Returns:
Hashtable containing the results

isSearching

public boolean isSearching()
Returns:
Returns TRUE if a search is currently runnung.

open

public void open()
Display the dialog


setButtonState

public void setButtonState(boolean searching)
Set the state of the search- and stop button

Parameters:
searching - TRUE if a search is performed

setErrorMessage

public void setErrorMessage(String errorMessage)
Set / unset the warning message on the dialog

Parameters:
errorMessage - The warning message or NULL for no warning

setMessage

public void setMessage(String message)
Set a message to the messageLabel and the search image

Parameters:
message - The message

setSearching

public void setSearching(boolean searching)
Set wether a search is currently running.

Parameters:
searching - TRUE if a search is currently running.

stopStatusMessageAnimate

public void stopStatusMessageAnimate()
Stop the animation on the status message


createDialogArea

private void createDialogArea()
Create the dialog components


startStatusMessageAnimate

private void startStatusMessageAnimate()
Start a thread to animate the status message


generateOpml

void generateOpml()
Generate an OPML XML from the results


importResults

void importResults()
Import results from the search into a category


openFeed

void openFeed(org.eclipse.swt.widgets.TableItem item)
Open selected item as newsfeed in the tabfolder

Parameters:
item - TableItem holding URL of the newsfeed

performSearch

void performSearch(String webSiteURL)
Begin the search

Parameters:
webSiteURL - Topic to search for

setResultControlsEnabled

void setResultControlsEnabled(boolean enabled)
Enable / Disable controls that are used when results are available.

Parameters:
enabled - TRUE if enabled

setStatusPoints

void setStatusPoints(int number)
Set a number of points to the status message

Parameters:
number - The number of points

stopSearch

void stopSearch()
Stop the running search



RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo