Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
CueEvent.java
1 
16 package net.squiz.cuetree;
17 
18 import java.util.EventObject;
19 import javax.swing.tree.TreePath;
20 import java.awt.Point;
21 
29 public class CueEvent extends EventObject {
30 
31  private TreePath parentPath;
32  private TreePath[] sourcePaths;
33  private int index, prevIndex;
34  private Point point;
35 
45  public CueEvent(
46  Object source,
47  TreePath[] sourcePaths,
48  TreePath parentPath,
49  int index,
50  Point point) {
51  super(source);
52  this.parentPath = parentPath;
53  this.sourcePaths = sourcePaths;
54  this.index = index;
55  this.point = point;
56  }
57 
58  public CueEvent(
59  Object source,
60  TreePath[] sourcePaths,
61  TreePath parentPath,
62  int index,
63  int prevIndex,
64  Point point) {
65  super(source);
66  this.parentPath = parentPath;
67  this.sourcePaths = sourcePaths;
68  this.index = index;
69  this.prevIndex = prevIndex;
70  this.point = point;
71  }
72 
77  public TreePath[] getSourcePaths() {
78  return sourcePaths;
79  }
80 
81  public TreePath getSourcePath() {
82  return sourcePaths[0];
83  }
84 
89  public int getIndex() {
90  return index;
91  }
92 
97  public int getPrevIndex() {
98  return prevIndex;
99  }
100 
105  public TreePath getParentPath() {
106  return parentPath;
107  }
108 
113  public Point getPoint() {
114  return point;
115  }
116 
121  public int getX() {
122  return point.x;
123  }
124 
129  public int getY() {
130  return point.y;
131  }
132 }