|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.utgenome.gwt.utgb.client.track.TrackBase
public abstract class TrackBase
TrackBase
is a base class that supports to implement your own Track
s.
Nested Class Summary | |
---|---|
static class |
TrackBase.TrackFrameConfig
|
Nested classes/interfaces inherited from interface org.utgenome.gwt.utgb.client.track.Track |
---|
Track.TrackFactory |
Field Summary | |
---|---|
protected TrackFrame |
_frame
|
protected TrackGroup |
_trackGroup
|
protected TrackInfo |
_trackInfo
|
TrackBase.TrackFrameConfig |
frameConfig
|
Constructor Summary | |
---|---|
TrackBase(String trackName)
|
|
TrackBase(TrackInfo trackInfo)
|
Method Summary | |
---|---|
void |
beforeChangeTrackWindow(TrackWindow newWindow)
An event handler that will be invoked before the track window location change |
void |
draw()
draw the track widget |
void |
error(String message)
Report an error |
BrowserServiceAsync |
getBrowserService()
Get the RPC service for communicating with the server |
String |
getClassName()
|
TrackConfig |
getConfig()
Get the TrackConfig panel. |
Coordinate |
getCoordinate()
Get the current genome coordinate |
int |
getDefaultWindowHeight()
|
TrackFrame |
getFrame()
Get the frame of this track |
int |
getMinimumWindowHeight()
|
String |
getName()
Get the entry name |
TrackGroup |
getTrackGroup()
|
String |
getTrackGroupProperty(String key)
|
String |
getTrackGroupProperty(String key,
String defaultValue)
|
TrackInfo |
getTrackInfo()
|
TrackWindow |
getTrackWindow()
|
boolean |
isInitialized()
|
boolean |
isTrack()
Test whether this entry is Track or not. |
boolean |
isTrackGroup()
Test whether this entry is TrackGroup or not |
void |
loadView(TrackView.Track view)
load the track parameters from the view definition |
void |
onChange(TrackGroupPropertyChange change,
TrackWindow newWindow)
Handle change event. |
void |
onChangeTrackConfig(TrackConfigChange change)
An event handler when some cofigurations of the track changes |
void |
onChangeTrackGroupProperty(TrackGroupPropertyChange change)
An event handler when some properties shared within the track group has changed |
void |
onChangeTrackHeight(int newHeight)
|
void |
onChangeTrackWindow(TrackWindow newWindow)
An event handler when the track window location has changed |
void |
refresh()
draw and resize the frame |
String |
resolvePropertyValues(String template)
Substitute the query parameters in the given string with the actual values. |
void |
restoreProperties(CanonicalProperties properties)
Override this method to restore internal state of the track |
void |
saveProperties(CanonicalProperties saveData)
Override this method to save internal state of the track into a Properties object |
void |
setCenterOfTrackWindow(String chr,
int start,
int end)
|
void |
setConfig(TrackConfig config)
|
void |
setFrame(TrackFrame frame)
Set the frame that wraps this track |
void |
setTrackGroup(TrackGroup trackGroup)
set a mediator of this track |
void |
setTrackGroupProperty(String key,
String value)
|
void |
setUp(TrackFrame trackFrame,
TrackGroup group)
This method is invoked when TrackFrame and TrackGroup for this track become ready, that is, the
track is drawable. |
TrackView.Track |
toView()
|
String |
toXML()
|
void |
toXML(XMLWriter xmlWriter)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.utgenome.gwt.utgb.client.track.Track |
---|
getWidget |
Field Detail |
---|
protected TrackGroup _trackGroup
protected TrackFrame _frame
protected final TrackInfo _trackInfo
public TrackBase.TrackFrameConfig frameConfig
Constructor Detail |
---|
public TrackBase(String trackName)
public TrackBase(TrackInfo trackInfo)
Method Detail |
---|
public void setUp(TrackFrame trackFrame, TrackGroup group)
Track
TrackFrame
and TrackGroup
for this track become ready, that is, the
track is drawable. Override this method to write initialization codes for your tracks.
setUp
in interface Track
group
- the TrackGroup
of this trackpublic String resolvePropertyValues(String template)
template
-
public TrackGroup getTrackGroup()
getTrackGroup
in interface Track
public TrackWindow getTrackWindow()
public TrackInfo getTrackInfo()
getTrackInfo
in interface Track
public void setTrackGroup(TrackGroup trackGroup)
Track
setTrackGroup
in interface Track
trackGroup
- mediator of this trackpublic TrackFrame getFrame()
Track
getFrame
in interface Track
public void setFrame(TrackFrame frame)
Track
setFrame
in interface Track
frame
- a frame for this trackpublic int getDefaultWindowHeight()
getDefaultWindowHeight
in interface Track
public int getMinimumWindowHeight()
getMinimumWindowHeight
in interface Track
public void onChangeTrackGroupProperty(TrackGroupPropertyChange change)
Track
onChangeTrackGroupProperty
in interface Track
public void beforeChangeTrackWindow(TrackWindow newWindow)
Track
beforeChangeTrackWindow
in interface Track
public void onChangeTrackWindow(TrackWindow newWindow)
Track
onChangeTrackWindow
in interface Track
public void onChange(TrackGroupPropertyChange change, TrackWindow newWindow)
TrackGroupPropertyChangeListener
onChange
in interface Track
onChange
in interface TrackGroupPropertyChangeListener
change
- property changes. null value means no property changenewWindow
- window changes. null value means no window changespublic void draw()
Track
draw
in interface Track
public void refresh()
Track
refresh
in interface Track
public Coordinate getCoordinate()
public boolean isInitialized()
isInitialized
in interface Track
Track.setUp(TrackFrame, TrackGroup)
has already done.public void onChangeTrackConfig(TrackConfigChange change)
Track
onChangeTrackConfig
in interface Track
public TrackConfig getConfig()
Track
TrackConfig
panel. Override this method to return your own configuration panel
getConfig
in interface Track
public void setConfig(TrackConfig config)
setConfig
in interface Track
public String getName()
TrackEntry
getName
in interface TrackEntry
public boolean isTrack()
TrackEntry
Track
or not.
isTrack
in interface TrackEntry
Track
, othewise false.public boolean isTrackGroup()
TrackEntry
TrackGroup
or not
isTrackGroup
in interface TrackEntry
TrackGroup
, otherwise false.public void loadView(TrackView.Track view)
Track
loadView
in interface Track
public TrackView.Track toView()
public String toXML()
toXML
in interface Track
public void toXML(XMLWriter xmlWriter)
toXML
in interface Track
public String getClassName()
public void saveProperties(CanonicalProperties saveData)
Properties
object
saveProperties
in interface Track
xmlWriter
- public void restoreProperties(CanonicalProperties properties)
restoreProperties
in interface Track
properties
- public String getTrackGroupProperty(String key)
getTrackGroupProperty
in interface Track
public String getTrackGroupProperty(String key, String defaultValue)
getTrackGroupProperty
in interface Track
public void setTrackGroupProperty(String key, String value)
setTrackGroupProperty
in interface Track
public void setCenterOfTrackWindow(String chr, int start, int end)
public BrowserServiceAsync getBrowserService()
public void onChangeTrackHeight(int newHeight)
onChangeTrackHeight
in interface Track
public void error(String message)
Track
error
in interface Track
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |