net.sourceforge.java.feednread.frontend.components.statusbar
Class StatusLine

java.lang.Object
  extended byorg.eclipse.swt.widgets.Widget
      extended byorg.eclipse.swt.widgets.Control
          extended byorg.eclipse.swt.widgets.Scrollable
              extended byorg.eclipse.swt.widgets.Composite
                  extended bynet.sourceforge.java.feednread.frontend.components.statusbar.StatusLine
All Implemented Interfaces:
Drawable, EventListener, ILanguageResourceChangeListener

public class StatusLine
extends Composite
implements ILanguageResourceChangeListener

Application specific status line implementation.

Author:
Sebastian Machhausen

Field Summary
private  CLabel dateLabel
           The CLabel to hold the status Date
private static DateFormat DEFAULT_DATE_FORMATTER
           The default date formatter to format dates to be displayed
private  IProgressMonitor defaultProgressMonitor
           The default IProgressMonitor to use for reporting progress of a long enduring operation
private  CLabel messageLabel
           The CLabel to hold the status message
private  ProgressBar progressBar
           The ProgressBarto display the progress status
 
Fields inherited from class org.eclipse.swt.widgets.Composite
 
Fields inherited from class org.eclipse.swt.widgets.Scrollable
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Fields inherited from class org.eclipse.swt.widgets.Widget
 
Constructor Summary
StatusLine(Composite parent)
           Creates a new StatusLine instance and embedes it into the specified component.
 
Method Summary
private  void createComponents(Composite parent)
           Creates the components used in this StatusLine context, adjusts their settings and arranges the layout.
 void defaultLanguageChanged(LanguageResourceChangeEvent lrce)
           Called whenever the default language changes.
 void dispose()
           Disposes all resources claimed by this StatusLine.
 IProgressMonitor getProgressMonitor()
           Gets the IProgressMonitor managed by this StatusLine.
 void setDate(Date date)
           Sets the date to be displayed on this StatusLine.
 void setErrorMessage(Image image, String errorMessage)
           Sets an Image and error message text to be displayed on this StatusLine.
 void setErrorMessage(String errorMessage)
           Sets an error message text to be displayed on this StatusLine.
 void setMessage(Image image, String message)
           Sets an Image and message text to be displayed on this StatusLine.
 
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, computeSize, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_DATE_FORMATTER

private static DateFormat DEFAULT_DATE_FORMATTER

The default date formatter to format dates to be displayed


messageLabel

private CLabel messageLabel

The CLabel to hold the status message


progressBar

private ProgressBar progressBar

The ProgressBarto display the progress status


dateLabel

private CLabel dateLabel

The CLabel to hold the status Date


defaultProgressMonitor

private IProgressMonitor defaultProgressMonitor

The default IProgressMonitor to use for reporting progress of a long enduring operation

Constructor Detail

StatusLine

public StatusLine(Composite parent)

Creates a new StatusLine instance and embedes it into the specified component.

Parameters:
parent - the component to embed this StatusLine into
Method Detail

dispose

public void dispose()

Disposes all resources claimed by this StatusLine.


defaultLanguageChanged

public void defaultLanguageChanged(LanguageResourceChangeEvent lrce)

Called whenever the default language changes.

Specified by:
defaultLanguageChanged in interface ILanguageResourceChangeListener
Parameters:
lrce - the triggered LanguageResourceChangeEvent

setMessage

public void setMessage(Image image,
                       String message)

Sets an Image and message text to be displayed on this StatusLine.

Parameters:
image - the image, or null for no image
message - the message, or null for no message

setErrorMessage

public void setErrorMessage(String errorMessage)

Sets an error message text to be displayed on this StatusLine.

Parameters:
errorMessage - the error message, or null for no error message

setErrorMessage

public void setErrorMessage(Image image,
                            String errorMessage)

Sets an Image and error message text to be displayed on this StatusLine.

Parameters:
image - the image to use, or null for no image
errorMessage - the error message, or null for no error message

setDate

public void setDate(Date date)

Sets the date to be displayed on this StatusLine.

Parameters:
date - the date to be displayed

getProgressMonitor

public IProgressMonitor getProgressMonitor()

Gets the IProgressMonitor managed by this StatusLine.

Returns:
the IProgressMonitor managed by this StatusLine

createComponents

private void createComponents(Composite parent)

Creates the components used in this StatusLine context, adjusts their settings and arranges the layout.

Parameters:
parent - the component to embed this StatusLine components into