|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jniwrapper.Parameter com.jniwrapper.Pointer.Void com.jniwrapper.win32.Handle com.jniwrapper.win32.gdi.GdiObject com.jniwrapper.win32.gdi.Icon
public class Icon
This class represents generic methods to work with icons.
Nested Class Summary | |
---|---|
static class |
Icon.IconType
IconType represents the enumeration of default icon types. |
static class |
Icon.SystemIcon
|
Nested classes/interfaces inherited from class com.jniwrapper.win32.gdi.GdiObject |
---|
GdiObject.ImageLoadParameters, GdiObject.ImageType, GdiObject.Type |
Field Summary |
---|
Fields inherited from class com.jniwrapper.win32.gdi.GdiObject |
---|
GDI_ERROR, HGDI_ERROR |
Fields inherited from class com.jniwrapper.win32.Handle |
---|
INFINITE_TIMEOUT, INVALID_HANDLE_VALUE, STATUS_ABANDONED_WAIT_0, STATUS_TIMEOUT, STATUS_WAIT_0 |
Fields inherited from class com.jniwrapper.Parameter |
---|
LICENSE_TYPE, V |
Constructor Summary | |
---|---|
Icon()
Creates a NULL icon. |
|
Icon(java.awt.Component c,
javax.swing.Icon icon)
Creates an icon from the standard Swing Icon. |
|
Icon(java.awt.Dimension size)
Creates a NULL icon with a specified size. |
|
Icon(java.io.File file)
Creates an icon from the specified file. |
|
Icon(java.io.File file,
java.awt.Dimension size)
Creates an icon from the specified file. |
|
Icon(Handle hInstance,
java.io.File file)
Creates an icon from the specified file. |
|
Icon(Handle hInstance,
java.lang.String iconName)
Creates an icon from the executable (.exe) file associated with an application instance. |
|
Icon(java.io.InputStream stream)
Creates an icon from the specified stream. |
|
Icon(java.io.InputStream stream,
java.awt.Dimension size)
Creates an icon from the specified stream. |
|
Icon(long value)
|
|
Icon(java.lang.String iconName)
Creates an icon from the executable (.exe) file associated with an application instance. |
Method Summary | |
---|---|
int |
getBitCount()
|
IconInfo |
getIconInfo()
Returns the icon information. |
java.awt.Dimension |
getSize()
Returns the size of the icon. |
void |
load(java.io.File file)
Loads the icon from the specified file. |
void |
load(java.io.File file,
java.awt.Dimension size)
Loads the icon from the specified file. |
void |
load(Handle hInstance,
java.io.File file,
java.awt.Dimension size)
Loads the icon from the specified file. |
void |
load(java.io.InputStream stream,
java.awt.Dimension size)
Loads the icon from the specified stream. |
void |
load(java.io.InputStream stream,
int iconIndex)
Loads the icon from the specified stream. |
static java.util.List |
loadFromStream(java.io.InputStream stream)
Loads the collection of all icons from the specified input stream. |
java.awt.image.BufferedImage |
toImage()
Converts this icon to Java BufferedImage . |
protected void |
update()
|
Methods inherited from class com.jniwrapper.win32.gdi.GdiObject |
---|
deleteObject, getObject, getObjectType |
Methods inherited from class com.jniwrapper.win32.Handle |
---|
clone, closeHandle, equals, waitFor, waitFor |
Methods inherited from class com.jniwrapper.Pointer.Void |
---|
asFunction, asFunction, asTypedPointer, castTo, castTo, getDebugInfo, getLength, getValue, hashCode, isNull, read, setValue, toString, write |
Methods inherited from class com.jniwrapper.Parameter |
---|
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Icon()
public Icon(long value)
public Icon(java.awt.Dimension size)
public Icon(java.lang.String iconName)
iconName
- Name of the icon resource to be loaded.public Icon(Handle hInstance, java.lang.String iconName)
hInstance
- Handle to an instance of the module whose executable
file contains the icon to be loaded. This parameter must be NULL when a
standard icon is being loaded.iconName
- Name of the icon resource to be loaded.public Icon(java.io.File file)
file
- Specifies the file to load the image from.public Icon(java.io.File file, java.awt.Dimension size)
file
- Specifies the file to load the image from.size
- Specifies the icon size.public Icon(Handle hInstance, java.io.File file)
hInstance
- Handle to an instance of the module that contains the
image to be loaded. To load an OEM image, set this parameter to zero.file
- Specifies the file to load the image from.public Icon(java.io.InputStream stream) throws java.io.IOException
stream
- Specifies the stream to load the icon from.
java.io.IOException
public Icon(java.io.InputStream stream, java.awt.Dimension size) throws java.io.IOException
stream
- Specifies the stream to load the icon from.size
- Specifies the size of the icon to find in the stream.
java.io.IOException
public Icon(java.awt.Component c, javax.swing.Icon icon)
c
- Specifies the component for a paintIcon method implementation.
If the implementation allows null component argument, this parameter may be null.icon
- Specifies the standard Swing Icon.Method Detail |
---|
protected void update()
public void load(java.io.File file)
file
- Specifies the file to load the image from.public void load(java.io.File file, java.awt.Dimension size)
file
- Specifies the file to load the image from.size
- Specifies the size of the icon to load.public void load(Handle hInstance, java.io.File file, java.awt.Dimension size)
hInstance
- Handle to an instance of the module that contains the
image to be loaded. To load an OEM image, set this parameter to zero.file
- Specifies the file to load the image from.size
- Specifies the size of the icon to load.public void load(java.io.InputStream stream, java.awt.Dimension size) throws java.io.IOException
stream
- Specifies the stream to load the icon from.size
- Specifies the size of the icon to find in the stream.
java.io.IOException
public void load(java.io.InputStream stream, int iconIndex) throws java.io.IOException
stream
- Specifies the stream to load the icon from.iconIndex
- Specifies the index of the icon in the stream.
java.io.IOException
public IconInfo getIconInfo()
public java.awt.Dimension getSize()
public int getBitCount()
public java.awt.image.BufferedImage toImage()
BufferedImage
.
public static java.util.List loadFromStream(java.io.InputStream stream) throws java.io.IOException
stream
- streams that contains icons
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |