01: /*
02: * @(#)CellViewRenderer.java 1.0 03-JUL-04
03: *
04: * Copyright (c) 2001-2004 Gaudenz Alder
05: *
06: */
07: package org.jgraph.graph;
08:
09: import java.awt.Component;
10:
11: import org.jgraph.JGraph;
12:
13: /**
14: * Defines the requirements for objects that may be used as a
15: * cell view renderer.
16: *
17: * @version 1.0 1/1/02
18: * @author Gaudenz Alder
19: */
20:
21: public interface CellViewRenderer {
22:
23: /**
24: * Configure and return the renderer based on the passed in
25: * components. The value is typically set from messaging the
26: * graph with <code>convertValueToString</code>.
27: * We recommend you check the value's class and throw an
28: * illegal argument exception if it's not correct.
29: *
30: * @param graph the graph that that defines the rendering context.
31: * @param view the view that should be rendered.
32: * @param sel whether the object is selected.
33: * @param focus whether the object has the focus.
34: * @param preview whether we are drawing a preview.
35: * @return the component used to render the value.
36: */
37: Component getRendererComponent(JGraph graph, CellView view,
38: boolean sel, boolean focus, boolean preview);
39:
40: }
|