public abstract class LazyImageIcon extends ScaleContextSupport implements CopyableIcon, ScalableIcon, DarkIconProvider, MenuBarIconProvider
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Object |
myLock |
protected java.lang.Object |
myRealIcon |
| Modifier | Constructor and Description |
|---|---|
protected |
LazyImageIcon() |
| Modifier and Type | Method and Description |
|---|---|
javax.swing.ImageIcon |
doGetRealIcon() |
int |
getIconHeight() |
int |
getIconWidth() |
javax.swing.ImageIcon |
getRealIcon() |
protected abstract javax.swing.ImageIcon |
getRealIcon(ScaleContext ctx) |
float |
getScale() |
double |
getScale(DerivedScaleType type) |
double |
getScale(ScaleType type) |
T |
getScaleContext() |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y) |
boolean |
setScale(Scale scale)
Sets the new scale in the context
|
protected static javax.swing.ImageIcon |
unwrapIcon(java.lang.Object realIcon) |
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, waitcopy, deepCopyscalegetDarkIcongetMenuBarIconprotected final java.lang.Object myLock
protected volatile java.lang.Object myRealIcon
protected static javax.swing.ImageIcon unwrapIcon(java.lang.Object realIcon)
public final javax.swing.ImageIcon doGetRealIcon()
public final 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 float getScale()
getScale in interface ScalableIconpublic final javax.swing.ImageIcon getRealIcon()
protected abstract javax.swing.ImageIcon getRealIcon(ScaleContext ctx)
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