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
Modifier and TypeFieldDescriptionstatic int
Height of the sequence track (when displayed)int
Minimal height of a data track -
Constructor Summary
ConstructorDescriptionTrackCanvasData
(org.eclipse.swt.widgets.Composite parent, int style, org.eclipse.swt.widgets.Composite trackComposite) -
Method Summary
Modifier and TypeMethodDescriptionint
clickedElement
(org.eclipse.swt.events.MouseEvent e) Get base-pair position of the clicked elementint
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 itdouble
int
int
int
int
int
getTrack()
org.eclipse.swt.widgets.Composite
int
double
boolean
boolean
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, asRNAvoid
moveVertically
(int sliderVBarIncrement) From the position of the vertical bar draw the corresponding part of the datavoid
setAnnotation
(Annotation annotation) void
setBpSizeH
(double bpSizeH) void
setChromoID
(String chromoID) void
setDataWindowSize
(int dataWindowSize) void
setDecaySliderVBar
(int decaySliderVBar) void
setDisplayMouseLine
(boolean displayMouseLine) void
setGenomeName
(String genomeName) void
setHeightPix
(int heightPix) void
setMassSpecData
(NTermData massSpecData) void
setMouseXPosition
(int mouseXPosition) void
setMouseYPosition
(int mouseYPosition) void
void
setnTermHighlight
(NTerm nTermHighlight) void
setnTermTypeOverlap
(String nTermTypeOverlap) void
setTestData
(boolean testData) void
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 foregroundvoid
setTrackComposite
(org.eclipse.swt.widgets.Composite trackComposite) void
setWidthBP
(int widthBP) void
setZoomVertical
(double zoomVertical) Methods inherited from class org.eclipse.swt.widgets.Canvas
addPaintListener, getAdapter, removePaintListener
Methods 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, setTabList
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getVerticalBar
Methods 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, update
Methods 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
-Track
data
-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:
mouseMove
in 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
-