View Javadoc

1   /*--------------------------------------------------------------------------
2    *  Copyright 2009 utgenome.org
3    *
4    *  Licensed under the Apache License, Version 2.0 (the "License");
5    *  you may not use this file except in compliance with the License.
6    *  You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *  Unless required by applicable law or agreed to in writing, software
11   *  distributed under the License is distributed on an "AS IS" BASIS,
12   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *  See the License for the specific language governing permissions and
14   *  limitations under the License.
15   *--------------------------------------------------------------------------*/
16  //--------------------------------------
17  // utgb-core Project
18  //
19  // TrackGenTrack.java
20  // Since: 2009/05/21
21  //
22  // $URL$ 
23  // $Author$
24  //--------------------------------------
25  package org.utgenome.gwt.utgb.client.track.lib;
26  
27  import org.utgenome.gwt.utgb.client.track.Track;
28  import org.utgenome.gwt.utgb.client.track.TrackBase;
29  
30  import com.google.gwt.user.client.ui.FlexTable;
31  import com.google.gwt.user.client.ui.ListBox;
32  import com.google.gwt.user.client.ui.Widget;
33  
34  public class TrackGenTrack extends TrackBase {
35  
36  	public static TrackFactory factory() {
37  		return new TrackFactory() {
38  			public Track newInstance() {
39  				return new TrackGenTrack();
40  			}
41  		};
42  	}
43  
44  	final FlexTable layoutTable = new FlexTable();
45  	final ListBox trackSelector = new ListBox();
46  
47  	public TrackGenTrack() {
48  		super("Track Factory");
49  
50  		trackSelector.addItem("DAS Track", "das");
51  		trackSelector.addItem("BED Track", "bed");
52  		trackSelector.addItem("Read Track", "read");
53  		trackSelector.addItem("Image Track", "image");
54  		trackSelector.addItem("IFrame Track", "frame");
55  
56  		layoutTable.setWidget(0, 0, trackSelector);
57  	}
58  
59  	public Widget getWidget() {
60  
61  		return layoutTable;
62  	}
63  
64  }