org.gudy.azureus2.ui.swt.plugins
Interface UISWTStatusEntry

All Known Implementing Classes:
UISWTStatusEntryImpl

public interface UISWTStatusEntry

This interface represents a status entry indicator in the status bar. Examples of such indicators are the Share Ratio indicator and the DHT Status indicator. Plugins can create their own indicators via UISWTInstance.createStatusEntry().

Note: When a status entry is first created, it is set to be invisible, with no status text or tool tip text and no image to be associated with it. Once you set some content, you must call setVisible(true) for it to become visible.

Since:
3.0.0.8
Author:
amc1
See Also:
UISWTInstance.createStatusEntry()

Field Summary
static int IMAGE_LED_GREEN
           
static int IMAGE_LED_GREY
           
static int IMAGE_LED_RED
           
static int IMAGE_LED_YELLOW
           
 
Method Summary
 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.
 

Field Detail

IMAGE_LED_GREY

static final int IMAGE_LED_GREY
See Also:
Constant Field Values

IMAGE_LED_RED

static final int IMAGE_LED_RED
See Also:
Constant Field Values

IMAGE_LED_YELLOW

static final int IMAGE_LED_YELLOW
See Also:
Constant Field Values

IMAGE_LED_GREEN

static final int IMAGE_LED_GREEN
See Also:
Constant Field Values
Method Detail

setVisible

void setVisible(boolean visible)
Toggles the visibility of the entry in the status bar.


setText

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


setTooltipText

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


setListener

void setListener(UISWTStatusEntryListener listener)
Sets a listener to be informed when the status entry has been clicked on.


setImageEnabled

void setImageEnabled(boolean enabled)
Indicates whether an image should be displayed or not.


setImage

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


setImage

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


destroy

void destroy()
Destroys the status entry.


getMenuContext

MenuContext getMenuContext()
Returns a menu context object to allow you to add menu items to the status entry.

Since:
3.0.5.3
See Also:
MenuManager.addMenuItem(MenuContext, String)