Package org.boris.pecoff4j.resources

Examples of org.boris.pecoff4j.resources.IconDirectory


        return ge;
    }

    public static IconDirectory readIconDirectory(IDataReader dr)
            throws IOException {
        IconDirectory gi = new IconDirectory();
        gi.setReserved(dr.readWord());
        gi.setType(dr.readWord());
        int count = dr.readWord();
        for (int i = 0; i < count; i++) {
            gi.add(readIconDirectoryEntry(dr));
        }

        return gi;
    }
View Full Code Here


                ResourceType.GROUP_ICON);
        for (int i = 0; i < entries.length; i++) {
            GroupIconDirectory gid = GroupIconDirectory.read(entries[i]
                    .getData());
            IconFile icf = new IconFile();
            IconDirectory icd = new IconDirectory();
            icd.setType(1);
            icd.setReserved(0);
            icf.setDirectory(icd);
            IconImage[] images = new IconImage[gid.getCount()];
            icf.setImages(images);

            for (int j = 0; j < gid.getCount(); j++) {
                GroupIconDirectoryEntry gide = gid.getEntry(j);
                IconDirectoryEntry ide = new IconDirectoryEntry();
                ide.copyFrom(gide);
                icd.add(ide);
                ResourceEntry[] icos = ResourceHelper.findResources(rd,
                        ResourceType.ICON, gide.getId());
                if (icos == null || icos.length != 1) {
                    throw new IOException("Unexpected icons in resource file");
                }
View Full Code Here

TOP

Related Classes of org.boris.pecoff4j.resources.IconDirectory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.