01: /*
02: * $Header: /cvs/j3dfly/J3dEditor/src/org/jdesktop/j3dedit/treelayout/Link.java,v 1.1 2005/04/20 22:21:32 paulby Exp $
03: *
04: * Sun Public License Notice
05: *
06: * The contents of this file are subject to the Sun Public License Version
07: * 1.0 (the "License"). You may not use this file except in compliance with
08: * the License. A copy of the License is available at http://www.sun.com/
09: *
10: * The Original Code is the Java 3D(tm) Scene Graph Editor.
11: * The Initial Developer of the Original Code is Paul Byrne.
12: * Portions created by Paul Byrne are Copyright (C) 2002.
13: * All Rights Reserved.
14: *
15: * Contributor(s): Paul Byrne.
16: *
17: **/
18: package org.jdesktop.j3dedit.treelayout;
19:
20: import java.awt.*;
21: import java.util.*;
22:
23: /**
24: *
25: * @author Paul Byrne
26: * @version $Id: Link.java,v 1.1 2005/04/20 22:21:32 paulby Exp $
27: */
28: public abstract class Link {
29:
30: protected int spacing; // The space between each
31: // level in the tree
32:
33: protected TreeNode parent;
34:
35: /**
36: * Create the link with the specified parent
37: */
38: public Link(TreeNode parent) {
39: this (parent, 30);
40: }
41:
42: /**
43: * Create the link with the specfied parent and
44: * set the vertical space occupied by the link to be <param>spacing</param>
45: */
46: public Link(TreeNode parent, int spacing) {
47: this .spacing = spacing;
48: this .parent = parent;
49: }
50:
51: public abstract void paint(Graphics g);
52:
53: /**
54: * Spacing between each level of tree
55: */
56: public int getSpacing() {
57: return spacing;
58: }
59: }
|