ch.epfl.craft.maglib.magnet
Interface MagnetCellRenderer

All Known Implementing Classes:
DefaultMagnetCellRenderer

public interface MagnetCellRenderer

Defines the requirements for an object that displays a magnet node

Version:
1.0
Author:
Jerome Caffaro

Method Summary
 java.awt.Component getMagnetCellRendererComponent(MagnetView view, java.lang.Object value, boolean selected, boolean magnetic, boolean mouseIsOver, boolean mouseIsNear)
          Sets the value of the current magnet cell to value.
 

Method Detail

getMagnetCellRendererComponent

public java.awt.Component getMagnetCellRendererComponent(MagnetView view,
                                                         java.lang.Object value,
                                                         boolean selected,
                                                         boolean magnetic,
                                                         boolean mouseIsOver,
                                                         boolean mouseIsNear)
Sets the value of the current magnet cell to value. If selected is true, the cell will be drawn as if selected. view is the MagnetView the receiver is being configured for. mouseOvered and mouseIsNear allow to make some subtle differences in the way the component is rendered depending on the mouse cursor position in the view. Returns the Component that the renderer uses to draw the value.

Parameters:
view - the MagnetView instance for which the component is configured.
value - the object that we want to draw.
selected - true if value is selected, else false.
magnetic - true if the node attracts other nodes.
mouseIsOver - true if the mouse cursor is over the node
mouseIsNear - true if the mouse is near the component.
Returns:
the Component that the renderer uses to draw the value.


Copyright © CRAFT EPFL. All Rights Reserved.