Home » openjdk-7 » sun » awt » shell » [javadoc | source]
final class: Win32ShellFolder2 [javadoc | source]

All Implemented Interfaces:
    Comparable, Serializable

Win32 Shell Folders

There are two fundamental types of shell folders : file system folders and non-file system folders. File system folders are relatively easy to deal with. Non-file system folders are items such as My Computer, Network Neighborhood, and the desktop. Some of these non-file system folders have special values and properties.

Win32 keeps two basic data structures for shell folders. The first of these is called an ITEMIDLIST. Usually a pointer, called an LPITEMIDLIST, or more frequently just "PIDL". This structure holds a series of identifiers and can be either relative to the desktop (an absolute PIDL), or relative to the shell folder that contains them. Some Win32 functions can take absolute or relative PIDL values, and others can only accept relative values.
The second data structure is an IShellFolder COM interface. Using this interface, one can enumerate the relative PIDLs in a shell folder, get attributes, etc.
All Win32ShellFolder2 objects which are folder types (even non-file system folders) contain an IShellFolder object. Files are named in directories via relative PIDLs.

Nested Class Summary:
public enum class  Win32ShellFolder2.SystemIcon   
static class  Win32ShellFolder2.FolderDisposer   
Field Summary
public static final  int DESKTOP     
public static final  int INTERNET     
public static final  int PROGRAMS     
public static final  int CONTROLS     
public static final  int PRINTERS     
public static final  int PERSONAL     
public static final  int FAVORITES     
public static final  int STARTUP     
public static final  int RECENT     
public static final  int SENDTO     
public static final  int BITBUCKET     
public static final  int STARTMENU     
public static final  int DESKTOPDIRECTORY     
public static final  int DRIVES     
public static final  int NETWORK     
public static final  int NETHOOD     
public static final  int FONTS     
public static final  int TEMPLATES     
public static final  int COMMON_STARTMENU     
public static final  int COMMON_PROGRAMS     
public static final  int COMMON_STARTUP     
public static final  int COMMON_DESKTOPDIRECTORY     
public static final  int APPDATA     
public static final  int PRINTHOOD     
public static final  int ALTSTARTUP     
public static final  int COMMON_ALTSTARTUP     
public static final  int COMMON_FAVORITES     
public static final  int INTERNET_CACHE     
public static final  int COOKIES     
public static final  int HISTORY     
public static final  int ATTRIB_CANCOPY     
public static final  int ATTRIB_CANMOVE     
public static final  int ATTRIB_CANLINK     
public static final  int ATTRIB_CANRENAME     
public static final  int ATTRIB_CANDELETE     
public static final  int ATTRIB_HASPROPSHEET     
public static final  int ATTRIB_DROPTARGET     
public static final  int ATTRIB_LINK     
public static final  int ATTRIB_SHARE     
public static final  int ATTRIB_READONLY     
public static final  int ATTRIB_GHOSTED     
public static final  int ATTRIB_HIDDEN     
public static final  int ATTRIB_FILESYSANCESTOR     
public static final  int ATTRIB_FOLDER     
public static final  int ATTRIB_FILESYSTEM     
public static final  int ATTRIB_HASSUBFOLDER     
public static final  int ATTRIB_VALIDATE     
public static final  int ATTRIB_REMOVABLE     
public static final  int ATTRIB_COMPRESSED     
public static final  int ATTRIB_BROWSABLE     
public static final  int ATTRIB_NONENUMERATED     
public static final  int ATTRIB_NEWCONTENT     
public static final  int SHGDN_NORMAL     
public static final  int SHGDN_INFOLDER     
public static final  int SHGDN_INCLUDE_NONFILESYS     
public static final  int SHGDN_FORADDRESSBAR     
public static final  int SHGDN_FORPARSING     
 FolderDisposer disposer     
Fields inherited from sun.awt.shell.ShellFolder:
Fields inherited from java.io.File:
separatorChar,  separator,  pathSeparatorChar,  pathSeparator,  $assertionsDisabled
 Win32ShellFolder2(int csidl) throws IOException, InterruptedException 
    Create a system special shell folder, such as the desktop or Network Neighborhood.
 Win32ShellFolder2(Win32ShellFolder2 parent,
    long relativePIDL) throws InterruptedException 
    Creates a shell folder with a parent and relative PIDL
 Win32ShellFolder2(Win32ShellFolder2 parent,
    long pIShellFolder,
    long relativePIDL,
    String path) 
    Create a system shell folder
Method from sun.awt.shell.Win32ShellFolder2 Summary:
compareTo,   copyFirstPIDLEntry,   dispose,   equals,   getCanonicalFile,   getChildByPath,   getDesktop,   getDesktopIShellFolder,   getDisplayName,   getExecutableType,   getFileSystemPath,   getFolderColumnValue,   getFolderColumns,   getFolderType,   getIcon,   getLinkLocation,   getNextPIDLEntry,   getParentFile,   getParentIShellFolder,   getRelativePIDL,   getShell32Icon,   getStandardViewButton0,   getSystemIcon,   hasAttribute,   isDirectory,   isFileSystem,   isHidden,   isLink,   isSpecial,   listFiles,   parseDisplayName,   releasePIDL,   setIsPersonal,   sortChildren,   writeReplace
Methods from sun.awt.shell.ShellFolder:
canRead,   canWrite,   compareTo,   createNewFile,   delete,   deleteOnExit,   exists,   get,   getAbsoluteFile,   getDisplayName,   getExecutableType,   getFolderColumnValue,   getFolderColumnValue,   getFolderColumns,   getFolderColumns,   getFolderType,   getIcon,   getLinkLocation,   getNormalizedFile,   getParent,   getParentFile,   getShellFolder,   invoke,   invoke,   isAbsolute,   isComputerNode,   isDirectory,   isFile,   isFileSystem,   isFileSystemRoot,   isLink,   lastModified,   length,   listFiles,   listFiles,   mkdir,   mkdirs,   renameTo,   setLastModified,   setReadOnly,   sort,   sortChildren,   toString,   writeReplace
Methods from java.io.File:
access$000,   canExecute,   canRead,   canWrite,   compareTo,   compareTo,   createNewFile,   createTempFile,   createTempFile,   delete,   deleteOnExit,   equals,   exists,   getAbsoluteFile,   getAbsolutePath,   getCanonicalFile,   getCanonicalPath,   getFreeSpace,   getName,   getParent,   getParentFile,   getPath,   getPrefixLength,   getTotalSpace,   getUsableSpace,   hashCode,   isAbsolute,   isDirectory,   isFile,   isHidden,   lastModified,   length,   list,   list,   listFiles,   listFiles,   listFiles,   listRoots,   mkdir,   mkdirs,   renameTo,   setExecutable,   setExecutable,   setLastModified,   setReadOnly,   setReadable,   setReadable,   setWritable,   setWritable,   toString,   toURI,   toURL
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from sun.awt.shell.Win32ShellFolder2 Detail:
 public int compareTo(File file2) 
    Compares this object with the specified object for order.
 static native long copyFirstPIDLEntry(long pIDL)
 protected  void dispose() 
    Finalizer to clean up any COM objects or PIDLs used by this object.
 public boolean equals(Object o) 
    Check to see if two ShellFolder objects are the same
 public File getCanonicalFile() throws IOException 
    Returns the canonical form of this abstract pathname. Equivalent to new Win32ShellFolder2(getParentFile(), this.java.io.File#getCanonicalPath ()).
 Win32ShellFolder2 getChildByPath(String filePath) throws InterruptedException 
    Look for (possibly special) child folder by it's path
 public Win32ShellFolder2 getDesktop() 
    Helper function to return the desktop
 public long getDesktopIShellFolder() 
    Helper function to return the desktop IShellFolder interface
 public String getDisplayName() 
 public String getExecutableType() 
 static String getFileSystemPath(int csidl) throws IOException, InterruptedException 
 public Object getFolderColumnValue(int column) 
 public ShellFolderColumnInfo[] getFolderColumns() 
 public String getFolderType() 
 public Image getIcon(boolean getLargeIcon) 
 public ShellFolder getLinkLocation() 
 static native long getNextPIDLEntry(long pIDL)
 public File getParentFile() 
 public long getParentIShellFolder() 
    Get the parent ShellFolder's IShellFolder interface
 public long getRelativePIDL() 
    Accessor for relative PIDL
 static Image getShell32Icon(int iconID,
    boolean getLargeIcon) 
    Gets an icon from the Windows system icon list as an Image
 static native int[] getStandardViewButton0(int iconIndex)
 static Image getSystemIcon(SystemIcon iconType) 
    Gets an icon from the Windows system icon list as an Image
 public boolean hasAttribute(int attribute) 
    Return whether the given attribute flag is set for this object
 public boolean isDirectory() 
 public boolean isFileSystem() 
 public boolean isHidden() 
 public boolean isLink() 
 public boolean isSpecial() 
 public File[] listFiles(boolean includeHiddenFiles) 
 long parseDisplayName(String name) throws IOException, InterruptedException 
 static native  void releasePIDL(long pIDL)
 public  void setIsPersonal() 
    Marks this folder as being the My Documents (Personal) folder
 public  void sortChildren(List<File> files) 
 protected Object writeReplace() throws ObjectStreamException 
    This method is implemented to make sure that no instances of ShellFolder are ever serialized. If isFileSystem() returns true, then the object is representable with an instance of java.io.File instead. If not, then the object depends on native PIDL state and should not be serialized.