Package bacnet.genomeBrowser.tracksGUI
Class TrackCanvasData
java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.swt.widgets.Canvas
bacnet.genomeBrowser.tracksGUI.TrackCanvasData
- All Implemented Interfaces:
Serializable,EventListener,org.eclipse.rap.rwt.Adaptable,org.eclipse.swt.events.MouseMoveListener,org.eclipse.swt.graphics.Drawable,org.eclipse.swt.internal.SerializableCompatibility,org.eclipse.swt.internal.SWTEventListener
public class TrackCanvasData
extends org.eclipse.swt.widgets.Canvas
implements org.eclipse.swt.events.MouseMoveListener
A TrackCanvasData is the Canvas in which will be displayed datasets
- Author:
- christophebecavin
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intHeight of the sequence track (when displayed)intMinimal height of a data track -
Constructor Summary
ConstructorsConstructorDescriptionTrackCanvasData(org.eclipse.swt.widgets.Composite parent, int style, org.eclipse.swt.widgets.Composite trackComposite) -
Method Summary
Modifier and TypeMethodDescriptionintclickedElement(org.eclipse.swt.events.MouseEvent e) Get base-pair position of the clicked elementintconvertXtoBP(int x) Convert position in the display to a position in the genome
(inverse function of basepairToXimage(int bpIndex))
If MassSpec data has not been register do itdoubleintintintintintgetTrack()org.eclipse.swt.widgets.CompositeintdoublebooleanbooleanvoidmouseMove(org.eclipse.swt.events.MouseEvent e) If the mouse is over the genome viewer, detect it is on the annotation, and display the corresponding gene, sRNA, asRNAvoidmoveVertically(int sliderVBarIncrement) From the position of the vertical bar draw the corresponding part of the datavoidsetAnnotation(Annotation annotation) voidsetBpSizeH(double bpSizeH) voidsetChromoID(String chromoID) voidsetDataWindowSize(int dataWindowSize) voidsetDecaySliderVBar(int decaySliderVBar) voidsetDisplayMouseLine(boolean displayMouseLine) voidsetGenomeName(String genomeName) voidsetHeightPix(int heightPix) voidsetMassSpecData(NTermData massSpecData) voidsetMouseXPosition(int mouseXPosition) voidsetMouseYPosition(int mouseYPosition) voidvoidsetnTermHighlight(NTerm nTermHighlight) voidsetnTermTypeOverlap(String nTermTypeOverlap) voidsetTestData(boolean testData) voidSet the data of the Canvas, and implement the PaintListener Execute different tasks:
Fix the number of pixel for one base pair Set width and height parameters for data and annotation track Display in order:
different line and ticks for the base pair position, every display needed in the background display all the data display sequence if needed display annotation different genome name and mouse line in foregroundvoidsetTrackComposite(org.eclipse.swt.widgets.Composite trackComposite) voidsetWidthBP(int widthBP) voidsetZoomVertical(double zoomVertical) Methods inherited from class org.eclipse.swt.widgets.Canvas
addPaintListener, getAdapter, removePaintListenerMethods inherited from class org.eclipse.swt.widgets.Composite
changed, computeSize, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabListMethods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getVerticalBarMethods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addTouchListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getShell, getSize, getToolTipText, getTouchEnabled, getVisible, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCursor, setData, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setSize, setSize, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, updateMethods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, reskin, setData, toString
-
Field Details
-
MINIMUM_DATA_SIZE
public int MINIMUM_DATA_SIZEMinimal height of a data track -
HEIGHT_SEQUENCE
public static int HEIGHT_SEQUENCEHeight of the sequence track (when displayed)
-
-
Constructor Details
-
TrackCanvasData
public TrackCanvasData(org.eclipse.swt.widgets.Composite parent, int style, org.eclipse.swt.widgets.Composite trackComposite)
-
-
Method Details
-
setTrack
Set the data of the Canvas, and implement the PaintListener Execute different tasks:
- Fix the number of pixel for one base pair
- Set width and height parameters for data and annotation track Display in order:
- different line and ticks for the base pair position, every display needed in the background
- display all the data
- display sequence if needed
- display annotation
- different genome name and mouse line in foreground
- Parameters:
tracks-Trackdata-TrackData
-
convertXtoBP
public int convertXtoBP(int x) Convert position in the display to a position in the genome
(inverse function of basepairToXimage(int bpIndex))
If MassSpec data has not been register do it- Parameters:
x- position in the view- Returns:
- bpIndex in the genome
-
mouseMove
public void mouseMove(org.eclipse.swt.events.MouseEvent e) If the mouse is over the genome viewer, detect it is on the annotation, and display the corresponding gene, sRNA, asRNA- Specified by:
mouseMovein interfaceorg.eclipse.swt.events.MouseMoveListener- Parameters:
e-
-
moveVertically
public void moveVertically(int sliderVBarIncrement) From the position of the vertical bar draw the corresponding part of the data- Parameters:
sliderVBarPosition-
-
clickedElement
public int clickedElement(org.eclipse.swt.events.MouseEvent e) Get base-pair position of the clicked element- Parameters:
e-- Returns:
-
getnTermTypeOverlap
-
setnTermTypeOverlap
-
getnTermHighlight
-
setnTermHighlight
-
getMouseXPosition
public int getMouseXPosition() -
setMouseXPosition
public void setMouseXPosition(int mouseXPosition) -
getMouseYPosition
public int getMouseYPosition() -
setMouseYPosition
public void setMouseYPosition(int mouseYPosition) -
isDisplayMouseLine
public boolean isDisplayMouseLine() -
setDisplayMouseLine
public void setDisplayMouseLine(boolean displayMouseLine) -
getMassSpecData
-
setMassSpecData
-
getTrack
-
getAnnotation
-
setAnnotation
-
getHeightPix
public int getHeightPix() -
setHeightPix
public void setHeightPix(int heightPix) -
getWidthBP
public int getWidthBP() -
setWidthBP
public void setWidthBP(int widthBP) -
getDecaySliderVBar
public int getDecaySliderVBar() -
setDecaySliderVBar
public void setDecaySliderVBar(int decaySliderVBar) -
getDataWindowSize
public int getDataWindowSize() -
setDataWindowSize
public void setDataWindowSize(int dataWindowSize) -
getBpSizeH
public double getBpSizeH() -
setBpSizeH
public void setBpSizeH(double bpSizeH) -
getTrackComposite
public org.eclipse.swt.widgets.Composite getTrackComposite() -
setTrackComposite
public void setTrackComposite(org.eclipse.swt.widgets.Composite trackComposite) -
getZoomVertical
public double getZoomVertical() -
setZoomVertical
public void setZoomVertical(double zoomVertical) -
isTestData
public boolean isTestData() -
setTestData
public void setTestData(boolean testData) -
getCanvasName
-
setName
-
getGenomeName
-
setGenomeName
-
getChromoID
-
setChromoID
-