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

java.lang.Object
  extended by org.gudy.azureus2.ui.swt.pluginsimpl.UISWTStatusEntryImpl
All Implemented Interfaces:
IMainStatusBar.CLabelUpdater, UISWTStatusEntry

public class UISWTStatusEntryImpl
extends java.lang.Object
implements UISWTStatusEntry, IMainStatusBar.CLabelUpdater

Author:
Allan Crooks

Field Summary
 
Fields inherited from interface org.gudy.azureus2.ui.swt.plugins.UISWTStatusEntry
IMAGE_LED_GREEN, IMAGE_LED_GREY, IMAGE_LED_RED, IMAGE_LED_YELLOW
 
Constructor Summary
UISWTStatusEntryImpl()
           
 
Method Summary
 void created(MainStatusBar.CLabelPadding label)
           
 void destroy()
          Destroys the status entry.
 MenuContext getMenuContext()
          Returns a menu context object to allow you to add menu items to the status entry.
 void setImage(org.eclipse.swt.graphics.Image image)
          Sets the image to display.
 void setImage(int image_id)
          Sets the image to display - the value here must be one of the IMAGE_ values defined above.
 void setImageEnabled(boolean enabled)
          Indicates whether an image should be displayed or not.
 void setListener(UISWTStatusEntryListener listener)
          Sets a listener to be informed when the status entry has been clicked on.
 void setText(java.lang.String text)
          Sets the text to display in the status bar.
 void setTooltipText(java.lang.String text)
          Sets the tooltip text to associate with the status bar.
 void setVisible(boolean visible)
          Toggles the visibility of the entry in the status bar.
 boolean update(MainStatusBar.CLabelPadding label)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UISWTStatusEntryImpl

public UISWTStatusEntryImpl()
Method Detail

getMenuContext

public MenuContext getMenuContext()
Description copied from interface: UISWTStatusEntry
Returns a menu context object to allow you to add menu items to the status entry.

Specified by:
getMenuContext in interface UISWTStatusEntry
See Also:
MenuManager.addMenuItem(MenuContext, String)

update

public boolean update(MainStatusBar.CLabelPadding label)
Specified by:
update in interface IMainStatusBar.CLabelUpdater

destroy

public void destroy()
Description copied from interface: UISWTStatusEntry
Destroys the status entry.

Specified by:
destroy in interface UISWTStatusEntry

setImage

public void setImage(int image_id)
Description copied from interface: UISWTStatusEntry
Sets the image to display - the value here must be one of the IMAGE_ values defined above. You must call UISWTStatusEntry.setImageEnabled(boolean) to enable images to be displayed for this status entry.

Specified by:
setImage in interface UISWTStatusEntry

setImage

public void setImage(org.eclipse.swt.graphics.Image image)
Description copied from interface: UISWTStatusEntry
Sets the image to display. You must call UISWTStatusEntry.setImageEnabled(boolean) to enable images to be displayed for this status entry.

Specified by:
setImage in interface UISWTStatusEntry

setImageEnabled

public void setImageEnabled(boolean enabled)
Description copied from interface: UISWTStatusEntry
Indicates whether an image should be displayed or not.

Specified by:
setImageEnabled in interface UISWTStatusEntry

setListener

public void setListener(UISWTStatusEntryListener listener)
Description copied from interface: UISWTStatusEntry
Sets a listener to be informed when the status entry has been clicked on.

Specified by:
setListener in interface UISWTStatusEntry

setText

public void setText(java.lang.String text)
Description copied from interface: UISWTStatusEntry
Sets the text to display in the status bar. If you want to prevent any text being displayed, pass null as a parameter.

Specified by:
setText in interface UISWTStatusEntry

setTooltipText

public void setTooltipText(java.lang.String text)
Description copied from interface: UISWTStatusEntry
Sets the tooltip text to associate with the status bar. If you want to remove any tooltip text, pass null as a parameter.

Specified by:
setTooltipText in interface UISWTStatusEntry

setVisible

public void setVisible(boolean visible)
Description copied from interface: UISWTStatusEntry
Toggles the visibility of the entry in the status bar.

Specified by:
setVisible in interface UISWTStatusEntry

created

public void created(MainStatusBar.CLabelPadding label)
Specified by:
created in interface IMainStatusBar.CLabelUpdater