TMFileSizeDate

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.TMFileSizeDate
File last modified:Friday, 28 December 2001, 21:00:18
The TMFileSizeDate class implements an example of a TMComputeSize
for a TMFileNode.
It use the date of the file as a size.

Summary


Constructors
Instance fields
Instance methods

Constructors

TMFileSizeDate

public TMFileSizeDate(
)

Constructor.

Instance fields

myDate

private long myDate = 0L

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 date
of the file, 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 date of the file 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