com.mucommander.ui.main.tree
Class CachedDirectory

java.lang.Object
  extended by com.mucommander.file.AbstractFile
      extended by com.mucommander.file.impl.ProxyFile
          extended by com.mucommander.ui.main.tree.CachedDirectory
All Implemented Interfaces:
PermissionAccesses, PermissionTypes

public class CachedDirectory
extends ProxyFile

A class that holds cached children of a directory.

Author:
Mariusz Jakubowski

Field Summary
 
Fields inherited from class com.mucommander.file.impl.ProxyFile
file
 
Fields inherited from class com.mucommander.file.AbstractFile
DEFAULT_SEPARATOR, fileURL, IO_BUFFER_SIZE, MUST_HINT, MUST_NOT_HINT, SHOULD_HINT, SHOULD_NOT_HINT, windowsDriveRootPattern
 
Fields inherited from interface com.mucommander.file.PermissionTypes
EXECUTE_PERMISSION, READ_PERMISSION, WRITE_PERMISSION
 
Fields inherited from interface com.mucommander.file.PermissionAccesses
GROUP_ACCESS, OTHER_ACCESS, USER_ACCESS
 
Constructor Summary
CachedDirectory(AbstractFile directory, DirectoryCache cache)
          Creates a new instance.
 
Method Summary
 AbstractFile[] get()
          Gets cached children.
 javax.swing.Icon getCachedIcon()
          Gets a cached icon for this folder.
 boolean isCached()
          Checks if this directory is already cached.
 boolean isReadingChildren()
          Returns true if caching thread is running.
 void setCachedIcon(javax.swing.Icon cachedIcon)
          Sets a cached icon for this folder.
 
Methods inherited from class com.mucommander.file.impl.ProxyFile
canChangeDate, canGetGroup, canGetOwner, canRunProcess, changeDate, changePermission, changePermissions, copyStream, copyTo, delete, deleteRecursively, equals, exists, getAbsolutePath, getCanonicalFile, getCanonicalPath, getChangeablePermissions, getCopyToHint, getDate, getExtension, getFreeSpace, getGroup, getInputStream, getInputStream, getJavaNetURL, getMoveToHint, getName, getOutputStream, getOwner, getParent, getPermissions, getPermissionsString, getProxiedFile, getRandomAccessInputStream, getRandomAccessOutputStream, getRoot, getSeparator, getSize, getTotalSpace, getUnderlyingFileObject, getURL, hashCode, hasRandomAccessInputStream, hasRandomAccessOutputStream, importPermissions, importPermissions, isBrowsable, isDirectory, isHidden, isRoot, isSymlink, ls, ls, ls, mkdir, mkfile, moveTo, runProcess, setParent, toString
 
Methods inherited from class com.mucommander.file.AbstractFile
addTrailingSeparator, calculateChecksum, calculateChecksum, calculateChecksum, changePermissions, checkCopyPrerequisites, copyRecursively, deleteRecursively, getAbsolutePath, getAncestor, getAncestor, getCanonicalPath, getChild, getDirectChild, getExtension, getIcon, getIcon, getNameWithoutExtension, getParentArchive, getParentSilently, getTopAncestor, hasAncestor, hasAncestor, isParentOf, mkdir, mkdirs, mkfile, removeTrailingSeparator
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CachedDirectory

public CachedDirectory(AbstractFile directory,
                       DirectoryCache cache)
Creates a new instance.

Parameters:
directory - a directory to cache
Method Detail

isCached

public boolean isCached()
Checks if this directory is already cached. If it isn't cached then a new cache thread is started.

Returns:
true if directory is cached, false otherwise

isReadingChildren

public boolean isReadingChildren()
Returns true if caching thread is running.


get

public AbstractFile[] get()
Gets cached children.

Returns:
cached children.

getCachedIcon

public javax.swing.Icon getCachedIcon()
Gets a cached icon for this folder.

Returns:
a cached icon

setCachedIcon

public void setCachedIcon(javax.swing.Icon cachedIcon)
Sets a cached icon for this folder.

Parameters:
cachedIcon - a cached icon


This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard