Package org.eclipse.jface.viewers
Class ViewerLabel
java.lang.Object
org.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.
- Since:
- 3.0
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionViewerLabel(String initialText, Image initialImage) Create a new instance of the receiver with the supplied initial text and image.
- 
Method SummaryModifier and TypeMethodDescriptionGet the background Color.getFont()Get the font.Get the foreground Color.final ImagegetImage()Get the image for the receiver.final StringgetText()Get the text for the receiver.Return the tool tip background color.Return the foregroundColor.Returns the tooltipText.booleanReturn whether or not the background color has been set.booleanReturn whether or not the font has been set.booleanReturn whether or not the foreground color has been set.booleanReturn whether or not the image has been set.booleanReturn whether or not the text has been set.booleanReturn whether or not the tool tip background color has been set.booleanReturn whether or not the tool tip foreground color has been set.booleanReturn whether or not the tool tip text has been set.booleanvoidsetBackground(Color background) Set the background Color.voidSet the font.voidsetForeground(Color foreground) Set the foreground Color.final voidSet the image for the receiver.final voidSet the text for the receiver.voidsetTooltipBackgroundColor(Color tooltipBackgroundColor) Set the backgroundColorfor tool tip.voidsetTooltipForegroundColor(Color tooltipForegroundColor) Set the foregroundColorfor tool tip.voidsetTooltipShift(Point tooltipShift) voidsetTooltipText(String tooltipText) Set the tool tip text.
- 
Constructor Details- 
ViewerLabelCreate a new instance of the receiver with the supplied initial text and image.- Parameters:
- initialText- initial text
- initialImage- initial image
 
 
- 
- 
Method Details- 
getImageGet the image for the receiver. If the new image has been set return it, otherwise return the starting image.- Returns:
- Returns the image.
 
- 
setImageSet the image for the receiver.- Parameters:
- image- The image to set.
 
- 
getTextGet the text for the receiver. If the new text has been set return it, otherwise return the starting text.- Returns:
- String or nullif there was no initial text and nothing was updated.
 
- 
setTextSet the text for the receiver.- Parameters:
- text- String The label to set. This value should not be- null.
- See Also:
 
- 
hasNewImagepublic boolean hasNewImage()Return whether or not the image has been set.- Returns:
- boolean. trueif the image has been set to something new.
- Since:
- 3.1
 
- 
hasNewTextpublic boolean hasNewText()Return whether or not the text has been set.- Returns:
- boolean. trueif the text has been set to something new.
 
- 
hasNewBackgroundpublic boolean hasNewBackground()Return whether or not the background color has been set.- Returns:
- boolean. trueif the value has been set.
 
- 
hasNewForegroundpublic boolean hasNewForeground()Return whether or not the foreground color has been set.- Returns:
- boolean. trueif the value has been set.
- Since:
- 3.1
 
- 
hasNewFontpublic boolean hasNewFont()Return whether or not the font has been set.- Returns:
- boolean. trueif the value has been set.
- Since:
- 3.1
 
- 
getBackgroundGet the background Color.- Returns:
- Color or nullif no new value was set.
- Since:
- 3.1
 
- 
setBackgroundSet the background Color.- Parameters:
- background- Color. This value should not be- null.
- Since:
- 3.1
 
- 
getFontGet the font.- Returns:
- Font or nullif no new value was set.
- Since:
- 3.1
 
- 
setFontSet the font.- Parameters:
- font- Font This value should not be- null.
- Since:
- 3.1
 
- 
getForegroundGet the foreground Color.- Returns:
- Color or nullif no new value was set.
- Since:
- 3.1
 
- 
setForegroundSet the foreground Color.- Parameters:
- foreground- Color This value should not be- null.
- Since:
- 3.1
 
- 
getTooltipTextReturns the tooltipText.- Returns:
- Stringor- nullif the tool tip text was never set.
- Since:
- 3.3
 
- 
setTooltipTextSet the tool tip text.- Parameters:
- tooltipText- The tooltipText- Stringto set. This value should not be- null.
- Since:
- 3.3
 
- 
hasNewTooltipTextpublic boolean hasNewTooltipText()Return whether or not the tool tip text has been set.- Returns:
- boolean.- trueif the tool tip text has been set.
- Since:
- 3.3
 
- 
getTooltipBackgroundColorReturn the tool tip background color.- Returns:
- Coloror- nullif the tool tip background color has not been set.
- Since:
- 3.3
 
- 
setTooltipBackgroundColorSet the backgroundColorfor tool tip.- Parameters:
- tooltipBackgroundColor- The- Colorto set. This value should not be- null.
- Since:
- 3.3
 
- 
hasNewTooltipBackgroundColorpublic boolean hasNewTooltipBackgroundColor()Return whether or not the tool tip background color has been set.- Returns:
- boolean.- trueif the tool tip text has been set.
- Since:
- 3.3
 
- 
getTooltipForegroundColorReturn the foregroundColor.- Returns:
- Returns Colorornullif the tool tip foreground color has not been set.
- Since:
- 3.3
 
- 
setTooltipForegroundColorSet the foregroundColorfor tool tip.- Parameters:
- tooltipForegroundColor- The tooltipForegroundColor to set.
- Since:
- 3.3
 
- 
hasNewTooltipForegroundColorpublic boolean hasNewTooltipForegroundColor()Return whether or not the tool tip foreground color has been set.- Returns:
- boolean.- trueif the tool tip foreground has been set.
- Since:
- 3.3
 
- 
getTooltipShift- Returns:
- Returns the tooltipShift.
- Since:
- 3.3
 
- 
setTooltipShift- Parameters:
- tooltipShift- The tooltipShift to set.
- Since:
- 3.3
 
- 
hasTooltipShiftpublic boolean hasTooltipShift()- Returns:
- Return whether or not the tool tip shift has been set.
- Since:
- 3.3
 
 
-