ColorIcon
instead@Deprecated public static class ColorIconCache.ColorIcon extends EmptyIcon
EmptyIcon.EmptyIconUIResource
Modifier | Constructor and Description |
---|---|
protected |
ColorIcon(ColorIconCache.ColorIcon icon)
Deprecated.
|
|
ColorIcon(int size,
java.awt.Color color)
Deprecated.
|
|
ColorIcon(int size,
java.awt.Color[] colours)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
ColorIconCache.ColorIcon |
copy()
Deprecated.
Returns a copy of this icon.
|
java.awt.Color |
getColor()
Deprecated.
|
java.awt.Color[] |
getColours()
Deprecated.
|
double |
getScale(DerivedScaleType type) |
double |
getScale(ScaleType type) |
T |
getScaleContext() |
void |
paintIcon(java.awt.Component component,
java.awt.Graphics g,
int i,
int j)
Deprecated.
|
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.
|
asUIResource, create, create, create, equals, getIconHeight, getIconWidth, hashCode, withIconPreScaled
scale
getScale, isIconPreScaled, scaleVal, scaleVal, scaleVal, setAutoUpdateScaleContext, setIconPreScaled, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
deepCopy
public ColorIcon(int size, java.awt.Color color)
public ColorIcon(int size, java.awt.Color[] colours)
protected ColorIcon(ColorIconCache.ColorIcon icon)
public ColorIconCache.ColorIcon copy()
CopyableIcon
The 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 CopyableIcon
copy
in class EmptyIcon
public java.awt.Color getColor()
public java.awt.Color[] getColours()
public void paintIcon(java.awt.Component component, java.awt.Graphics g, int i, int j)
public T getScaleContext()
getScaleContext
in interface ScaleContextAware
public boolean updateScaleContext(UserScaleContext ctx)
ScaleContextAware
ctx
is null, then updates the current context via ScaleContext.update()
and returns the result.updateScaleContext
in interface ScaleContextAware
ctx
- the new scale contextpublic double getScale(ScaleType type)
getScale
in interface ScaleContextAware
public double getScale(DerivedScaleType type)
getScale
in interface ScaleContextAware
public boolean setScale(Scale scale)
ScaleContextAware
setScale
in interface ScaleContextAware