public final class ColorIcon extends EmptyIcon
EmptyIcon.EmptyIconUIResource| Modifier | Constructor and Description |
|---|---|
protected |
ColorIcon(ColorIcon icon) |
|
ColorIcon(int size,
int colorSize) |
| Modifier and Type | Method and Description |
|---|---|
ColorIcon |
copy()
Returns a copy of this icon.
|
java.awt.Color |
getColor() |
double |
getScale(DerivedScaleType type) |
double |
getScale(ScaleType type) |
T |
getScaleContext() |
void |
paintIcon(java.awt.Component component,
java.awt.Graphics g,
int left,
int top) |
void |
setColor(java.awt.Color color) |
boolean |
setScale(Scale scale)
Sets the new scale in the context
|
void |
showRedLine(boolean value) |
boolean |
updateScaleContext(UserScaleContext ctx)
Updates the current context with the state of the provided context.
|
asUIResource, create, create, create, equals, getIconHeight, getIconWidth, hashCode, withIconPreScaledscalegetScale, isIconPreScaled, scaleVal, scaleVal, scaleVal, setAutoUpdateScaleContext, setIconPreScaled, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitdeepCopypublic ColorIcon(int size,
int colorSize)
protected ColorIcon(ColorIcon icon)
public ColorIcon 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 EmptyIconpublic java.awt.Color getColor()
public void setColor(java.awt.Color color)
public void showRedLine(boolean value)
public void paintIcon(java.awt.Component component,
java.awt.Graphics g,
int left,
int top)
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