public class DefaultImageWrapper
extends java.lang.Object
DefaultImageWrapper
class is used by DefaultImageCellRenderer
as a container for image and its properties.Constructor and Description |
---|
DefaultImageWrapper(javax.swing.ImageIcon image,
java.lang.String pathToImage,
boolean fitCellRect,
boolean keepAspectRatio)
Constructs a
DefaultImageWrapper with the specified image, path to image, fitCellRect
and keepAspectRatio properties. |
Modifier and Type | Method and Description |
---|---|
javax.swing.ImageIcon |
getImage()
Returns image that holds by this wrapper.
|
java.lang.String |
getPathToImage()
Returns path to image that wrapper keeps.
|
boolean |
isFitCellRect()
Indicates whether the image should fit the cell.
|
boolean |
isKeepAspectRatio() |
public DefaultImageWrapper(javax.swing.ImageIcon image, java.lang.String pathToImage, boolean fitCellRect, boolean keepAspectRatio)
DefaultImageWrapper
with the specified image, path to image, fitCellRect
and keepAspectRatio properties.image
- pathToImage
- fitCellRect
- keepAspectRatio
- public javax.swing.ImageIcon getImage()
public boolean isKeepAspectRatio()
true
if image keep aspect ratio, false
otherwise.public boolean isFitCellRect()
true
if image fit the cell, false
otherwise.public java.lang.String getPathToImage()