1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 package org.utgenome.gwt.utgb.client.track.lib;
26
27 import org.utgenome.gwt.utgb.client.db.datatype.StringType;
28 import org.utgenome.gwt.utgb.client.track.Track;
29 import org.utgenome.gwt.utgb.client.track.TrackConfigChange;
30 import org.utgenome.gwt.utgb.client.track.TrackFrame;
31 import org.utgenome.gwt.utgb.client.track.TrackGroup;
32
33
34
35
36
37
38
39
40
41 @Deprecated
42 public class BEDTrack extends GenomeTrack {
43
44 protected final String CONFIG_FILENAME = "fileName";
45
46 public static TrackFactory factory() {
47 return new TrackFactory() {
48 @Override
49 public Track newInstance() {
50 return new BEDTrack();
51 }
52 };
53 }
54
55 public BEDTrack() {
56 super("BED Track");
57 }
58
59 @Override
60 public void draw() {
61 getConfig().setParameter(CONFIG_TRACK_BASE_URL, "utgb-core/BEDViewer?%q&fileName=" + getConfig().getString(CONFIG_FILENAME, ""));
62 super.draw();
63 }
64
65 @Override
66 public void setUp(TrackFrame trackFrame, TrackGroup group) {
67 super.setUp(trackFrame, group);
68
69 getConfig().addConfig("File Name", new StringType(CONFIG_FILENAME), "");
70 }
71
72 @Override
73 public void onChangeTrackConfig(TrackConfigChange change) {
74 super.onChangeTrackConfig(change);
75
76 if (change.contains(CONFIG_FILENAME)) {
77 refresh();
78 }
79 }
80
81 }