net.sourceforge.java.feednread.frontend.components.tabbar
Class NewsFeedTabBar.TabHandler

java.lang.Object
  extended byorg.eclipse.swt.custom.CTabFolder2Adapter
      extended bynet.sourceforge.java.feednread.frontend.components.tabbar.NewsFeedTabBar.TabHandler
All Implemented Interfaces:
CTabFolder2Listener, EventListener, SelectionListener, SWTEventListener
Enclosing class:
NewsFeedTabBar

private class NewsFeedTabBar.TabHandler
extends CTabFolder2Adapter
implements SelectionListener

Internal Event Handler to react on closing tabs. If a tab is closed the internal management structures are updated.


Constructor Summary
private NewsFeedTabBar.TabHandler()
           
 
Method Summary
 void close(CTabFolderEvent event)
           Called when a tab has been closed.
private  void selectionChanged(SelectionEvent event)
           If the tab selection changed adjust the tab view depending on the type of tab.
 void widgetDefaultSelected(SelectionEvent event)
           Called when a tab has been default selected.
 void widgetSelected(SelectionEvent event)
           Called when a tab has been selected.
 
Methods inherited from class org.eclipse.swt.custom.CTabFolder2Adapter
maximize, minimize, restore, showList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NewsFeedTabBar.TabHandler

private NewsFeedTabBar.TabHandler()
Method Detail

close

public void close(CTabFolderEvent event)

Called when a tab has been closed. This methods evaluates the closed tab and removes its data entry from the underlying management structure depending on the tab type, i.e. newsfeed or browser tab.

Specified by:
close in interface CTabFolder2Listener
Parameters:
event - the CTabFolderEvent triggered

widgetSelected

public void widgetSelected(SelectionEvent event)

Called when a tab has been selected.

Specified by:
widgetSelected in interface SelectionListener
Parameters:
event - the SelectionEvent triggered

widgetDefaultSelected

public void widgetDefaultSelected(SelectionEvent event)

Called when a tab has been default selected.

Specified by:
widgetDefaultSelected in interface SelectionListener
Parameters:
event - the SelectionEvent triggered

selectionChanged

private void selectionChanged(SelectionEvent event)

If the tab selection changed adjust the tab view depending on the type of tab. If a browser tab has been selected the enclosing split screen is maximized and the NewsContentView hidden. Otherwiese a newsfeed tab has been selected and the enclosing split screen is restored and the NewsContentView shown.

Parameters:
event - the SelectionEvent triggered