com.jniwrapper.win32.shell
Class ShellIcon

java.lang.Object
  extended bycom.jniwrapper.Parameter
      extended bycom.jniwrapper.Pointer.Void
          extended bycom.jniwrapper.win32.Handle
              extended bycom.jniwrapper.win32.gdi.GdiObject
                  extended bycom.jniwrapper.win32.gdi.Icon
                      extended bycom.jniwrapper.win32.shell.ShellIcon
All Implemented Interfaces:
com.jniwrapper.IntegerParameter, com.jniwrapper.PointerParameter

public class ShellIcon
extends Icon

This class provides functionality for extracting icons for file associations.


Nested Class Summary
 
Nested classes inherited from class com.jniwrapper.win32.gdi.Icon
Icon.IconType, 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.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
ShellIcon(java.io.File iconPath)
          Extracts an associated icon found in a file or an icon found in an associated executable file.
ShellIcon(java.io.File file, int iconIndex)
          Retrieves an icon from the specified executable file.
ShellIcon(java.io.File file, int iconIndex, Icon.IconType iconType)
           
ShellIcon(java.lang.String iconPath)
          Extracts a small associated icon.
 
Method Summary
 int getIndex()
          Returns the index of the extracted icon.
 
Methods inherited from class com.jniwrapper.win32.gdi.Icon
getBitCount, getIconInfo, getSize, load, load, load, load, load, loadFromStream, toImage, 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, getDebugInfo, getLength, getValue, hashCode, isNull, read, setValue, toString, write
 
Methods inherited from class com.jniwrapper.Parameter
, a, a, acceptIOPerformer, asReturnValue, b, dataBufferAssigned, getAlignedLength, getAlignmentRequirement, getDataBuffer, getDataBufferOffset, indent, pop, push, read, read, setDataBuffer, toByteArray, write
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShellIcon

public ShellIcon(java.io.File file,
                 int iconIndex)
Retrieves an icon from the specified executable file.

Parameters:
file - is a file name to extract the icon from.
iconIndex - a zero-based index of the icon to retrieve.

ShellIcon

public ShellIcon(java.io.File file,
                 int iconIndex,
                 Icon.IconType iconType)

ShellIcon

public ShellIcon(java.io.File iconPath)
Extracts an associated icon found in a file or an icon found in an associated executable file.

Parameters:
iconPath - a full path that contains the icon.

ShellIcon

public ShellIcon(java.lang.String iconPath)
Extracts a small associated icon.

Parameters:
iconPath - a full path that contains the icon.
Method Detail

getIndex

public int getIndex()
Returns the index of the extracted icon.

Returns:
the index of the extracted icon.