1 /*-------------------------------------------------------------------------- 2 * Copyright 2007 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 // GenomeBrowser Project 18 // 19 // TrackGroupPropertyWriter.java 20 // Since: Jun 12, 2007 21 // 22 // $URL$ 23 // $Author$ 24 //-------------------------------------- 25 package org.utgenome.gwt.utgb.client.track; 26 27 import java.util.Map; 28 29 /** 30 * {@link TrackGroupPropertyWriter} is an interface to write {@link TrackGroupProperty} values. After calling methods in 31 * {@link TrackGroupPropertyWriter}, it is assumed that every track managed by a {@link TrackGroup} recieves a 32 * {@link Track#onChangeTrackGroupProperty(TrackGroupPropertyChange)} or {@link Track#onChangeTrackWindow(TrackWindow)} 33 * event. 34 * 35 * @author leo 36 * 37 */ 38 public interface TrackGroupPropertyWriter { 39 /** 40 * set a genome location displayed in the current TrackWindowImpl 41 * 42 * @param startOnGenome 43 * @param endOnGenome 44 */ 45 public void setTrackWindow(int startOnGenome, int endOnGenome); 46 47 /** 48 * @param windowSize 49 */ 50 public void setTrackWindowSize(int windowSize); 51 52 public void setTrackWindow(TrackWindow newWindow); 53 54 public void setProperyChangeNotifaction(boolean enable); 55 56 public void scrollTrackWindow(double scrollPercentage); 57 58 public void scaleUpTrackWindow(); 59 60 public void scaleDownTrackWindow(); 61 62 /** 63 * Set a property (key, value) 64 * 65 * @param key 66 * @param value 67 */ 68 public void setProperty(String key, String value); 69 70 /** 71 * Set a set of properties specified in the given Map of properties. 72 * 73 * This method is useful when you have to set multiple property values at the same time before invoking 74 * onChangeTrackProperty events. 75 * 76 * @param property 77 */ 78 public void setProperty(Map<String, String> property); 79 80 public void setProperty(Map<String, String> properties, TrackWindow newWindow); 81 82 /** 83 * Apply the property changes to this writer 84 * 85 * @param change 86 * @param target 87 */ 88 public void apply(TrackGroupPropertyChange change); 89 }