TMFileDrawPattern

Kind of class:public class
Package:treemap.demo
Inherits from:TMFileDraw
Version:2.5
Author:Christophe Bouthier [bouthier@loria.fr]
Package classpath:treemap.demo.TMFileDrawPattern
File last modified:Friday, 28 December 2001, 20:55:42
The TMFileDrawPattern implements a example of renderer for TMFileNode.
It use the date of last modification as color,
and patterns instead of color for filling rects.

The color legend is :

    PATTERN_WHITE for files less than a hour old
    PATTERN_DIAG1 for files less than a day old
    PATTERN_DIAG2 for files less than a week old
    PATTERN_DOTS for files less than a month old
    PATTERN_LIGHT_GRAY for files less than a year old
    PATTERN_DARK_GRAY for files more than a year old

Summary


Constructors
Instance methods

Constructors

TMFileDrawPattern

public TMFileDrawPattern(
)

Constructor.

Instance fields

node

private TMFileNode node = null

patternDay

private Paint patternDay = null

patternEons

private Paint patternEons = null

patternHour

private Paint patternHour = null

patternMonth

private Paint patternMonth = null

patternWeek

private Paint patternWeek = null

patternYear

private Paint patternYear = null

Instance methods

getFilling

public Paint getFilling(
TMNodeAdapter nodeAdapter) throws TMExceptionBadTMNodeKind, TMExceptionBadTMNodeKind

Returns the filling of the node.
The nodeAdapter should return an instance of TMFileNode.
Parameters:
nodeAdapter:
we compute the filling of this node;
should return an instance of TMFileNode
Returns:
  • the filling of the node
Throws: