com.aelitis.azureus.ui.swt.views.skin
Class ToolBarView

java.lang.Object
  extended by com.aelitis.azureus.ui.swt.skin.SWTSkinObjectAdapter
      extended by com.aelitis.azureus.ui.swt.views.skin.SkinView
          extended by com.aelitis.azureus.ui.swt.views.skin.ToolBarView
All Implemented Interfaces:
SelectedContentListener, SWTSkinObjectListener, UIToolBarManager, UIToolBarManagerCore

public class ToolBarView
extends SkinView
implements UIToolBarManagerCore, SelectedContentListener

Author:
TuxPaper

Nested Class Summary
static interface ToolBarView.ToolBarViewListener
           
 
Field Summary
 
Fields inherited from class com.aelitis.azureus.ui.swt.views.skin.SkinView
skin, soMain
 
Fields inherited from interface org.gudy.azureus2.plugins.ui.toolbar.UIToolBarManager
GROUP_BIG, GROUP_MAIN
 
Fields inherited from interface com.aelitis.azureus.ui.swt.skin.SWTSkinObjectListener
EVENT_CREATE_REQUEST, EVENT_CREATED, EVENT_DATASOURCE_CHANGED, EVENT_DESTROY, EVENT_HIDE, EVENT_LANGUAGE_CHANGE, EVENT_SELECT, EVENT_SHOW, NAMES
 
Constructor Summary
ToolBarView()
           
 
Method Summary
 void _refreshCoreToolBarItems()
           
 void addListener(ToolBarView.ToolBarViewListener l)
           
 void addToolBarItem(ToolBarItemSO item, String templatePrefix, SWTSkinObject soMain)
           
 void addToolBarItem(UIToolBarItem item)
          Adds a UIToolBarItem to the UI.
 void addToolBarItemNoCreate(ToolBarItemSO item)
           
 UIToolBarItem createToolBarItem(String id)
          Create a new UIToolBarItem.
 void currentlySelectedContentChanged(ISelectedContent[] currentContent, String viewID)
           
 ToolBarItem[] getAllSWTToolBarItems()
           
 UIToolBarItem[] getAllToolBarItems()
           
 boolean getShowText()
           
 UIToolBarItem getToolBarItem(String itemID)
           
 ToolBarItemSO getToolBarItemSO(String itemID)
           
protected  boolean moveBottom()
           
protected  boolean moveTop()
           
 void refreshCoreToolBarItems()
           
 void removeListener(ToolBarView.ToolBarViewListener l)
           
 void removeToolBarItem(String id)
           
 void setShowText(boolean showText)
           
 Object skinObjectHidden(SWTSkinObject skinObject, Object params)
          Skin Object was hidden
 Object skinObjectInitialShow(SWTSkinObject skinObject, Object params)
           
 Object skinObjectShown(SWTSkinObject skinObject, Object params)
          Skin Object was shown
 boolean triggerToolBarItem(ToolBarItem item, long activationType, Object datasource)
           
 
Methods inherited from class com.aelitis.azureus.ui.swt.views.skin.SkinView
getMainSkinObject, getSkin, getSkinObject, isVisible, setMainSkinObject, skinObjectCreated, skinObjectDestroyed
 
Methods inherited from class com.aelitis.azureus.ui.swt.skin.SWTSkinObjectAdapter
dataSourceChanged, eventOccured, skinObjectSelected, updateLanguage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToolBarView

public ToolBarView()
Method Detail

skinObjectInitialShow

public Object skinObjectInitialShow(SWTSkinObject skinObject,
                                    Object params)
Specified by:
skinObjectInitialShow in class SkinView
Returns:

currentlySelectedContentChanged

public void currentlySelectedContentChanged(ISelectedContent[] currentContent,
                                            String viewID)
Specified by:
currentlySelectedContentChanged in interface SelectedContentListener

skinObjectShown

public Object skinObjectShown(SWTSkinObject skinObject,
                              Object params)
Description copied from class: SWTSkinObjectAdapter
Skin Object was shown

Overrides:
skinObjectShown in class SkinView

skinObjectHidden

public Object skinObjectHidden(SWTSkinObject skinObject,
                               Object params)
Description copied from class: SWTSkinObjectAdapter
Skin Object was hidden

Overrides:
skinObjectHidden in class SkinView

triggerToolBarItem

public boolean triggerToolBarItem(ToolBarItem item,
                                  long activationType,
                                  Object datasource)

moveBottom

protected boolean moveBottom()

moveTop

protected boolean moveTop()

getToolBarItem

public UIToolBarItem getToolBarItem(String itemID)
Specified by:
getToolBarItem in interface UIToolBarManager

getToolBarItemSO

public ToolBarItemSO getToolBarItemSO(String itemID)

getAllToolBarItems

public UIToolBarItem[] getAllToolBarItems()
Specified by:
getAllToolBarItems in interface UIToolBarManager

getAllSWTToolBarItems

public ToolBarItem[] getAllSWTToolBarItems()

refreshCoreToolBarItems

public void refreshCoreToolBarItems()

_refreshCoreToolBarItems

public void _refreshCoreToolBarItems()

createToolBarItem

public UIToolBarItem createToolBarItem(String id)
Description copied from interface: UIToolBarManager
Create a new UIToolBarItem. You will still need to add it via UIToolBarManager.addToolBarItem(UIToolBarItem), after setting the item's properties

Specified by:
createToolBarItem in interface UIToolBarManager
Parameters:
id - unique id
Returns:
newly created toolbar

addToolBarItem

public void addToolBarItem(UIToolBarItem item)
Description copied from interface: UIToolBarManager
Adds a UIToolBarItem to the UI. Make sure you at least set the icon before adding

Specified by:
addToolBarItem in interface UIToolBarManager

addToolBarItemNoCreate

public void addToolBarItemNoCreate(ToolBarItemSO item)

addToolBarItem

public void addToolBarItem(ToolBarItemSO item,
                           String templatePrefix,
                           SWTSkinObject soMain)

setShowText

public void setShowText(boolean showText)
Parameters:
showText - the showText to set

getShowText

public boolean getShowText()
Returns:
the showText

addListener

public void addListener(ToolBarView.ToolBarViewListener l)

removeListener

public void removeListener(ToolBarView.ToolBarViewListener l)

removeToolBarItem

public void removeToolBarItem(String id)
Specified by:
removeToolBarItem in interface UIToolBarManager