1 package org.kite9.diagram.primitives;
2
3 import java.io.Serializable;
4
5 import org.kite9.diagram.position.RenderingInformation;
6
7 /***
8 * Base class of all diagram elements.
9 *
10 * @author robmoffat
11 *
12 */
13 public abstract class AbstractLabel implements Serializable, DiagramElement {
14
15 private static final long serialVersionUID = -1012880238215021108L;
16
17 /***
18 * This is used by layout engines to set the position of the elements in the
19 * diagram
20 */
21 protected RenderingInformation renderingInformation = null;
22
23 /***
24 * This is very handy for ensuring repeatability in tests. Override as necessary.
25 */
26 public int compareTo(DiagramElement o) {
27 if (o!=null) {
28 return this.toString().compareTo(o.toString());
29 } else {
30 return -1;
31 }
32 }
33
34 }