net.sourceforge.java.feednread.frontend.event.action
Class UpdateTreeElementAction

java.lang.Object
  extended byorg.eclipse.core.commands.common.EventManager
      extended byorg.eclipse.jface.action.AbstractAction
          extended byorg.eclipse.jface.action.Action
              extended bynet.sourceforge.java.feednread.frontend.event.action.UpdateTreeElementAction
All Implemented Interfaces:
IAction

public class UpdateTreeElementAction
extends Action

Updates an ITreeElement either in the NewsFeedFavoritesTree or in the NewsFeedWatchesTree depending on the current selection in the SideBar component.

Author:
Sebastian Machhausen

Field Summary
private  MainApplicationWindow mainWindow
           The Feed'n Read main window
 
Fields inherited from class org.eclipse.jface.action.Action
 
Fields inherited from class org.eclipse.core.commands.common.EventManager
 
Fields inherited from interface org.eclipse.jface.action.IAction
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT
 
Constructor Summary
UpdateTreeElementAction(MainApplicationWindow mainWindow)
           Creates a new UpdateTreeElementAction instance.
 
Method Summary
 void run()
           Executes the action: Updates the newsfeed defined in the selected Favorite or Watch.
private  void update(Category category)
           Updates the specified Category, i.e. recursively updates all Favorites in that Category.
private  void update(Favorite favorite)
           Updates the specified Favorite.
private  IJob update(INameable nameable, Favorite[] favorites)
           Updates the specified list of Favorites.
private  void update(Watch watch)
           Updates the specified Watch.
private  void update(WatchFolder folder)
           Updates the specified WatchFolder, i.e. recursively updates all Watches within that WatchFolder.
 
Methods inherited from class org.eclipse.jface.action.Action
convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
 
Methods inherited from class org.eclipse.jface.action.AbstractAction
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.action.IAction
addPropertyChangeListener, removePropertyChangeListener
 

Field Detail

mainWindow

private MainApplicationWindow mainWindow

The Feed'n Read main window

Constructor Detail

UpdateTreeElementAction

public UpdateTreeElementAction(MainApplicationWindow mainWindow)

Creates a new UpdateTreeElementAction instance. This Action updates the newsfeed defined in the selected Favorite or Watch.

Parameters:
mainWindow - the Feed'n Read main window
Method Detail

run

public void run()

Executes the action:


update

private void update(WatchFolder folder)

Updates the specified WatchFolder, i.e. recursively updates all Watches within that WatchFolder.

Parameters:
folder - the WatchFolder to update
See Also:
update(Category), update(Favorite), update(Watch)

update

private void update(Watch watch)

Updates the specified Watch.

Parameters:
watch - the Watch to update
See Also:
update(Category), update(Favorite), update(WatchFolder)

update

private void update(Favorite favorite)

Updates the specified Favorite.

Parameters:
favorite - the Favorite to update
See Also:
update(Category), update(WatchFolder), update(Watch)

update

private void update(Category category)

Updates the specified Category, i.e. recursively updates all Favorites in that Category.

Parameters:
category - the Category to update
See Also:
update(Favorite), update(WatchFolder), update(Watch)

update

private IJob update(INameable nameable,
                    Favorite[] favorites)

Updates the specified list of Favorites.

Parameters:
nameable - the INameable for the update
favorites - the list of Favorites to update
Returns:
the created IJob which does the update