|
TreeMap Java Library | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TMComputeDraw
The TMDrawManager interface should be implemented by every class that implements algorithms for drawing TMNode.
The methods to implements are :
As the filling and tooltip of a node could depends of its size, methods get a TMNodeAdapter reference and not directly a TMNode. To get the TMNode, call nodeAdapter.getNode(). To get the size of the TMNode, call nodeAdapter.getSize(). To pass information from filling to tooltip, use setUserData() and getUserData() methods.
As computing the drawing of a node is dependant of the kind of
TMNode, a TMComputeDraw should test the kind of TMNode returned by
nodeAdapter.getNode(), and throw an TMExceptionBadTMNodeKind
if there is incompatibility.
The isCompatibleWith method should test the kind of TMNode
passed in parameter and return true
if this TMComputeDraw
is compatible with it.
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. |
Method Detail |
---|
boolean isCompatibleWith(TMNode node)
node
- the TMNode to test the compatibility with
true
if this kind of node is compatible;
false
otherwisejava.awt.Paint getFilling(TMNodeAdapter nodeAdapter) throws TMExceptionBadTMNodeKind
nodeAdapter
- the node which we will draw
TMExceptionBadTMNodeKind
- If the kind of TMNode returned is
incompatible with this TMComputeDraw.java.lang.String getTooltip(TMNodeAdapter nodeAdapter) throws TMExceptionBadTMNodeKind
nodeAdapter
- the node for which we want the tooltip
TMExceptionBadTMNodeKind
- If the kind of TMNode returned is
incompatible with this TMComputeDraw.java.lang.String getTitle(TMNodeAdapter nodeAdapter) throws TMExceptionBadTMNodeKind
nodeAdapter
- the node for which we want the title
TMExceptionBadTMNodeKind
- if the kind of TMNode returned is
incompatible with this TMComputeDraw.java.awt.Paint getTitleColor(TMNodeAdapter nodeAdapter) throws TMExceptionBadTMNodeKind
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 |