Package org.pushingpixels.lafwidget.contrib.blogofbug.swing.components

# Interface RichComponent

All Known Implementing Classes:
  `ReflectedImageLabel`

public interface RichComponent
A component that can be part of the a rich user interface

## Method Summary

Modifier and Type
Method
Description
`String`
`getRichText()`
Gets the text to be displayed by the RichContainer for the component.
`void`
`prePaintImage()`
Allows a RichContainer to request that the component pre-renders anything that might provide peak performance.
`void`
`setAlpha(float alpha)`
Assisgns a uniform alpha to the component
`void`
`setRichImage(Image image)`
Assisgns an image to the component, the width and height taken from the supplied image
`void`
`setRichImage(File image)`
Assigns an image to the component, the width and height taken from the supplied image
`void`
`setRichImage(URL image)`
Assigns an image to the component, the width and height taken from the supplied image
`void`
`setRichText(String text)`
Specifies text that should be displayed by the rich component when getRichText() is called.

## Method Details

### setRichImage

void setRichImage(URL image)
Assigns an image to the component, the width and height taken from the supplied image

Parameters:
  `image` - The URL of the image

### setRichImage

void setRichImage(File image)
Assigns an image to the component, the width and height taken from the supplied image

Parameters:
  `image` - A file referencing the image

### setRichImage

void setRichImage(Image image)
Assisgns an image to the component, the width and height taken from the supplied image

Parameters:
  `image` - An image object containing the image

### prePaintImage

void prePaintImage()
Allows a RichContainer to request that the component pre-renders anything that might provide peak performance. It is expected that most implementations will do this automatically after the image has been specified

### setRichText

void setRichText(String text)
Specifies text that should be displayed by the rich component when getRichText() is called.

Parameters:
  `text` - The text to be displayed. This may be different to that of the component being enriched.

### getRichText

String getRichText()
Gets the text to be displayed by the RichContainer for the component. May be extracted from elsewhere

Returns:
  The text to be displayed

### setAlpha

void setAlpha(float alpha)
Assisgns a uniform alpha to the component

Parameters:
  `alpha` - A value from 0.0 to 1.0 where 1.0 is fully visible, and 0.0 is completely invisible.