net.sourceforge.rssowl.controller.dnd
Class NewsTabFolderDND

java.lang.Object
  extended bynet.sourceforge.rssowl.controller.dnd.NewsTabFolderDND

public class NewsTabFolderDND
extends Object

This class impements basic Drag and Drop support to the CTabFolder. It allows the user to drag a tabitem that displays a newsfeed and drop it in a category of the favorites tree. On success RSSOwl will create a favorite out of the URL and title of the dragged tabitem.

Version:
1.1.3
Author:
Benjamin Pasero

Field Summary
private static int operations
          Support drag and drop operations
(package private)  FavoritesTreeDND rssOwlFavoritesTreeDND
           
private  org.eclipse.swt.dnd.DragSource source
           
private  org.eclipse.swt.custom.CTabFolder tabFolder
           
private static org.eclipse.swt.dnd.Transfer[] types
          Array of transfer types
 
Constructor Summary
NewsTabFolderDND(org.eclipse.swt.custom.CTabFolder tabFolder, FavoritesTreeDND rssOwlFavoritesTreeDND)
          Instantiate a new NewsTabFolderDND
 
Method Summary
private  void createDragSource()
          Create the Drag Source on the tabfolder.
 void dispose()
          Dispose the DragSource object
(package private)  org.eclipse.swt.custom.CTabItem getValidDragSourceTabItem()
          Valid source items to drag from the tabfolder are tabs that display a newsfeed
private  void initDragAndDrop()
          Init Drag and Drop on the tree widget.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

operations

private static final int operations
Support drag and drop operations

See Also:
Constant Field Values

types

private static final org.eclipse.swt.dnd.Transfer[] types
Array of transfer types


source

private org.eclipse.swt.dnd.DragSource source

tabFolder

private org.eclipse.swt.custom.CTabFolder tabFolder

rssOwlFavoritesTreeDND

FavoritesTreeDND rssOwlFavoritesTreeDND
Constructor Detail

NewsTabFolderDND

public NewsTabFolderDND(org.eclipse.swt.custom.CTabFolder tabFolder,
                        FavoritesTreeDND rssOwlFavoritesTreeDND)
Instantiate a new NewsTabFolderDND

Parameters:
tabFolder - The CTabFolder to apply basic drag and drop support
rssOwlFavoritesTreeDND - A reference to the drag and drop class of the favorites tree. This is needed because the drop target will be the tree
Method Detail

dispose

public void dispose()
Dispose the DragSource object


createDragSource

private void createDragSource()
Create the Drag Source on the tabfolder. Valid drag sources are newsfeeds


initDragAndDrop

private void initDragAndDrop()
Init Drag and Drop on the tree widget. Note that the Drop target is created in the DND class of the favorites tree


getValidDragSourceTabItem

org.eclipse.swt.custom.CTabItem getValidDragSourceTabItem()
Valid source items to drag from the tabfolder are tabs that display a newsfeed

Returns:
CTabItem The dragged tabitem or null if the tab is not valid to be dragged


RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo