public class ComponentImage extends Image
A utility wrapper that allows a Component to be used as an Image so that it can be set as the icon for a Label or button.
| Modifier and Type | Class and Description |
|---|---|
class |
ComponentImage.EncodedWrapper |
| Constructor and Description |
|---|
ComponentImage(Component cmp,
int w,
int h) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
animate() |
Image |
applyMask(Object mask) |
void |
disablePulsingAnimation() |
protected void |
drawImage(Graphics g,
Object nativeGraphics,
int x,
int y) |
protected void |
drawImage(Graphics g,
Object nativeGraphics,
int x,
int y,
int w,
int h) |
void |
enablePulsingAnimation(double currStep,
double stepSize,
double minAlpha,
double maxAlpha) |
Image |
fill(int width,
int height) |
Component |
getComponent() |
int |
getHeight() |
int |
getWidth() |
boolean |
isAnimation() |
boolean |
isPulsingAnimationEnabled() |
boolean |
requiresDrawImage() |
void |
scale(int width,
int height) |
Image |
scaled(int width,
int height) |
void |
setAnimation(boolean anim) |
EncodedImage |
toEncodedImage() |
addActionListener, applyMask, applyMaskAutoScale, asyncLock, createImage, createImage, createImage, createImage, createImage, createImage, createImage, createIndexed, createMask, createSVG, dispose, exifRotation, exifRotation, exifRotation, fireChangedEvent, flipHorizontally, flipVertically, getExifOrientationTag, getExifOrientationTag, getGraphics, getImage, getImageName, getRGB, getRGB, getRGBCached, getSVGDocument, isAlphaMutableImageSupported, isJPEG, isLocked, isOpaque, isPNG, isSVG, isSVGSupported, lock, mirror, modifyAlpha, modifyAlpha, modifyAlphaWithTranslucency, removeActionListener, rotate, rotate180Degrees, rotate270Degrees, rotate90Degrees, scaledHeight, scaledLargerRatio, scaledSmallerRatio, scaledWidth, setImageName, subImage, toRGB, unlockpublic ComponentImage(Component cmp, int w, int h)
public Component getComponent()
public void enablePulsingAnimation(double currStep,
double stepSize,
double minAlpha,
double maxAlpha)
public void disablePulsingAnimation()
public boolean isPulsingAnimationEnabled()
public void setAnimation(boolean anim)
public boolean isAnimation()
isAnimation in class Imagepublic boolean requiresDrawImage()
requiresDrawImage in class Imagepublic EncodedImage toEncodedImage()
Copyright © 2021. All Rights Reserved.