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 java.lang.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(java.lang.String id)
           
 
Method Summary
 void addToolBarItemListener(ToolBarItem.ToolBarItemListener l)
           
 UIToolBarActivationListener getDefaultActivationListener()
           
 java.lang.String getGroupID()
           
 java.lang.String getID()
          Retrieve the ID of the toolbar item
 java.lang.String getImageID()
          Get the ID of the image used
 long getState()
           
 java.lang.String getTextID()
          Return the message bundle ID for the button text
 java.lang.String getToolTip()
           
 java.lang.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(java.lang.String groupID)
           
 void setImageID(java.lang.String id)
          Sets the toolbar item to use the specified image
 void setState(long state)
           
 void setTextID(java.lang.String id)
          Sets the button's text to a messagebundle value looked up using the id
 void setToolTip(java.lang.String text)
           
 void setTooltipID(java.lang.String tooltipID)
           
 boolean triggerToolBarItem(long activationType, java.lang.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(java.lang.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 java.lang.String getID()
Description copied from interface: UIToolBarItem
Retrieve the ID of the toolbar item

Specified by:
getID in interface UIToolBarItem

getTextID

public java.lang.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(java.lang.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 java.lang.String getImageID()
Description copied from interface: UIToolBarItem
Get the ID of the image used

Specified by:
getImageID in interface UIToolBarItem

setImageID

public void setImageID(java.lang.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,
                                  java.lang.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 java.lang.String getTooltipID()
Specified by:
getTooltipID in interface ToolBarItem

setTooltipID

public void setTooltipID(java.lang.String tooltipID)

getGroupID

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

setGroupID

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

setToolTip

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

getToolTip

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