public class ColorsIcon extends ColorIcon
EmptyIcon.EmptyIconUIResource| Modifier | Constructor and Description |
|---|---|
protected |
ColorsIcon(ColorsIcon icon) |
|
ColorsIcon(int size,
java.awt.Color... colors) |
| Modifier and Type | Method and Description |
|---|---|
ColorsIcon |
copy()
Returns a copy of this icon.
|
boolean |
equals(java.lang.Object o) |
protected java.awt.Paint |
getPaint(java.awt.Color color) |
double |
getScale(DerivedScaleType type) |
double |
getScale(ScaleType type) |
T |
getScaleContext() |
int |
hashCode() |
void |
paintIcon(java.awt.Component component,
java.awt.Graphics g,
int x,
int y) |
boolean |
setScale(Scale scale)
Sets the new scale in the context
|
boolean |
updateScaleContext(UserScaleContext ctx)
Updates the current context with the state of the provided context.
|
getIconColorasUIResource, create, create, create, getIconHeight, getIconWidth, withIconPreScaledscalegetScale, isIconPreScaled, scaleVal, scaleVal, scaleVal, setAutoUpdateScaleContext, setIconPreScaled, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitdeepCopypublic ColorsIcon(int size,
java.awt.Color... colors)
protected ColorsIcon(ColorsIcon icon)
public ColorsIcon copy()
CopyableIconThe copy should be a new instance, it should preserve the original size and should paint equal to the original bitmap. The subtype of the new icon is up to an implementor. It may or may not be equal the original subtype.
copy in interface CopyableIconcopy in class ColorIconpublic void paintIcon(java.awt.Component component,
java.awt.Graphics g,
int x,
int y)
protected java.awt.Paint getPaint(java.awt.Color color)
public T getScaleContext()
getScaleContext in interface ScaleContextAwarepublic boolean updateScaleContext(UserScaleContext ctx)
ScaleContextAwarectx is null, then updates the current context via ScaleContext.update()
and returns the result.updateScaleContext in interface ScaleContextAwarectx - the new scale contextpublic double getScale(ScaleType type)
getScale in interface ScaleContextAwarepublic double getScale(DerivedScaleType type)
getScale in interface ScaleContextAwarepublic boolean setScale(Scale scale)
ScaleContextAwaresetScale in interface ScaleContextAware