Package net.runelite.client.util
Class AsyncBufferedImage
- java.lang.Object
-
- java.awt.Image
-
- java.awt.image.BufferedImage
-
- net.runelite.client.util.AsyncBufferedImage
-
- All Implemented Interfaces:
RenderedImage
,WritableRenderedImage
,Transparency
public class AsyncBufferedImage extends BufferedImage
-
-
Field Summary
-
Fields inherited from class java.awt.image.BufferedImage
TYPE_3BYTE_BGR, TYPE_4BYTE_ABGR, TYPE_4BYTE_ABGR_PRE, TYPE_BYTE_BINARY, TYPE_BYTE_GRAY, TYPE_BYTE_INDEXED, TYPE_CUSTOM, TYPE_INT_ARGB, TYPE_INT_ARGB_PRE, TYPE_INT_BGR, TYPE_INT_RGB, TYPE_USHORT_555_RGB, TYPE_USHORT_565_RGB, TYPE_USHORT_GRAY
-
Fields inherited from class java.awt.Image
accelerationPriority, SCALE_AREA_AVERAGING, SCALE_DEFAULT, SCALE_FAST, SCALE_REPLICATE, SCALE_SMOOTH, UndefinedProperty
-
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
-
-
Constructor Summary
Constructors Constructor Description AsyncBufferedImage(ClientThread clientThread, int width, int height, int imageType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTo(JButton c)
Calls setIcon on c, ensuring it is repainted when this changesvoid
addTo(JLabel c)
Calls setIcon on c, ensuring it is repainted when this changesvoid
loaded()
Call when the image has been loadedvoid
onLoaded(Runnable r)
Register a function to be ran when the image has been loaded.-
Methods inherited from class java.awt.image.BufferedImage
addTileObserver, coerceData, copyData, createGraphics, getAlphaRaster, getColorModel, getData, getData, getGraphics, getHeight, getHeight, getMinTileX, getMinTileY, getMinX, getMinY, getNumXTiles, getNumYTiles, getProperty, getProperty, getPropertyNames, getRaster, getRGB, getRGB, getSampleModel, getSource, getSources, getSubimage, getTile, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getTransparency, getType, getWidth, getWidth, getWritableTile, getWritableTileIndices, hasTileWriters, isAlphaPremultiplied, isTileWritable, releaseWritableTile, removeTileObserver, setData, setRGB, setRGB, toString
-
Methods inherited from class java.awt.Image
flush, getAccelerationPriority, getCapabilities, getScaledInstance, setAccelerationPriority
-
-
-
-
Constructor Detail
-
AsyncBufferedImage
public AsyncBufferedImage(ClientThread clientThread, int width, int height, int imageType)
-
-
Method Detail
-
loaded
public void loaded()
Call when the image has been loaded
-
onLoaded
public void onLoaded(Runnable r)
Register a function to be ran when the image has been loaded. If the image is already loaded the function will be invoked later on the client thread.
-
addTo
public void addTo(JButton c)
Calls setIcon on c, ensuring it is repainted when this changes
-
addTo
public void addTo(JLabel c)
Calls setIcon on c, ensuring it is repainted when this changes
-
-