|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.viewers.ViewerLabel
The ViewerLabel is the class that is passed to a viewer to handle updates of labels. It keeps track of both original and updates text.
IViewerLabelProvider
Constructor Summary | |
---|---|
ViewerLabel(String initialText,
Image initialImage)
Create a new instance of the receiver with the supplied initial text and image. |
Method Summary | |
---|---|
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. |
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. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ViewerLabel(String initialText, Image initialImage)
initialText
- initialImage
- Method Detail |
public final Image getImage()
public final void setImage(Image image)
image
- The image to set.public final String getText()
public final void setText(String text)
text
- The label to set.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
- Colorpublic Font getFont()
null
if no new value
was set.public void setFont(Font font)
font
- Fontpublic Color getForeground()
null
if no new value
was set.public void setForeground(Color foreground)
foreground
-
|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.