net.sourceforge.rssowl.controller.statusline
Class StatusLine

java.lang.Object
  extended bynet.sourceforge.rssowl.controller.statusline.StatusLine

public class StatusLine
extends Object

The status line at the bottom of RSSOwl that shows the status of loading / reloading / searching of newsfeeds. A cancel button allows to cancel the operation, whereas the skip button allows to skip the current operation.

Version:
1.1.3
Author:
Benjamin Pasero

Field Summary
(package private)  LoadJob currentLoadingJob
           
private  org.eclipse.swt.widgets.Label dateLabel
           
(package private)  org.eclipse.swt.widgets.Display display
           
(package private)  int entireLoad
           
(package private)  int finishedLoad
           
private  Calendar lastStatusDate
           
static int LOAD
          Status: Load
private static String LOAD_LABEL
          Label for Loading
private  Vector loadingJobQueue
           
private  org.eclipse.swt.widgets.Composite parent
           
private  org.eclipse.swt.widgets.Label rateStatusLabel
           
static int RELOAD
          Status: Reload
private static String RELOAD_LABEL
          Label for Reloading
(package private)  GUI rssOwlGui
           
static int SEARCH
          Status: Search
private static String SEARCH_LABEL
          Label for Searching
private  org.eclipse.swt.widgets.ToolItem skipFeedButton
           
private  Thread statusLineAnimator
           
private  org.eclipse.swt.widgets.Composite statusLineHolder
           
(package private)  org.eclipse.swt.widgets.Label statusProgressBar
           
private  org.eclipse.swt.widgets.Label statusTextLabel
           
private  org.eclipse.swt.widgets.ToolItem stopOperationButton
           
private  org.eclipse.swt.widgets.ToolBar stopOperationLoadBar
           
 
Constructor Summary
StatusLine(org.eclipse.swt.widgets.Display display, org.eclipse.swt.widgets.Composite parent, GUI rssOwlGui)
          Instantiate a new StatusLine
 
Method Summary
 void addEntireLoad(int loadcount)
          Add a number to the entireLoad value.
private  void displayJob(LoadJob rssOwlLoadJob)
          Display the given Job in the status line
 void finishJob(LoadJob rssOwlLoadJob)
          The given Job has finished normally and was not interrupted by the user.
private  int getLoadingPercentages()
          Calculate the percentages of finishedLoad divided through entireLoad.
private  String getStyleText(int style)
          Format the given style as String
private  void initComponents()
          Init the status lines controls
private  void initJobLabel()
          Update the Job Label from the Translation.
 void insertJob(LoadJob rssOwlLoadJob)
          This tells the status line that a new Job has been started.
 boolean isBusyLoading()
          Check if RSSOwl is currently busy loading feeds.
(package private)  void operationCanceld()
          The current running operation was canceld by the user.
private  void resetStatusLine()
          Resets the status line.
private  void setSkipFeedEnabled(boolean enabled)
          Set the skip feed button enabled / disabled
private  void setStatusEnabled(boolean enabled)
          Set the status controlls enabled / disabled
private  void setStatusText(String text)
          Set the status text and avoid display of accelerators with replacing all amps with double amps.
private  void setupDefaults()
          Reset some values to default.
private  void startStatusAnimatorThread(int initCount)
          Start / Resume the status animator thread
private  void updateDateLabel(boolean force)
          Update the date of the label
 void updateFonts()
           
 void updateI18N()
           
 void updateRateLabel(String msg)
          Set text to the rate label
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOAD

public static final int LOAD
Status: Load

See Also:
Constant Field Values

RELOAD

public static final int RELOAD
Status: Reload

See Also:
Constant Field Values

SEARCH

public static final int SEARCH
Status: Search

See Also:
Constant Field Values

LOAD_LABEL

private static String LOAD_LABEL
Label for Loading


RELOAD_LABEL

private static String RELOAD_LABEL
Label for Reloading


SEARCH_LABEL

private static String SEARCH_LABEL
Label for Searching


dateLabel

private org.eclipse.swt.widgets.Label dateLabel

lastStatusDate

private Calendar lastStatusDate

loadingJobQueue

private Vector loadingJobQueue

parent

private org.eclipse.swt.widgets.Composite parent

rateStatusLabel

private org.eclipse.swt.widgets.Label rateStatusLabel

skipFeedButton

private org.eclipse.swt.widgets.ToolItem skipFeedButton

statusLineAnimator

private Thread statusLineAnimator

statusLineHolder

private org.eclipse.swt.widgets.Composite statusLineHolder

statusTextLabel

private org.eclipse.swt.widgets.Label statusTextLabel

stopOperationButton

private org.eclipse.swt.widgets.ToolItem stopOperationButton

stopOperationLoadBar

private org.eclipse.swt.widgets.ToolBar stopOperationLoadBar

currentLoadingJob

LoadJob currentLoadingJob

display

org.eclipse.swt.widgets.Display display

entireLoad

int entireLoad

finishedLoad

int finishedLoad

rssOwlGui

GUI rssOwlGui

statusProgressBar

org.eclipse.swt.widgets.Label statusProgressBar
Constructor Detail

StatusLine

public StatusLine(org.eclipse.swt.widgets.Display display,
                  org.eclipse.swt.widgets.Composite parent,
                  GUI rssOwlGui)
Instantiate a new StatusLine

Parameters:
display - The display
parent - The parent Composite of the Status Line
rssOwlGui - The Main controller
Method Detail

addEntireLoad

public void addEntireLoad(int loadcount)
Add a number to the entireLoad value.

Parameters:
loadcount - The number of jobs that will start. From an aggregation, the number of all favorites in the aggregation will be passed as value.

finishJob

public void finishJob(LoadJob rssOwlLoadJob)
The given Job has finished normally and was not interrupted by the user. This method is running synchronized, because it is called from more than one Thread but should run atomar.

Parameters:
rssOwlLoadJob - The job that has finished

insertJob

public void insertJob(LoadJob rssOwlLoadJob)
This tells the status line that a new Job has been started. The status line will display it. This method is running synchronized, because it is called from more than one Thread but should run atomar.

Parameters:
rssOwlLoadJob - The job that has been started

isBusyLoading

public boolean isBusyLoading()
Check if RSSOwl is currently busy loading feeds.

Returns:
boolean TRUE if RSSOwl is loading feeds

updateFonts

public void updateFonts()
See Also:
IFontChangeable.updateFonts()

updateI18N

public void updateI18N()
See Also:
ITranslatable.updateI18N()

updateRateLabel

public void updateRateLabel(String msg)
Set text to the rate label

Parameters:
msg - The text to set

displayJob

private void displayJob(LoadJob rssOwlLoadJob)
Display the given Job in the status line

Parameters:
rssOwlLoadJob - The job to display

getLoadingPercentages

private int getLoadingPercentages()
Calculate the percentages of finishedLoad divided through entireLoad.

Returns:
int The loading status in percents

getStyleText

private String getStyleText(int style)
Format the given style as String

Parameters:
style - The style to format
Returns:
String The formatted style as String

initComponents

private void initComponents()
Init the status lines controls


initJobLabel

private void initJobLabel()
Update the Job Label from the Translation.


resetStatusLine

private void resetStatusLine()
Resets the status line.


setSkipFeedEnabled

private void setSkipFeedEnabled(boolean enabled)
Set the skip feed button enabled / disabled

Parameters:
enabled - TRUE for enabled

setStatusEnabled

private void setStatusEnabled(boolean enabled)
Set the status controlls enabled / disabled

Parameters:
enabled - TRUE for enabled

setStatusText

private void setStatusText(String text)
Set the status text and avoid display of accelerators with replacing all amps with double amps.

Parameters:
text - The text to display

setupDefaults

private void setupDefaults()
Reset some values to default.


startStatusAnimatorThread

private void startStatusAnimatorThread(int initCount)
Start / Resume the status animator thread

Parameters:
initCount - The initial progress of the bar as value (0-100)

updateDateLabel

private void updateDateLabel(boolean force)
Update the date of the label

Parameters:
force - TRUE forces the update to occur, even if the day has not changed.

operationCanceld

void operationCanceld()
The current running operation was canceld by the user.



RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo