TMFileDraw
| Kind of class: | public class |
|---|---|
| Package: | treemap.demo |
| Inherits from: | none |
| Implements: | |
| Known subclasses: | |
| Version: | 2.5 |
| Author: | Christophe Bouthier [bouthier@loria.fr] |
| Package classpath: | treemap.demo.TMFileDraw |
| File last modified: | Friday, 28 December 2001, 20:52:44 |
The TMFileDraw class implements an example of a TMComputeDraw
for a TMFileNode.
It use the date of last modification as color,
and the name of the file as tooltip.
for a TMFileNode.
It use the date of last modification as color,
and the name of the file as tooltip.
The color legend is :
Summary
Instance methods
- isCompatibleWith
- Test if this TMComputeDraw could be used
- getFilling
- Returns the filling of the node.
- getTooltip
- Returns the tooltip of the node.
- getTitleColor
- Returns the color of the title of the node.
- getTitle
- Returns the title of the node.
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.
The nodeAdapter should return an instance of TMFileNode.
Parameters:
nodeAdapter:
we compute the filling of this node;
should return an instance of TMFileNode
should return an instance of TMFileNode
Returns:
- the filling of the node
Throws:
- TMExceptionBadTMNodeKind If the node does not return an
instance of TMFileNode
Specified by:
getTitle
public String getTitle(
TMNodeAdapter nodeAdapter) throws TMExceptionBadTMNodeKind, TMExceptionBadTMNodeKind
Returns the title of the node.
Parameters:
nodeAdapter:
the node for which we want the title
Returns:
- the title of the node
Throws:
- TMExceptionBadTMNodeKind if the kind of TMNode returned is#
incompatible with this TMComputeDraw.
Specified by:
getTitleColor
public Paint getTitleColor(
TMNodeAdapter nodeAdapter) throws TMExceptionBadTMNodeKind, TMExceptionBadTMNodeKind
Returns the color of the title of the node.
Parameters:
nodeAdapter:
the node for which we want the title
Returns:
- the title of the node
Throws:
- TMExceptionBadTMNodeKind if the kind of TMNode returned is#
incompatible with this TMComputeDraw.
Specified by:
getTooltip
public String getTooltip(
TMNodeAdapter nodeAdapter) throws TMExceptionBadTMNodeKind, TMExceptionBadTMNodeKind
Returns the tooltip of the node.
The nodeAdapter should return an instance of TMFileNode.
The nodeAdapter should return an instance of TMFileNode.
Parameters:
nodeAdapter:
we compute the tooltip of this node;
should return an instance of TMFileNode
should return an instance of TMFileNode
Returns:
- the tooltip of the node
Throws:
- TMExceptionBadTMNodeKind If the node does not return an
instance of TMFileNode
Specified by:
isCompatibleWith
Test if this TMComputeDraw could be used
with the kind of TMNode passed in parameter.
with the kind of TMNode passed in parameter.
Parameters:
node:
the TMNode to test the compatibility with
Returns:
-
trueif this kind of node is compatible;
falseotherwise
Specified by: