public class LabelContribution
extends org.eclipse.jface.action.ControlContribution
ControlContribution
for an SWT
Label
. As such, an instance of a LabelContribution
can be
added to JFace ToolBarManager
s, or really any JFace
IContributionManager
.Constructor and Description |
---|
LabelContribution(java.lang.String id)
The default constructor.
|
LabelContribution(java.lang.String id,
int style)
The full constructor.
|
Modifier and Type | Method and Description |
---|---|
org.eclipse.swt.widgets.Label |
getLabel()
Gets the underlying SWT
Label widget. |
void |
setText(java.lang.String text)
Sets the [initial] text for the label.
|
public LabelContribution(java.lang.String id)
label
will be created with the
style NONE
.id
- The ID of the contribution item.public LabelContribution(java.lang.String id, int style)
id
- The ID of the contribution item.style
- The style to use for the label
.public org.eclipse.swt.widgets.Label getLabel()
Label
widget.Label
, or null
if it has not yet been
created.public void setText(java.lang.String text)
text
- The label text.