Search this API

y.view
Interface NodeCellRenderer


public interface NodeCellRenderer

Callback interface designed to feel like Swing's TableCellRenderer, TreeCellRenderer and ListCellRenderer. This interface is used as a callback by NodeCellRendererPainter e.g.


Method Summary
 JComponent getNodeCellRendererComponent(Graph2DView view, NodeRealizer nodeRealizer, Object userObject, boolean selected)
          Return a readily configured component that should be used to render the nodes contents.
 

Method Detail

getNodeCellRendererComponent

JComponent getNodeCellRendererComponent(Graph2DView view,
                                        NodeRealizer nodeRealizer,
                                        Object userObject,
                                        boolean selected)
Return a readily configured component that should be used to render the nodes contents.

Parameters:
view - the view that will be used to display the contents
nodeRealizer - the node's realizer that is to be displayed
userObject - the user object to display
selected - whether the component should indicate a selected state
Returns:
a JComponent that can be used to render the node

© Copyright 2000-2013,
yWorks GmbH.
All rights reserved.