org.eclipse.jface.viewers
Class StructuredViewer.ColorAndFontCollectorWithProviders

java.lang.Object
  extended by org.eclipse.jface.viewers.StructuredViewer.ColorAndFontCollectorWithProviders
Enclosing class:
StructuredViewer

protected class StructuredViewer.ColorAndFontCollectorWithProviders
extends java.lang.Object

The ColorAndFontCollector is a helper class for viewers that have color and font support ad optionally decorators.

See Also:
IColorDecorator, IFontDecorator, IColorProvider, IFontProvider, IDecoration

Constructor Summary
StructuredViewer.ColorAndFontCollectorWithProviders(IBaseLabelProvider provider)
          Create a new instance of the receiver using the supplied label provider.
 
Method Summary
 void applyFontsAndColors(TableItem control)
          Apply the fonts and colors to the control if required.
 void applyFontsAndColors(TreeItem control)
          Apply the fonts and colors to the control if required.
 void clear()
          Clear all of the results.
 void setBackground(Color background)
          Set the background color.
 void setFont(Font font)
          Set the font.
 void setFontsAndColors(java.lang.Object element)
          Set the initial fonts and colors for the element from the content providers.
 void setForeground(Color foreground)
          Set the foreground color.
 void setUsedDecorators()
          Set that decorators were applied.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StructuredViewer.ColorAndFontCollectorWithProviders

public StructuredViewer.ColorAndFontCollectorWithProviders(IBaseLabelProvider provider)
Create a new instance of the receiver using the supplied label provider. If it is an IColorProvider or IFontProvider set these values up.

Parameters:
provider - IBaseLabelProvider
See Also:
IColorProvider, IFontProvider
Method Detail

setFontsAndColors

public void setFontsAndColors(java.lang.Object element)
Set the initial fonts and colors for the element from the content providers.

Parameters:
element - Object

applyFontsAndColors

public void applyFontsAndColors(TableItem control)
Apply the fonts and colors to the control if required.

Parameters:
control -

applyFontsAndColors

public void applyFontsAndColors(TreeItem control)
Apply the fonts and colors to the control if required.


clear

public void clear()
Clear all of the results.


setUsedDecorators

public void setUsedDecorators()
Set that decorators were applied.


setBackground

public void setBackground(Color background)
Set the background color.

Parameters:
background -

setFont

public void setFont(Font font)
Set the font.

Parameters:
font -

setForeground

public void setForeground(Color foreground)
Set the foreground color.

Parameters:
foreground -