net.sourceforge.rssowl.controller.dialog
Class ValidateFeedDialog

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

public class ValidateFeedDialog
extends Object

Class displays a Dialog prompting for a URL / Path to an existing newsfeed. A "validate"-button calls the RSSOwlFeedValidtor to validate the given feed. Errors and warnings are given out to a table.

Version:
1.1.3
Author:
Benjamin Pasero

Field Summary
private  Thread animator
           
private  org.eclipse.swt.widgets.TableColumn columnLevel
           
private  org.eclipse.swt.widgets.TableColumn columnLine
           
(package private)  org.eclipse.swt.widgets.TableColumn columnMessage
           
private  org.eclipse.swt.widgets.Composite composite
           
(package private)  org.eclipse.swt.widgets.MenuItem copyItem
           
private static int DIALOG_HEIGHT
          Height of the dialog in DLUs
private static int DIALOG_WIDTH
          Width of the dialog in DLUs
private  String feedPath
           
(package private)  org.eclipse.swt.widgets.Text feedPathInput
           
static String FORMAT_RSS_0_91
          Newsfeed format: RSS 0.91
static String FORMAT_RSS_0_92
          Newsfeed format: RSS 0.92
static String FORMAT_RSS_2_0
          Newsfeed format: RSS 2.0
static int LEVEL_ERROR
          Level: XML Error
static int LEVEL_OK
          Level: XML Valid
static int LEVEL_WARNING
          Level: XML Warning
(package private)  org.eclipse.swt.custom.CLabel messageLabel
           
(package private)  org.eclipse.swt.widgets.Table messageTable
           
(package private)  org.eclipse.swt.widgets.Button overrideDTDCheck
           
private  org.eclipse.swt.widgets.Shell parent
           
(package private)  FeedValidator rssOwlFeedValidator
           
(package private)  org.eclipse.swt.widgets.Combo selectFormat
           
(package private)  org.eclipse.swt.widgets.Shell shell
           
private  String title
           
(package private)  org.eclipse.swt.widgets.Button validateButton
           
(package private)  boolean validating
           
 
Constructor Summary
ValidateFeedDialog(String dialogTitle, String feedPath)
          Creates an input dialog with Validate and Stop button.
 
Method Summary
 void addMessage(int level, String message, int line)
          Add an error / warning or OK message into the table
private  void clearMessageLabel()
          Clear the message label
(package private)  void clearResults()
          Clear the message label and the result table
private  void createDialogArea()
          Create the dialog components
 void finishValidation(String feedFormat)
          Finish / Stop the running validation
 void open()
          Display the dialog
 void performValidation()
          Perform the validation and use the feedPath from the input field
(package private)  void performValidation(String feedPath)
          Perform the validation and use the given feedPath from the input field
(package private)  void setMessage(String message)
          Set a message to the messageLabel and the search image
(package private)  void setStatusPoints(int number)
          Set a number of points to the status message
(package private)  void setValidateButtonState(boolean validating)
          Set the status of the validate button.
private  void startStatusMessageAnimate()
          Start a thread to animate the status message
(package private)  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

FORMAT_RSS_0_91

public static final String FORMAT_RSS_0_91
Newsfeed format: RSS 0.91

See Also:
Constant Field Values

FORMAT_RSS_0_92

public static final String FORMAT_RSS_0_92
Newsfeed format: RSS 0.92

See Also:
Constant Field Values

FORMAT_RSS_2_0

public static final String FORMAT_RSS_2_0
Newsfeed format: RSS 2.0

See Also:
Constant Field Values

LEVEL_ERROR

public static final int LEVEL_ERROR
Level: XML Error

See Also:
Constant Field Values

LEVEL_OK

public static final int LEVEL_OK
Level: XML Valid

See Also:
Constant Field Values

LEVEL_WARNING

public static final int LEVEL_WARNING
Level: XML Warning

See Also:
Constant Field Values

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

columnLevel

private org.eclipse.swt.widgets.TableColumn columnLevel

columnLine

private org.eclipse.swt.widgets.TableColumn columnLine

composite

private org.eclipse.swt.widgets.Composite composite

feedPath

private String feedPath

parent

private org.eclipse.swt.widgets.Shell parent

title

private String title

columnMessage

org.eclipse.swt.widgets.TableColumn columnMessage

copyItem

org.eclipse.swt.widgets.MenuItem copyItem

feedPathInput

org.eclipse.swt.widgets.Text feedPathInput

messageLabel

org.eclipse.swt.custom.CLabel messageLabel

messageTable

org.eclipse.swt.widgets.Table messageTable

overrideDTDCheck

org.eclipse.swt.widgets.Button overrideDTDCheck

rssOwlFeedValidator

FeedValidator rssOwlFeedValidator

selectFormat

org.eclipse.swt.widgets.Combo selectFormat

shell

org.eclipse.swt.widgets.Shell shell

validateButton

org.eclipse.swt.widgets.Button validateButton

validating

boolean validating
Constructor Detail

ValidateFeedDialog

public ValidateFeedDialog(String dialogTitle,
                          String feedPath)
Creates an input dialog with Validate and Stop button. Prompts for a URL / Path to validate for.

Parameters:
dialogTitle - the dialog title
feedPath - To preset the feedPath input field
Method Detail

addMessage

public void addMessage(int level,
                       String message,
                       int line)
Add an error / warning or OK message into the table

Parameters:
level - The level of the message
message - The message to display
line - The linenumber where the message occured or -1 if no line is available

finishValidation

public void finishValidation(String feedFormat)
Finish / Stop the running validation

Parameters:
feedFormat - Human readable name of the validated feed

open

public void open()
Display the dialog


performValidation

public void performValidation()
Perform the validation and use the feedPath from the input field


clearMessageLabel

private void clearMessageLabel()
Clear the message label


createDialogArea

private void createDialogArea()
Create the dialog components


startStatusMessageAnimate

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


clearResults

void clearResults()
Clear the message label and the result table


performValidation

void performValidation(String feedPath)
Perform the validation and use the given feedPath from the input field

Parameters:
feedPath - The URL / Path to a newsfeed for validaiton

setMessage

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

Parameters:
message - The message

setStatusPoints

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

Parameters:
number - The number of points

setValidateButtonState

void setValidateButtonState(boolean validating)
Set the status of the validate button. If validating is TRUE change the button to display "Stop".

Parameters:
validating - TRUE if validating

stopStatusMessageAnimate

void stopStatusMessageAnimate()
Stop the animation on the status message



RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo