|
TreeMap Java Library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttreemap.demo.TMFileDraw
public class TMFileDraw
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.
The color legend is :
Constructor Summary | |
---|---|
TMFileDraw()
|
Method Summary | |
---|---|
java.awt.Paint |
getFilling(TMNodeAdapter nodeAdapter)
Returns the filling of the node. |
java.lang.String |
getTitle(TMNodeAdapter nodeAdapter)
Returns the title of the node. |
java.awt.Paint |
getTitleColor(TMNodeAdapter nodeAdapter)
Returns the color of the title of the node. |
java.lang.String |
getTooltip(TMNodeAdapter nodeAdapter)
Returns the tooltip of the node. |
boolean |
isCompatibleWith(TMNode node)
Test if this TMComputeDraw could be used with the kind of TMNode passed in parameter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TMFileDraw()
Method Detail |
---|
public boolean isCompatibleWith(TMNode node)
isCompatibleWith
in interface TMComputeDraw
node
- the TMNode to test the compatibility with
true
if this kind of node is compatible;
false
otherwisepublic java.awt.Paint getFilling(TMNodeAdapter nodeAdapter) throws TMExceptionBadTMNodeKind
getFilling
in interface TMComputeDraw
nodeAdapter
- we compute the filling of this node;
should return an instance of TMFileNode
TMExceptionBadTMNodeKind
- If the node does not return an
instance of TMFileNodepublic java.lang.String getTooltip(TMNodeAdapter nodeAdapter) throws TMExceptionBadTMNodeKind
getTooltip
in interface TMComputeDraw
nodeAdapter
- we compute the tooltip of this node;
should return an instance of TMFileNode
TMExceptionBadTMNodeKind
- If the node does not return an
instance of TMFileNodepublic java.awt.Paint getTitleColor(TMNodeAdapter nodeAdapter) throws TMExceptionBadTMNodeKind
getTitleColor
in interface TMComputeDraw
nodeAdapter
- the node for which we want the title
TMExceptionBadTMNodeKind
- if the kind of TMNode returned is
incompatible with this TMComputeDraw.public java.lang.String getTitle(TMNodeAdapter nodeAdapter) throws TMExceptionBadTMNodeKind
getTitle
in interface TMComputeDraw
nodeAdapter
- the node for which we want the title
TMExceptionBadTMNodeKind
- if the kind of TMNode returned is
incompatible with this TMComputeDraw.
|
TreeMap Java Library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |