public class StatusLineContributionItem extends ContributionItem
This class may be instantiated; it is not intended to be subclassed.
| Modifier and Type | Field and Description |
|---|---|
static int |
CALC_TRUE_WIDTH
A constant indicating that the contribution should compute its actual
size depending on the text.
|
| Constructor and Description |
|---|
StatusLineContributionItem(String id)
Creates a status line contribution item with the given id.
|
StatusLineContributionItem(String id,
int charWidth)
Creates a status line contribution item with the given id that displays
the given number of characters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
fill(Composite parent)
The default implementation of this
IContributionItem
method does nothing. |
Point |
getDisplayLocation()
An accessor for the current location of this status line contribution
item -- relative to the display.
|
String |
getText()
Retrieves the text that is being displayed in the status line.
|
void |
setText(String text)
Sets the text to be displayed in the status line.
|
dispose, fill, fill, fill, getId, getParent, isDirty, isDynamic, isEnabled, isGroupMarker, isSeparator, isVisible, saveWidgetState, setId, setParent, setVisible, toString, update, updatepublic static final int CALC_TRUE_WIDTH
public StatusLineContributionItem(String id)
id - the contribution item's id, or null if it is to
have no idpublic StatusLineContributionItem(String id, int charWidth)
id - the contribution item's id, or null if it is to
have no idcharWidth - the number of characters to display. If the value is
CALC_TRUE_WIDTH then the contribution will compute the
preferred size exactly. Otherwise the size will be based on the
average character size * 'charWidth'public void fill(Composite parent)
ContributionItemIContributionItem
method does nothing. Subclasses may override.fill in interface IContributionItemfill in class ContributionItemparent - the parent controlpublic Point getDisplayLocation()
null if
not yet initialized.public String getText()
public void setText(String text)
text - the text to be displayed, must not be null
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.