public class ComponentIcon extends Object implements Icon
Component
in Icon form. Use this in
conjunction with ScaledIcon
to provide component thumbnails.
NOTE: Component.paintAll(java.awt.Graphics)
requires that Component.isShowing()
return true before it will paint anything.
Constructor and Description |
---|
ComponentIcon(JComponent c)
Iconify the given component, excluding its border.
|
ComponentIcon(JComponent c,
boolean includeBorder)
Iconify the given component, indicating whether to include its border.
|
Modifier and Type | Method and Description |
---|---|
int |
getIconHeight() |
int |
getIconWidth() |
void |
paintIcon(Component c,
Graphics graphics,
int x,
int y) |
public ComponentIcon(JComponent c)
public ComponentIcon(JComponent c, boolean includeBorder)
public int getIconHeight()
getIconHeight
in interface Icon
public int getIconWidth()
getIconWidth
in interface Icon
Copyright © 2023. All rights reserved.