# com.bea.ide.ui.statusbar
IGlobalStatus Interface

public interface IGlobalStatus

This interface allows you to modify the global state of the status bar

## Field Summary

`public static final int` | `ERROR_MESSAGE` Error message type
`public static final int` | `FLASHING_ERROR_MESSAGE` Error message type with flashing
`public static final int` | `FLASHING_INFO_MESSAGE` Informational message type with flashing
`public static final int` | `GNOME` int
`public static final `Integer`` | `INDETERMINATE` Constant defined for the integer value returned from getPregressBarStatus() if the progress bar is in an indeterminate state
`public static final int` | `INFO_MESSAGE` Informational message type
`public static final int` | `NORMAL_MESSAGE` Normal message type
`public static final `String`` | `PROGRESS_BAR_MESSAGE` property for the message in the progress bar
`public static final `String`` | `PROGRESS_BAR_PERCENTAGE` property for the percentage state of the progress bar
`public static final `String`` | `PROGRESS_BAR_VISIBLE` property for the visible state of the progress bar
`public static final `String`` | `PROP_MESSAGE` Property for the current message
`public static final `String`` | `PROP_TYPE` property for the type of the current message

## Method Summary

`public void` | `addPropertyChangeListener`(`String` sProp, `PropertyChangeListener` pcl) Adds the given listener to the object for the given property.
`public void` | `addPropertyChangeListener`(`PropertyChangeListener` pcl) Adds the given listener to the object.
`public `String`` | `getProgressBarMessage`() Get the message currently displayed in the progress bar.
`public `Integer`` | `getProgressBarPercentage`() Gets the percentage state of a determinate progress bar.
`public `String`` | `getText`()
`public int` | `getType`()
`public boolean` | `isIndeterminate`() Get the state of the progress bar
`public boolean` | `releaseProgressBar`(`Object` owner) Releases the status bar to other callers wishing to set the progress bar status.
`public void` | `removePropertyChangeListener`(`String` sProp, `PropertyChangeListener` pcl) Removes the given listener from the object for the given property.
`public void` | `removePropertyChangeListener`(`PropertyChangeListener` pcl) Removes the given listener from the object for the given property.
`public boolean` | `setProgressBarIndeterminate`(`Object` owner, `String` status) Sets the status of the global progress bar to an intederminate state.
`public boolean` | `setProgressBarStatus`(`Object` owner, `String` status, int percentage) Sets the status of the global progress bar.
`public void` | `setText`(`String` text) sets the text in the main text area and uses the NORMAL_MESSAGE type.
`public void` | `setText`(`String` text, int messageType) sets the text in the main text area and uses the specified type you can find the types above.

## Field Detail

### ERROR_MESSAGE

    public static final int ERROR_MESSAGE

  Error message type

### FLASHING_ERROR_MESSAGE

    public static final int FLASHING_ERROR_MESSAGE

  Error message type with flashing

### FLASHING_INFO_MESSAGE

    public static final int FLASHING_INFO_MESSAGE

  Informational message type with flashing

### GNOME

    public static final int GNOME

### INDETERMINATE

    public static final Integer INDETERMINATE

  Constant defined for the integer value returned from getPregressBarStatus() if the progress bar is in an indeterminate state

### INFO_MESSAGE

    public static final int INFO_MESSAGE

  Informational message type

### NORMAL_MESSAGE

    public static final int NORMAL_MESSAGE

  Normal message type

### PROGRESS_BAR_MESSAGE

    public static final String PROGRESS_BAR_MESSAGE

  property for the message in the progress bar

### PROGRESS_BAR_PERCENTAGE

    public static final String PROGRESS_BAR_PERCENTAGE

  property for the percentage state of the progress bar

### PROGRESS_BAR_VISIBLE

    public static final String PROGRESS_BAR_VISIBLE

  property for the visible state of the progress bar

### PROP_MESSAGE

    public static final String PROP_MESSAGE

  Property for the current message

### PROP_TYPE

    public static final String PROP_TYPE

  property for the type of the current message

## Method Detail

### addPropertyChangeListener(String, PropertyChangeListener) Method

    public void addPropertyChangeListener(String sProp,
                                          PropertyChangeListener pcl)

Adds the given listener to the object for the given property. Whenever the given property changes the listener will receive a `PropertyChangeEvent```.

#### Parameters

sProp
  property to watch for changes

pcl
  listener to notify when a change occurs

### addPropertyChangeListener(PropertyChangeListener) Method

    public void addPropertyChangeListener(PropertyChangeListener pcl)

Adds the given listener to the object. Whenever any property of the object changes the listener will receive a `PropertyChangeEvent```.

#### Parameters

pcl
  listener to notify when a change occurs

### getProgressBarMessage() Method

    public String getProgressBarMessage()

Get the message currently displayed in the progress bar.

#### Returns

current text of the progress bar message or null if the progress bar is not visible.

### getProgressBarPercentage() Method

    public Integer getProgressBarPercentage()

Gets the percentage state of a determinate progress bar. Note that this returns `IGlobalStatus.INDETERMINATE``` if the progress bar is in the indeterminate state

#### Returns

the percentage currently displayed in the progress bar, null if the progress bar is not visible.

### getText() Method

    public String getText()

#### Returns

text currently in the status bar

### getType() Method

    public int getType()

#### Returns

type of the current message

### isIndeterminate() Method

    public boolean isIndeterminate()

Get the state of the progress bar

#### Returns

true if the progress bar is in indeterminate mode, false otherwise

### releaseProgressBar(Object) Method

    public boolean releaseProgressBar(Object owner)

Releases the status bar to other callers wishing to set the progress bar status. See `IGlobalStatus.setProgressBarStatus(Object, String, int)``` for details on

#### Parameters

owner
  An object uniquely identifying the caller attempting to release the progress bar.

#### Returns

boolean indicating whether the specified owner was the actual owner of the progress bar.

### removePropertyChangeListener(String, PropertyChangeListener) Method

    public void removePropertyChangeListener(String sProp,
                                             PropertyChangeListener pcl)

Removes the given listener from the object for the given property. The listener must have been added using `IGlobalStatus.addPropertyChangeListener(String, PropertyChangeListener)```. This method will not remove listeners added using `IGlobalStatus.addPropertyChangeListener(PropertyChangeListener)```.

#### Parameters

sProp
  property to watch for changes

pcl
  listener to notify when a change occurs

### removePropertyChangeListener(PropertyChangeListener) Method

    public void removePropertyChangeListener(PropertyChangeListener pcl)

Removes the given listener from the object for the given property. The listener must have been added using `IGlobalStatus.addPropertyChangeListener(PropertyChangeListener)```. This method will not remove listeners added using `IGlobalStatus.addPropertyChangeListener(String, PropertyChangeListener)```.

#### Parameters

pcl
  listener to notify when a change occurs

### setProgressBarIndeterminate(Object, String) Method

    public boolean setProgressBarIndeterminate(Object owner,
                                               String status)

Sets the status of the global progress bar to an intederminate state. If there is not a current owner of the progress bar, the specified status message and percentage will be set, and the specified owner object will become the new owner of the progress bar until `IGlobalStatus.releaseProgressBar(Object)``` is called. If there is another owner, this request will be ignored.

#### Parameters

owner
  An object uniquely identifying the caller attempting to set the progress bar status.

status
  The message to be displayed in the progress bar.

#### Returns

boolean indicating whether this call successfully set the progress bar status.

### setProgressBarStatus(Object, String, int) Method

    public boolean setProgressBarStatus(Object owner,
                                        String status,
                                        int percentage)

Sets the status of the global progress bar. If there is not a current owner of the progress bar, the specified status message and percentage will be set, and the specified owner object will become the new owner of the progress bar until `IGlobalStatus.releaseProgressBar(Object)``` is called. If there is another owner, this request will be ignored.

#### Parameters

owner
  An object uniquely identifying the caller attempting to set the progress bar status.

status
  The message to be displayed in the progress bar.

percentage
  an integer, between greater than or equal to 0 and less than or equal to 100. Values out of this range will be rounded appropriately.

#### Returns

boolean indicating whether this call successfully set the progress bar status.

### setText(String) Method

    public void setText(String text)

sets the text in the main text area and uses the NORMAL_MESSAGE type. If this is called from a background thread, it will be re-run asynchronously on the AWT event thread.

#### Parameters

text
  text to display

### setText(String, int) Method

    public void setText(String text,
                        int messageType)

sets the text in the main text area and uses the specified type you can find the types above. If this is called from a background thread, it will be re-run asynchronously on the AWT event thread.

#### Parameters

text
  text to display

messageType
  type of message