01: /*
02: * @(#)CellMapper.java 1.0 03-JUL-04
03: *
04: * Copyright (c) 2001-2005 Gaudenz Alder
05: *
06: */
07: package org.jgraph.graph;
08:
09: /**
10: * Defines the requirements for objects that may be used as a cell mapper. A
11: * cell mapper is able to return the view of a cell, given a reference to that
12: * cell object. It is basically a cell to cell view mapping
13: */
14:
15: public interface CellMapper {
16:
17: /**
18: * Returns the view that is associated with <code>cell</code>.
19: *
20: * @param create
21: * whether a new view should created if a view does not already
22: * exist
23: */
24: CellView getMapping(Object cell, boolean create);
25:
26: /**
27: * Inserts the association between <code>cell</code> and <code>view</code>.
28: *
29: * @param cell
30: * the cell that constitutes the model element
31: * @param view
32: * the view that constitutes the view element
33: */
34: void putMapping(Object cell, CellView view);
35: }
|