net.sourceforge.rssowl.controller.statusline
Class StatusLine

java.lang.Object
  extended by net.sourceforge.rssowl.controller.statusline.StatusLine

public class StatusLine
extends java.lang.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.2.4
Author:
Benjamin Pasero

Field Summary
(package private)  LoadJob currentLoadingJob
           
private  Label dateLabel
           
(package private)  Display display
           
(package private)  int entireLoad
           
(package private)  int finishedLoad
           
private  java.util.Calendar lastStatusDate
           
static int LOAD
          Status: Load
private static java.lang.String LOAD_LABEL
          Label for Loading
private  java.util.Vector loadingJobQueue
           
private  Composite parent
           
private  Label rateStatusLabel
           
static int RELOAD
          Status: Reload
private static java.lang.String RELOAD_LABEL
          Label for Reloading
(package private)  GUI rssOwlGui
           
static int SEARCH
          Status: Search
private static java.lang.String SEARCH_LABEL
          Label for Searching
private  Label sepA
           
private  ToolItem skipFeedButton
           
private  java.lang.Thread statusLineAnimator
           
private  Composite statusLineHolder
           
(package private)  Label statusProgressBar
           
private  Label statusTextLabel
           
private  ToolItem stopOperationButton
           
private  ToolBar stopOperationLoadBar
           
 
Constructor Summary
StatusLine(Display display, 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  java.lang.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.
 void setAmphetaRateItemsVisible(boolean visible)
          Set the AmphetaRate Statusline-Items visible or invisible based on the given argument.
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(java.lang.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(java.lang.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 java.lang.String LOAD_LABEL
Label for Loading


RELOAD_LABEL

private static java.lang.String RELOAD_LABEL
Label for Reloading


SEARCH_LABEL

private static java.lang.String SEARCH_LABEL
Label for Searching


dateLabel

private Label dateLabel

lastStatusDate

private java.util.Calendar lastStatusDate

loadingJobQueue

private java.util.Vector loadingJobQueue

parent

private Composite parent

rateStatusLabel

private Label rateStatusLabel

sepA

private Label sepA

skipFeedButton

private ToolItem skipFeedButton

statusLineAnimator

private java.lang.Thread statusLineAnimator

statusLineHolder

private Composite statusLineHolder

statusTextLabel

private Label statusTextLabel

stopOperationButton

private ToolItem stopOperationButton

stopOperationLoadBar

private ToolBar stopOperationLoadBar

currentLoadingJob

LoadJob currentLoadingJob

display

Display display

entireLoad

int entireLoad

finishedLoad

int finishedLoad

rssOwlGui

GUI rssOwlGui

statusProgressBar

Label statusProgressBar
Constructor Detail

StatusLine

public StatusLine(Display display,
                  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

setAmphetaRateItemsVisible

public void setAmphetaRateItemsVisible(boolean visible)
Set the AmphetaRate Statusline-Items visible or invisible based on the given argument.

Parameters:
visible - Set to TRUE if the Items are to be visible.

updateFonts

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

updateI18N

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

updateRateLabel

public void updateRateLabel(java.lang.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 java.lang.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(java.lang.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