public class ViewerLabel extends Object
IViewerLabelProvider
Constructor and Description |
---|
ViewerLabel(String initialText,
Image initialImage)
Create a new instance of the receiver with the supplied initial text and
image.
|
Modifier and Type | Method and Description |
---|---|
Color |
getBackground()
Get the background Color.
|
Font |
getFont()
Get the font.
|
Color |
getForeground()
Get the foreground Color.
|
Image |
getImage()
Get the image for the receiver.
|
String |
getText()
Get the text for the receiver.
|
Color |
getTooltipBackgroundColor()
Return the tool tip background color.
|
Color |
getTooltipForegroundColor()
Return the foreground
Color . |
Point |
getTooltipShift() |
String |
getTooltipText()
Returns the tooltipText.
|
boolean |
hasNewBackground()
Return whether or not the background color has been set.
|
boolean |
hasNewFont()
Return whether or not the font has been set.
|
boolean |
hasNewForeground()
Return whether or not the foreground color has been set.
|
boolean |
hasNewImage()
Return whether or not the image has been set.
|
boolean |
hasNewText()
Return whether or not the text has been set.
|
boolean |
hasNewTooltipBackgroundColor()
Return whether or not the tool tip background color has been set.
|
boolean |
hasNewTooltipForegroundColor()
Return whether or not the tool tip foreground color has been set.
|
boolean |
hasNewTooltipText()
Return whether or not the tool tip text has been set.
|
boolean |
hasTooltipShift() |
void |
setBackground(Color background)
Set the background Color.
|
void |
setFont(Font font)
Set the font.
|
void |
setForeground(Color foreground)
Set the foreground Color.
|
void |
setImage(Image image)
Set the image for the receiver.
|
void |
setText(String text)
Set the text for the receiver.
|
void |
setTooltipBackgroundColor(Color tooltipBackgroundColor)
Set the background
Color for tool tip. |
void |
setTooltipForegroundColor(Color tooltipForegroundColor)
Set the foreground
Color for tool tip. |
void |
setTooltipShift(Point tooltipShift) |
void |
setTooltipText(String tooltipText)
Set the tool tip text.
|
public final Image getImage()
public final void setImage(Image image)
image
- The image to set.public final String getText()
null
if there was no initial text and
nothing was updated.public final void setText(String text)
text
- String The label to set. This value should not be
null
.hasNewText()
public boolean hasNewImage()
true
if the image has been set to
something new.public boolean hasNewText()
true
if the text has been set to
something new.public boolean hasNewBackground()
true
if the value has been set.public boolean hasNewForeground()
true
if the value has been set.public boolean hasNewFont()
true
if the value has been set.public Color getBackground()
null
if no new value was set.public void setBackground(Color background)
background
- Color. This value should not be null
.public Font getFont()
null
if no new value was set.public void setFont(Font font)
font
- Font This value should not be null
.public Color getForeground()
null
if no new value was set.public void setForeground(Color foreground)
foreground
- Color This value should not be null
.public String getTooltipText()
String
or null
if the tool tip text was
never set.public void setTooltipText(String tooltipText)
tooltipText
- The tooltipText String
to set. This value should not
be null
.public boolean hasNewTooltipText()
boolean
. true
if the tool tip text
has been set.public Color getTooltipBackgroundColor()
Color
or null
if the tool tip background
color has not been set.public void setTooltipBackgroundColor(Color tooltipBackgroundColor)
Color
for tool tip.tooltipBackgroundColor
- The Color
to set. This value should not be
null
.public boolean hasNewTooltipBackgroundColor()
boolean
. true
if the tool tip text
has been set.public Color getTooltipForegroundColor()
Color
.Color
or null
if the tool tip
foreground color has not been set.public void setTooltipForegroundColor(Color tooltipForegroundColor)
Color
for tool tip.tooltipForegroundColor
- The tooltipForegroundColor to set.public boolean hasNewTooltipForegroundColor()
boolean
. true
if the tool tip foreground
has been set.public Point getTooltipShift()
public void setTooltipShift(Point tooltipShift)
tooltipShift
- The tooltipShift to set.public boolean hasTooltipShift()
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.