01: /*
02: * $RCSfile: VAINodeInterface.java,v $
03: * @modification $Date: 2001/09/28 19:41:42 $
04: * @version $Id: VAINodeInterface.java,v 1.1 2001/09/28 19:41:42 hfalk Exp $
05: *
06: */
07:
08: package com.memoire.vainstall.builder.util;
09:
10: import javax.swing.*;
11:
12: /**
13: * This interface is the 'glue' between a tree node and a editable view
14: * on a data model.
15: *
16: * @see com.memoire.vainstall.builder.util.AbstractVAIBuilderNode
17: * @see com.memoire.vainstall.builder.util.AbstractVAIProductNode
18: *
19: * @author Henrik Falk
20: * @version $Id: VAINodeInterface.java,v 1.1 2001/09/28 19:41:42 hfalk Exp $
21: */
22: public abstract interface VAINodeInterface {
23:
24: /**
25: * Returns the name of the node. This is used as label on the tree
26: * node.
27: * @return The name of the node
28: */
29: public abstract String getName();
30:
31: /**
32: * Returns the UI editor/viewer for the node.
33: * @return The UI for the node
34: */
35: public abstract JPanel getUI();
36:
37: /**
38: * Returns the title of the node. This is used as title on the UI
39: * panel.
40: * @return The title of the node
41: */
42: public abstract String getTitle();
43:
44: /**
45: * Returns the icon for the node. This is used as visual representation
46: * for the 'type' of node.
47: * @return The image of the node
48: */
49: public ImageIcon getIcon();
50:
51: /**
52: * This method are used by nodes to put data from a data model
53: * to the UI and initialize any listeners
54: */
55: public void start();
56:
57: /**
58: * This method are used by nodes to stop listeners is any
59: */
60: public void stop();
61:
62: /**
63: * This method are used by nodes to put data from the UI to
64: * the data model.
65: */
66: public void save();
67:
68: }
|