Java Doc for IconExe.java in  » IDE-Eclipse » Eclipse-plug-in-development » org » eclipse » pde » internal » swt » tools » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » Eclipse plug in development » org.eclipse.pde.internal.swt.tools 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.pde.internal.swt.tools.IconExe

IconExe
public class IconExe (Code)
Customize the icon of a Windows exe WARNING! This class is not part of SWT API. It is NOT API. It is an internal tool that may be changed or removed at anytime. Based on MSDN "An In-Depth Look into the Win32 Portable Executable File Format"

Inner Class :public static class IconResInfo
Inner Class :public static class IMAGE_DOS_HEADER
Inner Class :public static class IMAGE_FILE_HEADER
Inner Class :public static class IMAGE_DATA_DIRECTORY
Inner Class :public static class IMAGE_OPTIONAL_HEADER
Inner Class :public static class IMAGE_NT_HEADERS
Inner Class :public static class IMAGE_SECTION_HEADER
Inner Class :public static class IMAGE_RESOURCE_DIRECTORY
Inner Class :public static class IMAGE_RESOURCE_DIRECTORY_ENTRY
Inner Class :public static class IMAGE_RESOURCE_DATA_ENTRY
Inner Class :public static class NEWHEADER
Inner Class :public static class ICONRESDIR
Inner Class :public static class CURSORDIR
Inner Class :public static class RESDIR
Inner Class :public static class BITMAPINFOHEADER
Inner Class :static class RGBQUAD
Inner Class :static class BITMAPINFO
Inner Class :static class RGB
Inner Class :static class PaletteData
Inner Class :static class ImageLoader
Inner Class :static class ImageData
Inner Class :static class LEDataInputStream extends InputStream
Inner Class :abstract public static class FileFormat
Inner Class :static class WinBMPFileFormat extends FileFormat
Inner Class :static class WinICOFileFormat extends FileFormat
Inner Class :static class SWT

Field Summary
final static  intBMPHeaderFixedSize
    
final static  booleanDEBUG
    
final static  intIMAGE_DIRECTORY_ENTRY_RESOURCE
    
final static  intIMAGE_DOS_SIGNATURE
    
final static  intIMAGE_NT_SIGNATURE
    
final static  intRES_ICON
    
final static  intRT_GROUP_ICON
    
final static  intRT_ICON
    
final public static  StringVERSION
    
 inticonCnt
    
 IconResInfo[]iconInfo
    


Method Summary
static  byte[]bitInvertData(byte[] data, int startIndex, int endIndex)
    
final static  byte[]convertPad(byte[] data, int width, int height, int depth, int pad, int newPad)
    
static  voidcopyFile(String src, String dst)
    
 voiddumpResourceDirectory(RandomAccessFile raf, int imageResourceDirectoryOffset, int resourceBase, int delta, int type, int level, boolean rt_icon_root)
    
static  voidflipScanLines(byte[] data, int stride, int height)
    
 IconResInfo[]getIcons(RandomAccessFile raf)
    
static  byte[]loadData(BITMAPINFOHEADER bih, RandomAccessFile raf)
    
static  byte[]loadData(BITMAPINFOHEADER bih, RandomAccessFile raf, int stride)
    
static  ImageData[]loadIcons(String program)
     Retrieve the Desktop icons provided in the Windows executable program. These icons are typically shown in various places of the Windows desktop. Note.
static  PaletteDataloadPalette(BITMAPINFOHEADER bih, RandomAccessFile raf)
    
public static  voidmain(String[] args)
     Replace the Desktop icons provided in the Windows executable program with matching icons provided by the user. Takes 2 arguments argument 0: the Windows executable e.g c:/eclipse/eclipse.exe argument 1: The .ico file to write to the given executable e.g.
static  PaletteDatapaletteFromBytes(byte[] bytes, int numColors)
    
static  byte[]paletteToBytes(PaletteData pal)
    
static  ImageDataparseIcon(RandomAccessFile raf, int offset, int size)
    
static  voidread(RandomAccessFile raf, BITMAPINFOHEADER bih)
    
static  voidread(RandomAccessFile raf, BITMAPINFO bi)
    
static  voidread(RandomAccessFile raf, IMAGE_DOS_HEADER idh)
    
static  voidread(RandomAccessFile raf, IMAGE_FILE_HEADER ifh)
    
static  voidread(RandomAccessFile raf, IMAGE_DATA_DIRECTORY idd)
    
static  voidread(RandomAccessFile raf, IMAGE_OPTIONAL_HEADER ioh)
    
static  voidread(RandomAccessFile raf, IMAGE_NT_HEADERS inh)
    
static  voidread(RandomAccessFile raf, IMAGE_SECTION_HEADER ish)
    
static  voidread(RandomAccessFile raf, IMAGE_RESOURCE_DIRECTORY ird)
    
static  voidread(RandomAccessFile raf, IMAGE_RESOURCE_DIRECTORY_ENTRY irde)
    
static  voidread(RandomAccessFile raf, IMAGE_RESOURCE_DATA_ENTRY irde)
    
static  voidread(RandomAccessFile raf, NEWHEADER nh)
    
static  voidread(RandomAccessFile raf, ICONRESDIR i)
    
static  voidread(RandomAccessFile raf, CURSORDIR c)
    
static  voidread(RandomAccessFile raf, RESDIR rs)
    
static  intread4(RandomAccessFile raf)
    
static  booleanreadIconGroup(RandomAccessFile raf, int offset, int size)
    
static  intreadU2(RandomAccessFile raf)
    
static  voidunloadIcon(RandomAccessFile raf, ImageData icon)
    
static  intunloadIcons(String program, ImageData[] icons)
     Replace the Desktop icons provided in the Windows executable program with icons provided by the user. Note 1.
static  voidunloadMaskData(RandomAccessFile raf, ImageData icon)
    
static  voidunloadShapeData(RandomAccessFile raf, ImageData icon)
    
static  voidwrite4(RandomAccessFile raf, int value)
    
static  voidwriteU2(RandomAccessFile raf, int value)
    

Field Detail
BMPHeaderFixedSize
final static int BMPHeaderFixedSize(Code)



DEBUG
final static boolean DEBUG(Code)



IMAGE_DIRECTORY_ENTRY_RESOURCE
final static int IMAGE_DIRECTORY_ENTRY_RESOURCE(Code)



IMAGE_DOS_SIGNATURE
final static int IMAGE_DOS_SIGNATURE(Code)



IMAGE_NT_SIGNATURE
final static int IMAGE_NT_SIGNATURE(Code)



RES_ICON
final static int RES_ICON(Code)



RT_GROUP_ICON
final static int RT_GROUP_ICON(Code)



RT_ICON
final static int RT_ICON(Code)



VERSION
final public static String VERSION(Code)



iconCnt
int iconCnt(Code)



iconInfo
IconResInfo[] iconInfo(Code)





Method Detail
bitInvertData
static byte[] bitInvertData(byte[] data, int startIndex, int endIndex)(Code)



convertPad
final static byte[] convertPad(byte[] data, int width, int height, int depth, int pad, int newPad)(Code)



copyFile
static void copyFile(String src, String dst) throws FileNotFoundException, IOException(Code)



dumpResourceDirectory
void dumpResourceDirectory(RandomAccessFile raf, int imageResourceDirectoryOffset, int resourceBase, int delta, int type, int level, boolean rt_icon_root) throws IOException(Code)



flipScanLines
static void flipScanLines(byte[] data, int stride, int height)(Code)



getIcons
IconResInfo[] getIcons(RandomAccessFile raf) throws IOException(Code)



loadData
static byte[] loadData(BITMAPINFOHEADER bih, RandomAccessFile raf) throws IOException(Code)



loadData
static byte[] loadData(BITMAPINFOHEADER bih, RandomAccessFile raf, int stride) throws IOException(Code)



loadIcons
static ImageData[] loadIcons(String program) throws FileNotFoundException, IOException(Code)
Retrieve the Desktop icons provided in the Windows executable program. These icons are typically shown in various places of the Windows desktop. Note. The Eclipse 3.1 launcher returns the following 6 images 1. 32x32, 4 bit (Windows 16 colors palette) 2. 16x16, 4 bit (Windows 16 colors palette) 3. 16x16, 8 bit (256 colors) 4. 32x32, 8 bit (256 colors) 5. 48x48, 4 bit (Windows 16 colors palette) 6. 48x48, 8 bit (256 colors)
Parameters:
  program - the Windows executable e.g c:/eclipse/eclipse.exe



loadPalette
static PaletteData loadPalette(BITMAPINFOHEADER bih, RandomAccessFile raf) throws IOException(Code)



main
public static void main(String[] args) throws Exception(Code)
Replace the Desktop icons provided in the Windows executable program with matching icons provided by the user. Takes 2 arguments argument 0: the Windows executable e.g c:/eclipse/eclipse.exe argument 1: The .ico file to write to the given executable e.g. c:/myApp.ico Note 1. Write access to the executable program is required. As a result, that program must not be currently running or edited elsewhere. Note 2. The Eclipse 3.1 launcher requires a .ico file with the following 6 images 1. 32x32, 4 bit (Windows 16 colors palette) 2. 16x16, 4 bit (Windows 16 colors palette) 3. 16x16, 8 bit (256 colors) 4. 32x32, 8 bit (256 colors) 5. 48x48, 4 bit (Windows 16 colors palette) 6. 48x48, 8 bit (256 colors) A user icon matching exactly the width/height/depth of an executable icon will be written to the executable and will replace that executable icon. If an executable icon does not match a user icon, it is silently left as is. Note 3. This function modifies the content of the executable program and may cause its corruption.



paletteFromBytes
static PaletteData paletteFromBytes(byte[] bytes, int numColors)(Code)



paletteToBytes
static byte[] paletteToBytes(PaletteData pal)(Code)



parseIcon
static ImageData parseIcon(RandomAccessFile raf, int offset, int size) throws IOException(Code)



read
static void read(RandomAccessFile raf, BITMAPINFOHEADER bih) throws IOException(Code)



read
static void read(RandomAccessFile raf, BITMAPINFO bi) throws IOException(Code)



read
static void read(RandomAccessFile raf, IMAGE_DOS_HEADER idh) throws IOException(Code)



read
static void read(RandomAccessFile raf, IMAGE_FILE_HEADER ifh) throws IOException(Code)



read
static void read(RandomAccessFile raf, IMAGE_DATA_DIRECTORY idd) throws IOException(Code)



read
static void read(RandomAccessFile raf, IMAGE_OPTIONAL_HEADER ioh) throws IOException(Code)



read
static void read(RandomAccessFile raf, IMAGE_NT_HEADERS inh) throws IOException(Code)



read
static void read(RandomAccessFile raf, IMAGE_SECTION_HEADER ish) throws IOException(Code)



read
static void read(RandomAccessFile raf, IMAGE_RESOURCE_DIRECTORY ird) throws IOException(Code)



read
static void read(RandomAccessFile raf, IMAGE_RESOURCE_DIRECTORY_ENTRY irde) throws IOException(Code)



read
static void read(RandomAccessFile raf, IMAGE_RESOURCE_DATA_ENTRY irde) throws IOException(Code)



read
static void read(RandomAccessFile raf, NEWHEADER nh) throws IOException(Code)



read
static void read(RandomAccessFile raf, ICONRESDIR i) throws IOException(Code)



read
static void read(RandomAccessFile raf, CURSORDIR c) throws IOException(Code)



read
static void read(RandomAccessFile raf, RESDIR rs) throws IOException(Code)



read4
static int read4(RandomAccessFile raf) throws IOException(Code)



readIconGroup
static boolean readIconGroup(RandomAccessFile raf, int offset, int size) throws IOException(Code)



readU2
static int readU2(RandomAccessFile raf) throws IOException(Code)



unloadIcon
static void unloadIcon(RandomAccessFile raf, ImageData icon) throws IOException(Code)



unloadIcons
static int unloadIcons(String program, ImageData[] icons) throws FileNotFoundException, IOException(Code)
Replace the Desktop icons provided in the Windows executable program with icons provided by the user. Note 1. Write access to the executable program is required. As a result, that program must not be currently running or edited elsewhere. Note 2. Use loadIcons to determine which set of icons (width, height, depth) is required to replace the icons in the executable program. A user icon matching exactly the width/height/depth of an executable icon will be written to the executable and will replace that executable icon. If an executable icon does not match a user icon, it is left as is. Verify the return value matches the number of icons to write. Finally, use loadIcons after this operation to verify the icons have changed as expected. Note 3. The Eclipse 3.1 launcher requires the following 6 images (in any order). 1. 32x32, 4 bit (Windows 16 colors palette) 2. 16x16, 4 bit (Windows 16 colors palette) 3. 16x16, 8 bit (256 colors) 4. 32x32, 8 bit (256 colors) 5. 48x48, 4 bit (Windows 16 colors palette) 6. 48x48, 8 bit (256 colors) Note 4. This function modifies the content of the executable program and may cause its corruption.
Parameters:
  program - the Windows executable e.g c:/eclipse/eclipse.exe
Parameters:
  icons - to write to the given executable the number of icons from the original program that were not successfully replaced (0 if success)



unloadMaskData
static void unloadMaskData(RandomAccessFile raf, ImageData icon)(Code)



unloadShapeData
static void unloadShapeData(RandomAccessFile raf, ImageData icon)(Code)



write4
static void write4(RandomAccessFile raf, int value) throws IOException(Code)



writeU2
static void writeU2(RandomAccessFile raf, int value) throws IOException(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.