public class StatusLineManager extends ContributionManager implements IStatusLineManager
This class may be instantiated; it may also be subclassed if a more sophisticated layout is required.
Modifier and Type | Field and Description |
---|---|
static String |
BEGIN_GROUP
Identifier of group marker used to position contributions at the beginning
of the status line.
|
static String |
END_GROUP
Identifier of group marker used to position contributions at the end
of the status line.
|
static String |
MIDDLE_GROUP
Identifier of group marker used to position contributions in the middle
of the status line.
|
Constructor and Description |
---|
StatusLineManager()
Creates a new status line manager.
|
Modifier and Type | Method and Description |
---|---|
Control |
createControl(Composite parent)
Creates and returns this manager's status line control.
|
Control |
createControl(Composite parent,
int style)
Creates and returns this manager's status line control.
|
void |
dispose()
Disposes of this status line manager and frees all allocated SWT resources.
|
Control |
getControl()
Returns the control used by this StatusLineManager.
|
IProgressMonitor |
getProgressMonitor()
Returns a progress monitor which reports progress in the status line.
|
protected IProgressMonitor |
getProgressMonitorDelegate()
Returns the progress monitor delegate.
|
boolean |
isCancelEnabled()
Returns whether the cancel button on the status line's progress monitor
is enabled.
|
void |
setCancelEnabled(boolean enabled)
Sets whether the cancel button on the status line's progress monitor
is enabled.
|
void |
setErrorMessage(Image image,
String message)
Sets the image and error message to be displayed on the status line.
|
void |
setErrorMessage(String message)
Sets the error message text to be displayed on the status line.
|
void |
setMessage(Image image,
String message)
Sets the image and message to be displayed on the status line.
|
void |
setMessage(String message)
Sets the message text to be displayed on the status line.
|
void |
update(boolean force)
Updates this manager's underlying widget(s) with any changes which
have been made to it or its items.
|
add, add, allowItem, appendToGroup, appendToGroup, dumpStatistics, find, getItems, getOverrides, getSize, hasDynamicItems, indexOf, indexOf, insert, insertAfter, insertAfter, insertBefore, insertBefore, internalSetItems, isDirty, isEmpty, itemAdded, itemRemoved, markDirty, prependToGroup, prependToGroup, remove, remove, removeAll, replaceItem, setDirty, setOverrides
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, add, appendToGroup, appendToGroup, find, getItems, getOverrides, insertAfter, insertAfter, insertBefore, insertBefore, isDirty, isEmpty, markDirty, prependToGroup, prependToGroup, remove, remove, removeAll
public static final String BEGIN_GROUP
public static final String MIDDLE_GROUP
public static final String END_GROUP
public StatusLineManager()
createControl
method to create the
status line control.public Control createControl(Composite parent)
Note: Since 3.0 the return type is Control
. Before 3.0, the return type was
the package-private class StatusLine
.
parent
- the parent controlpublic Control createControl(Composite parent, int style)
parent
- the parent controlstyle
- the style for the controlpublic void dispose()
removeAll
for that purpose.public Control getControl()
protected IProgressMonitor getProgressMonitorDelegate()
public IProgressMonitor getProgressMonitor()
IStatusLineManager
getProgressMonitor
in interface IStatusLineManager
public boolean isCancelEnabled()
IStatusLineManager
isCancelEnabled
in interface IStatusLineManager
true
if the cancel button is enabled, or false
if notpublic void setCancelEnabled(boolean enabled)
IStatusLineManager
setCancelEnabled
in interface IStatusLineManager
enabled
- true
if the cancel button is enabled, or false
if notpublic void setErrorMessage(String message)
IStatusLineManager
An error message overrides the current message until the error
message is cleared (set to null
).
setErrorMessage
in interface IStatusLineManager
message
- the error message, or null
to clear
the current error message.public void setErrorMessage(Image image, String message)
IStatusLineManager
An error message overrides the current message until the error
message is cleared (set to null
).
setErrorMessage
in interface IStatusLineManager
image
- the image to use, or null
for no imagemessage
- the error message, or null
to clear
the current error message.public void setMessage(String message)
IStatusLineManager
This method replaces the current message but does not affect the
error message. That is, the error message, if set, will continue
to be displayed until it is cleared (set to null
).
setMessage
in interface IStatusLineManager
message
- the message, or null
for no messagepublic void setMessage(Image image, String message)
IStatusLineManager
This method replaces the current message but does not affect the
error message. That is, the error message, if set, will continue
to be displayed until it is cleared (set to null
).
setMessage
in interface IStatusLineManager
image
- the image to use, or null
for no imagemessage
- the message, or null
for no messagepublic void update(boolean force)
IContributionManager
update
in interface IContributionManager
force
- true
means update even if not dirty,
and false
for normal incremental updating
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.