TMFileSize

Kind of class:public class
Package:treemap.demo
Inherits from:none
Implements:
Version:2.5
Author:Christophe Bouthier [bouthier@loria.fr]
Package classpath:treemap.demo.TMFileSize
File last modified:Friday, 28 December 2001, 20:59:14
The TMFileSize class implements an example of a TMComputeSize
for a TMFileNode.

Summary


Instance methods

Instance methods

getSize

public float getSize(
TMNode node) throws TMExceptionBadTMNodeKind, TMExceptionBadTMNodeKind

Returns the size of the node.
The node should be an instance of TMFileNode.
Returns 0 for a folder, and the size
of the file, in byte, for a file.
Parameters:
node:
we compute the size of this node;
should be an instance of TMFileNode
Returns:
  • the size of the node;
    0 for a folder;
    the size of the file in byte for a file
Throws:
Specified by:

isCompatibleWith

public boolean isCompatibleWith(
TMNode node)

Test if this TMComputeSize could be used
with the kind of TMNode passed in parameter.
Parameters:
node:
the TMNode to test the compatibility with
Returns:
  • true if this kind of node is compatible;
    false otherwise