net.sourceforge.rssowl.controller.sort
Class SortingSelectionAdapter

java.lang.Object
  extended by SelectionAdapter
      extended by net.sourceforge.rssowl.controller.sort.SortingSelectionAdapter

public class SortingSelectionAdapter
extends SelectionAdapter

SelectionAdapter implementing widgetSelected(...) to sort the table when a header is clicked and update it.

Version:
1.2.4
Author:
Ludovic Kim-Xuan Galibert

Field Summary
private  boolean authorAscending
          Holds the flag for ascending order for the author column
private  boolean categoryAscending
          Holds the flag for ascending order for the category column
private  boolean newsfeedAscending
          Holds the flag for ascending order for the newsfeed column
private  java.util.Vector newsItemInfos
          Holds the identifiers for the info type
private  java.util.Vector newsItemOrder
          Holds the current ordering of the RSSNewsItems
private  java.util.Hashtable newsItems
          Holds the Hashtable of RSSNewsItems
private  boolean performSearch
          Holds the flag for performing search
private  boolean publisherAscending
          Holds the flag for ascending order for the publisher column
private  boolean pudDateAscending
          Holds the flag for ascending order for the publication date column
private  boolean statusAscending
          Holds the flag for ascending order for the status column
private  Table table
          Holds the table where the RSSNewsItems will be displayed
private  boolean titleAscending
          Holds the flag for ascending order for the title column
 
Constructor Summary
SortingSelectionAdapter(Table table, java.util.Hashtable newsItems, java.util.Vector newsItemOrder, java.util.Vector newsItemInfos, boolean performSearch)
          Creates a new instance of SortingSelectionAdapter.
 
Method Summary
 boolean sort(java.lang.String field)
          Sort the News using a Sorter that is identified by the given field value.
 void widgetSelected(SelectionEvent se)
          Handle the sorting corresponding to the header clicked
 void widgetSelected(TableColumn tc)
          Handle the sorting corresponding to the header clicked
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

authorAscending

private boolean authorAscending
Holds the flag for ascending order for the author column


categoryAscending

private boolean categoryAscending
Holds the flag for ascending order for the category column


newsfeedAscending

private boolean newsfeedAscending
Holds the flag for ascending order for the newsfeed column


newsItemInfos

private java.util.Vector newsItemInfos
Holds the identifiers for the info type


newsItemOrder

private java.util.Vector newsItemOrder
Holds the current ordering of the RSSNewsItems


newsItems

private java.util.Hashtable newsItems
Holds the Hashtable of RSSNewsItems


performSearch

private boolean performSearch
Holds the flag for performing search


publisherAscending

private boolean publisherAscending
Holds the flag for ascending order for the publisher column


pudDateAscending

private boolean pudDateAscending
Holds the flag for ascending order for the publication date column


statusAscending

private boolean statusAscending
Holds the flag for ascending order for the status column


table

private Table table
Holds the table where the RSSNewsItems will be displayed


titleAscending

private boolean titleAscending
Holds the flag for ascending order for the title column

Constructor Detail

SortingSelectionAdapter

public SortingSelectionAdapter(Table table,
                               java.util.Hashtable newsItems,
                               java.util.Vector newsItemOrder,
                               java.util.Vector newsItemInfos,
                               boolean performSearch)
Creates a new instance of SortingSelectionAdapter.

Parameters:
table - the Table to fill.
newsItems - the Hashtable of RSSNewsItems to be displayed.
newsItemOrder - the ordering of the RSSNewsItems as keys to retrieve the RSSNewsItems from the Hashtable.
newsItemInfos - a vector of identifiers for the type of info.
performSearch - true if a search should be performed, otherwise false.
Method Detail

sort

public boolean sort(java.lang.String field)
Sort the News using a Sorter that is identified by the given field value.

Parameters:
field - The identifier of the Sorter to use.
Returns:
boolean TRUE if the sort was ascending, FALSE if descending.

widgetSelected

public void widgetSelected(SelectionEvent se)
Handle the sorting corresponding to the header clicked

Parameters:
se - the SelectionEvent

widgetSelected

public void widgetSelected(TableColumn tc)
Handle the sorting corresponding to the header clicked

Parameters:
tc - The selected TableColumn


RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo