net.sourceforge.java.feednread.frontend.components.sidebar
Class SideBar

java.lang.Object
  extended bynet.sourceforge.java.feednread.frontend.components.sidebar.SideBar

public class SideBar
extends Object

Container component that holds different selectable sub components, e.g. the NewsFeedFavoritesTree.

Author:
Sebastian Machhausen

Field Summary
private  MainApplicationWindow mainWindow
           The Feed'n Read main window
private  PShelf sideBarShelf
           The side bar Shelf
 
Constructor Summary
SideBar(Composite parent, MainApplicationWindow mainWindow)
           Creates a new SideBar instance.
 
Method Summary
private  void createContents(Composite parent)
           Creates the contents of this SideBar component.
 PShelfItem createItem(String text, Image img)
           Creates a new PShelfItem in this SideBar component.
 PShelfItem getSelectedItem()
           Gets the selected PShelfItem in this SideBar.
 void refresh()
           Refreshes this SideBar, i.e. inducing a redraw to be performed.
 void setSelectedItem(PShelfItem item)
           Selects the specified PShelfItem in this SideBar.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mainWindow

private MainApplicationWindow mainWindow

The Feed'n Read main window


sideBarShelf

private PShelf sideBarShelf

The side bar Shelf

Constructor Detail

SideBar

public SideBar(Composite parent,
               MainApplicationWindow mainWindow)

Creates a new SideBar instance.

Parameters:
parent - the parent Composite to embed the SideBar into
mainWindow - the Feed'n Read main window
Method Detail

createContents

private void createContents(Composite parent)

Creates the contents of this SideBar component.

Parameters:
parent - he parent Composite to embed the SideBar contents into

createItem

public PShelfItem createItem(String text,
                             Image img)

Creates a new PShelfItem in this SideBar component.

Parameters:
text - the text for the PShelfItem
img - the Image for the PShelfItem
Returns:
the created PShelfItem

getSelectedItem

public PShelfItem getSelectedItem()

Gets the selected PShelfItem in this SideBar.

Returns:
the selected PShelfItem
See Also:
setSelectedItem(PShelfItem)

setSelectedItem

public void setSelectedItem(PShelfItem item)

Selects the specified PShelfItem in this SideBar.

Parameters:
item - the PShelfItem to select
See Also:
getSelectedItem()

refresh

public void refresh()

Refreshes this SideBar, i.e. inducing a redraw to be performed.