javax.swing.Iconpublic class DecoratableIcon
extends java.lang.Object
implements javax.swing.Icon
| 构造器 | 说明 |
|---|---|
DecoratableIcon(int width,
javax.swing.Icon mainIcon) |
Constructor.
|
DecoratableIcon(javax.swing.Icon mainIcon) |
Constructor.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
addDecorationIcon(javax.swing.Icon decoration) |
Adds a decoration icon.
|
int |
getIconHeight() |
|
int |
getIconWidth() |
|
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y) |
|
void |
setDeprecated(boolean deprecated) |
Sets whether this icon is for a deprecated item.
|
void |
setMainIcon(javax.swing.Icon icon) |
Sets the main icon.
|
public DecoratableIcon(javax.swing.Icon mainIcon)
mainIcon - The "main" icon. This cannot be null.public DecoratableIcon(int width,
javax.swing.Icon mainIcon)
width - The width for this icon.mainIcon - The "main" icon. This cannot be null.public void addDecorationIcon(javax.swing.Icon decoration)
decoration - A new decoration icon. This cannot be
null.setMainIcon(Icon)public int getIconHeight()
getIconHeight 在接口中 javax.swing.Iconpublic int getIconWidth()
getIconWidth 在接口中 javax.swing.Iconpublic void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
paintIcon 在接口中 javax.swing.Iconpublic void setDeprecated(boolean deprecated)
deprecated - Whether this icon is for a deprecated item.public void setMainIcon(javax.swing.Icon icon)
icon - The "main" icon. This cannot be null.addDecorationIcon(Icon)Copyright © 2019. All rights reserved.