Java Code Examples for com.alee.utils.ImageUtils#toBufferedImage()

The following examples show how to use com.alee.utils.ImageUtils#toBufferedImage() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WebFileChooser.java    From weblaf with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Sets custom dialog icons.
 *
 * @param customIcons new custom dialog icons
 */
public void setDialogIcons ( @NotNull final List<? extends Icon> customIcons )
{
    this.customIcons = new ArrayList<Image> ( customIcons.size () );
    for ( final Icon icon : customIcons )
    {
        final Image image = ImageUtils.toBufferedImage ( icon );
        this.customIcons.add ( image );
    }
    updateWindowIcons ();
}
 
Example 2
Source File: WebImage.java    From weblaf with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Constructs component with an image retrieved from the specified {@link Icon}.
 *
 * @param id   {@link StyleId}
 * @param icon {@link Icon} to display
 */
public WebImage ( @NotNull final StyleId id, @Nullable final Icon icon )
{
    this ( id, ImageUtils.toBufferedImage ( icon ) );
}
 
Example 3
Source File: WebImage.java    From weblaf with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Constructs component with a specified {@link Image}.
 *
 * @param id    {@link StyleId}
 * @param image {@link Image} to display
 */
public WebImage ( @NotNull final StyleId id, @Nullable final Image image )
{
    this ( id, ImageUtils.toBufferedImage ( image ) );
}
 
Example 4
Source File: WebImage.java    From weblaf with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Constructs component with a specified {@link RenderedImage}.
 *
 * @param id    {@link StyleId}
 * @param image {@link RenderedImage} to display
 */
public WebImage ( @NotNull final StyleId id, @Nullable final RenderedImage image )
{
    this ( id, ImageUtils.toBufferedImage ( image ) );
}