public abstract static class IconLoader.LazyIcon extends ScaleContextSupport implements CopyableIcon, RetrievableIcon
#createLazy).| Constructor and Description |
|---|
LazyIcon() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract javax.swing.Icon |
compute() |
javax.swing.Icon |
copy()
Returns a copy of this icon.
|
int |
getIconHeight() |
int |
getIconWidth() |
double |
getScale(DerivedScaleType type) |
double |
getScale(ScaleType type) |
T |
getScaleContext() |
void |
load() |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y) |
javax.swing.Icon |
retrieveIcon()
Returns the wrapped icon.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdeepCopypublic void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
paintIcon in interface javax.swing.Iconpublic int getIconWidth()
getIconWidth in interface javax.swing.Iconpublic int getIconHeight()
getIconHeight in interface javax.swing.Iconpublic final void load()
protected abstract javax.swing.Icon compute()
public javax.swing.Icon retrieveIcon()
RetrievableIconretrieveIcon in interface RetrievableIconpublic javax.swing.Icon 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 CopyableIconpublic 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