org.gudy.azureus2.ui.swt.pluginsimpl
Class UIToolBarItemImpl

java.lang.Object
  extended by org.gudy.azureus2.ui.swt.pluginsimpl.UIToolBarItemImpl
All Implemented Interfaces:
ToolBarItem, UIToolBarItem

public class UIToolBarItemImpl
extends Object
implements ToolBarItem

A Toolbar item implementation, independent of UI (SWT)

Author:
TuxPaper

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.aelitis.azureus.ui.common.ToolBarItem
ToolBarItem.ToolBarItemListener
 
Field Summary
 
Fields inherited from interface org.gudy.azureus2.plugins.ui.toolbar.UIToolBarItem
STATE_DOWN, STATE_ENABLED
 
Constructor Summary
UIToolBarItemImpl(String id)
           
 
Method Summary
 void addToolBarItemListener(ToolBarItem.ToolBarItemListener l)
           
 UIToolBarActivationListener getDefaultActivationListener()
           
 String getGroupID()
           
 String getID()
          Retrieve the ID of the toolbar item
 String getImageID()
          Get the ID of the image used
 long getState()
           
 String getTextID()
          Return the message bundle ID for the button text
 String getToolTip()
           
 String getTooltipID()
           
 boolean isAlwaysAvailable()
          Returns if the toolbar item is always available (enabled)
 void removeToolBarItemListener(ToolBarItem.ToolBarItemListener l)
           
 void setAlwaysAvailable(boolean alwaysAvailable)
           
 void setDefaultActivationListener(UIToolBarActivationListener defaultActivation)
           
 void setGroupID(String groupID)
           
 void setImageID(String id)
          Sets the toolbar item to use the specified image
 void setState(long state)
           
 void setTextID(String id)
          Sets the button's text to a messagebundle value looked up using the id
 void setToolTip(String text)
           
 void setTooltipID(String tooltipID)
           
 boolean triggerToolBarItem(long activationType, Object datasource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UIToolBarItemImpl

public UIToolBarItemImpl(String id)
Method Detail

addToolBarItemListener

public void addToolBarItemListener(ToolBarItem.ToolBarItemListener l)
Specified by:
addToolBarItemListener in interface ToolBarItem

removeToolBarItemListener

public void removeToolBarItemListener(ToolBarItem.ToolBarItemListener l)
Specified by:
removeToolBarItemListener in interface ToolBarItem

getID

public String getID()
Description copied from interface: UIToolBarItem
Retrieve the ID of the toolbar item

Specified by:
getID in interface UIToolBarItem

getTextID

public String getTextID()
Description copied from interface: UIToolBarItem
Return the message bundle ID for the button text

Specified by:
getTextID in interface UIToolBarItem

setTextID

public void setTextID(String id)
Description copied from interface: UIToolBarItem
Sets the button's text to a messagebundle value looked up using the id

Specified by:
setTextID in interface UIToolBarItem

getImageID

public String getImageID()
Description copied from interface: UIToolBarItem
Get the ID of the image used

Specified by:
getImageID in interface UIToolBarItem

setImageID

public void setImageID(String id)
Description copied from interface: UIToolBarItem
Sets the toolbar item to use the specified image

Specified by:
setImageID in interface UIToolBarItem

isAlwaysAvailable

public boolean isAlwaysAvailable()
Description copied from interface: UIToolBarItem
Returns if the toolbar item is always available (enabled)

Specified by:
isAlwaysAvailable in interface UIToolBarItem

setAlwaysAvailable

public void setAlwaysAvailable(boolean alwaysAvailable)
Specified by:
setAlwaysAvailable in interface ToolBarItem

getState

public long getState()
Specified by:
getState in interface UIToolBarItem

setState

public void setState(long state)
Specified by:
setState in interface UIToolBarItem

triggerToolBarItem

public boolean triggerToolBarItem(long activationType,
                                  Object datasource)
Specified by:
triggerToolBarItem in interface ToolBarItem
Specified by:
triggerToolBarItem in interface UIToolBarItem

setDefaultActivationListener

public void setDefaultActivationListener(UIToolBarActivationListener defaultActivation)
Specified by:
setDefaultActivationListener in interface ToolBarItem
Specified by:
setDefaultActivationListener in interface UIToolBarItem

getDefaultActivationListener

public UIToolBarActivationListener getDefaultActivationListener()
Specified by:
getDefaultActivationListener in interface ToolBarItem

getTooltipID

public String getTooltipID()
Specified by:
getTooltipID in interface ToolBarItem

setTooltipID

public void setTooltipID(String tooltipID)

getGroupID

public String getGroupID()
Specified by:
getGroupID in interface UIToolBarItem
Returns:
Group that item belongs to

setGroupID

public void setGroupID(String groupID)
Specified by:
setGroupID in interface UIToolBarItem

setToolTip

public void setToolTip(String text)
Specified by:
setToolTip in interface UIToolBarItem

getToolTip

public String getToolTip()
Specified by:
getToolTip in interface UIToolBarItem
Returns: