|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jniwrapper.Parameter
com.jniwrapper.Pointer.Void
com.jniwrapper.win32.Handle
com.jniwrapper.win32.gdi.GdiObject
com.jniwrapper.win32.gdi.Icon
This class represents generic methods to work with Icon.
| Nested Class Summary | |
static class |
Icon.IconType
IconType represents enumeration of default icon types. |
static class |
Icon.SystemIcon
|
| Nested classes 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.Parameter |
LICENSE_TYPE, V |
| Constructor Summary | |
Icon()
Creates a NULL icon. |
|
Icon(java.awt.Component c,
javax.swing.Icon icon)
Create 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 | |
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. |
java.awt.image.BufferedImage |
toImage()
Converts this icon to Java BufferedImage. |
protected void |
updateSize()
|
| Methods inherited from class com.jniwrapper.win32.gdi.GdiObject |
deleteObject, getObject, getObjectType |
| Methods inherited from class com.jniwrapper.win32.Handle |
clone, closeHandle |
| Methods inherited from class com.jniwrapper.Pointer.Void |
asFunction, asFunction, asTypedPointer, castTo, equals, getDebugInfo, getLength, getValue, hashCode, isNull, read, setValue, toString, write |
| Methods inherited from class com.jniwrapper.Parameter |
acceptIOPerformer, asReturnValue, dataBufferAssigned, getAlignedLength, getAlignmentRequirement, getDataBuffer, getDataBufferOffset, indent, pop, push, read, setDataBuffer, toByteArray, write |
| 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.
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.
public Icon(java.awt.Component c,
javax.swing.Icon icon)
c - Specifies the component for paintIcon method implementation.
If the implementation allows null component argument this parameter may be null.icon - Specifies standard swing Icon.| Method Detail |
protected void updateSize()
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.IOExceptionpublic IconInfo getIconInfo()
public java.awt.Dimension getSize()
public java.awt.image.BufferedImage toImage()
BufferedImage.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||