public abstract class GenomicViewDraw extends GenomicViewData implements java.awt.print.Printable
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected int |
end_last_lower_label_x |
protected int |
end_last_upper_label_x |
active, bCircular, bDetails, beginPoint, bHorizontal, bInspection, bottomMarkerBounds, bottomPileUpBounds, bottomReferenceBounds, contigLength, currentViewContig, default_border_width, default_feature_size, default_height_top_axis, default_ideogram_height, default_ideogram_label_width, default_ideogram_width, default_left_info_width, default_tracks_width, default_view_height, default_view_width, default_y_bottom_ideogram, default_y_top_ideogram, dim_ideogramview, endPoint, ideogramBounds, ideogramLabelBounds, int_visible_range, isDragging, layout_info, leftLegendBounds, leftMarkerBounds, leftVisible, main_app, marker_state, markers, maxWidth, minViewGenomicRange, minWidth, paintBuffer, paintBufferValid, rangeSelection, rightLegendBounds, rightMarkerBounds, rightVisible, scaleX, scaleY, selected_gene, selectedMarker, selectedSlotIndex, selectedTrackIndex, selectionChangedListeners, showGenes, showLabels, showMarkerLabels, showMarkers, viewHistory
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
GenomicViewDraw(VioletApp main_app) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
autofitLabelWidth(java.awt.Graphics g,
java.lang.String label)
changes string to display enough chars to fit to label width
|
int |
BaseRangeToXExtent(double range)
Transforms the basepair extent pos to x-width of the canvas.
|
int |
BaseToXCoord(long pos)
Transforms the basepair location pos to x-coordinates of the canvas.
|
int |
BaseToYCoord(long pos)
Transforms the basepair location pos to y-coordinates of the canvas.
|
protected void |
drawAxisHeaderlabel(java.awt.Graphics g,
double value,
int half_char_width,
int y_offset,
boolean format_as_int) |
void |
drawBackgroundSelections(java.awt.Graphics g)
draw marker lines and selected profile lines
|
protected void |
drawEpiProIdeogram(java.awt.Graphics g) |
void |
drawForegroundSelections(java.awt.Graphics graphics) |
protected void |
drawGene(java.awt.Graphics g,
Marker M,
boolean is_selected,
java.awt.Color color)
Draws a gene into the graphic context
|
protected void |
drawGenes(java.awt.Graphics g)
Paints the gene markers into the given Graphics device.
|
protected void |
drawGenomicViewDoubleBuffered(java.awt.Graphics graphics)
Main draw function for class
|
void |
drawGenomicViewToGraphicsContext(java.awt.Graphics g) |
void |
drawGenomicViewToPaintBuffer(java.awt.Graphics graphics) |
protected void |
drawHeaderFooter(java.awt.Graphics g) |
protected void |
drawHorizontalTracksHeader(java.awt.Graphics g) |
protected void |
drawIdeogram(java.awt.Graphics g) |
protected void |
drawInfoLabel(java.awt.Graphics g,
java.lang.String label,
int y_offset) |
protected void |
drawInfoLabelJustified(java.awt.Graphics g,
java.lang.String label,
int y_offset,
int justification)
draw label into info area
|
protected void |
drawLabelWithOffsetAndWidth(java.awt.Graphics g,
java.lang.String label,
int x,
int y,
int width) |
protected void |
drawMarker(java.awt.Graphics g,
Marker marker,
int column,
java.awt.Rectangle rect,
java.awt.Color color,
boolean is_selected,
java.awt.Color selected_color)
Draws a single marker.
|
protected void |
drawMarkerInterval(java.awt.Graphics g,
Marker marker,
int column,
java.awt.Rectangle rect,
boolean is_selected,
java.awt.Color selected_color) |
protected void |
drawMarkers(java.awt.Graphics g) |
protected void |
drawMinMaxLabel(java.awt.Graphics g,
double min,
double max,
int y_offset,
int vertical_height,
double delta_extent,
java.lang.String metric,
boolean bLog10) |
protected void |
drawModification(java.awt.Graphics g,
Marker marker,
int column,
java.awt.Rectangle rect) |
protected void |
drawModificationInterval(java.awt.Graphics2D g,
Marker marker,
int column,
java.awt.Rectangle rect,
VariableResolutionDataSetValues min_max_values) |
protected void |
drawRangeSelection(java.awt.Graphics g) |
protected void |
drawRotatedLabel(java.lang.String text,
java.awt.Graphics g,
java.awt.Color color,
int x,
int y,
double dAngle) |
protected void |
drawSummary(java.awt.Graphics g,
Marker marker,
int column,
java.awt.Color color,
double max_coverage,
int max_variants)
Draws coverage info for one coverage slot (marker)
|
protected void |
drawSummaryInterval(java.awt.Graphics g,
int column,
Marker marker,
boolean bLeft,
java.awt.Color color,
double max_coverage,
int max_variants) |
protected void |
drawSummaryRegion(java.awt.Graphics2D g2d,
java.awt.Shape min_polygon,
int[] x_coord,
int[] y_coord,
java.awt.Color min_max_color,
java.awt.Color avg_color) |
protected void |
drawTrackMetricLabel(java.awt.Graphics g,
int y_offset,
int vertical_height,
double delta_extent,
java.lang.String metric) |
protected void |
drawVariant(java.awt.Graphics g,
Marker marker,
int track,
java.awt.Rectangle rect) |
protected void |
drawVariantInterval(java.awt.Graphics2D g,
Marker marker,
int track,
java.awt.Rectangle rect,
VariableResolutionDataSetValues min_max_values) |
int |
getContigLength() |
int |
getContigMaxRange() |
java.awt.Dimension |
getDim() |
protected int |
getExtraRefTrackDistance() |
java.awt.Rectangle |
getGenesBounds() |
java.awt.Rectangle |
getIdeogramBounds() |
java.awt.Rectangle |
getLabelBounds() |
java.awt.Rectangle |
getLegendBounds() |
java.awt.Rectangle |
getMarkersBounds() |
protected double |
getMaxMagnification() |
protected double |
getMinMagnification() |
int |
getNumLeft() |
int |
getNumRight() |
java.lang.String |
getPanelTitle(boolean bLong)
returns title to use for specific panel
|
java.awt.Rectangle |
getPileupBounds() |
Interval |
getRangeSelection() |
java.awt.Rectangle |
getReferenceBounds() |
java.awt.Color |
getSelectedRangeColor() |
Interval |
getVisibleGenomicRange() |
void |
invalidatePaintBuffer()
Call this function if the view changes.
|
boolean |
isCircular() |
boolean |
isDetails() |
boolean |
isHorizontal() |
boolean |
isInspection() |
protected void |
paintActiveBorder(java.awt.Graphics g)
Draws a frame around this ideogram if its active.
|
protected void |
paintComponent(java.awt.Graphics graphics) |
protected void |
paintLegendBackground(java.awt.Graphics g,
int x,
int y,
int w,
int h) |
protected boolean |
prepareDrawVariant(java.awt.Graphics g,
Marker marker) |
int |
print(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex) |
protected int |
scaleX(int x) |
protected int |
scaleY(int y) |
java.awt.Dimension |
setMagnificationScaleFactor(double sx,
double sy) |
protected boolean |
showDataLabels() |
int |
trackIndexToXCoord(int track_index)
Compute the x-coordinate of a marker position.
|
int |
trackToYCoord(int track_index)
Compute the y-coordinate of a track.
|
java.awt.Dimension |
updateLayout() |
java.awt.Dimension |
updateSize(boolean repaint,
boolean revalidate) |
long |
XCoordToBase(int x)
Transforms a canvas x coordinate to basepairs.
|
int |
xCoordToTrackIndex(int x)
Converts a x-coordinate in this panel into a track index value.
|
long |
YCoordToBase(int y)
Transforms a canvas y coordinate to basepairs.
|
int |
yCoordToMarkerCollectionIndex(int y)
returns index of markercollection for this y coordinate
|
int |
yCoordToMarkerCollectionIndexNew(int y) |
int |
yCoordToMarkerCollectionIndexOrg(int y)
returns index of markercollection for this y coordinate
|
int |
yCoordToTrackIndex(int y)
returns index of track in graph, e.g.
|
addTrackDataToViewAndUpdateLayout, clearMarkers, getContigLabel, getGenesOfCurrentContig, getIdeogramTreeOfCurrentContig, getMarkerCollection, getMarkers, getNumMarkerCollections, getSlotColor, getSlotMaxCoverage, getSlotMaxVariants, getSlots, markerToSampleIndex, sampleToMarkerIndex, sampleToMarkerIndex, setViewContig, setViewDataForCurrentContig, updateVisibility
getAbsMaxGenomicRange, getBorderWidth, getDataStorage, getGeneDB, getIdeogramDB, getMainWindow, getMaxGenomicRange, getMinGenomicRange, getReferenceInfo, getViewContig, getViewContigName, getVioletApp, initializeViewBase, isActive, isDNABaseShown, isIdeogramDBLoaded
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected int end_last_upper_label_x
protected int end_last_lower_label_x
public GenomicViewDraw(VioletApp main_app)
public java.awt.Dimension updateLayout()
public int getContigLength()
public int getContigMaxRange()
public Interval getVisibleGenomicRange()
public java.awt.Dimension getDim()
public boolean isHorizontal()
public boolean isCircular()
public boolean isDetails()
public boolean isInspection()
public java.awt.Rectangle getIdeogramBounds()
public java.awt.Rectangle getMarkersBounds()
public java.awt.Rectangle getLegendBounds()
public java.awt.Rectangle getLabelBounds()
public java.awt.Rectangle getPileupBounds()
public java.awt.Rectangle getReferenceBounds()
public java.awt.Rectangle getGenesBounds()
protected void paintComponent(java.awt.Graphics graphics)
paintComponent
in class javax.swing.JComponent
protected void drawGenomicViewDoubleBuffered(java.awt.Graphics graphics)
graphics
- public Interval getRangeSelection()
protected void drawRangeSelection(java.awt.Graphics g)
public void drawBackgroundSelections(java.awt.Graphics g)
public void drawForegroundSelections(java.awt.Graphics graphics)
public void drawGenomicViewToPaintBuffer(java.awt.Graphics graphics)
public void drawGenomicViewToGraphicsContext(java.awt.Graphics g)
drawGenomicViewToGraphicsContext
in class GenomicViewBase
protected void drawIdeogram(java.awt.Graphics g)
drawIdeogram
in class GenomicViewBase
protected void drawEpiProIdeogram(java.awt.Graphics g)
g
- protected void drawGenes(java.awt.Graphics g)
drawGenes
in class GenomicViewBase
g
- protected void drawGene(java.awt.Graphics g, Marker M, boolean is_selected, java.awt.Color color)
drawGene
in class GenomicViewBase
g
- Graphics contextM
- The gene to be drawncolor
- The color of the gene marker.protected void drawMarkers(java.awt.Graphics g)
drawMarkers
in class GenomicViewBase
protected void drawMarker(java.awt.Graphics g, Marker marker, int column, java.awt.Rectangle rect, java.awt.Color color, boolean is_selected, java.awt.Color selected_color)
drawMarker
in class GenomicViewBase
g
- marker
- column
- The column index (0..n-1)width
- The (line) width of the markercolor
- Colorshow_band
- Shows a band across the ideogramband_color
- Color of the bandprotected void drawMarkerInterval(java.awt.Graphics g, Marker marker, int column, java.awt.Rectangle rect, boolean is_selected, java.awt.Color selected_color)
protected void drawSummary(java.awt.Graphics g, Marker marker, int column, java.awt.Color color, double max_coverage, int max_variants)
g
- graphics context o draw inmarker
- marker to drawcolumn
- The column index (0..n-1)width
- The (line) width of the markercolor
- color to usemax_scale
- max scale for coveragemax_read_lenght
- max read lenght for annotations scalingprotected void drawSummaryInterval(java.awt.Graphics g, int column, Marker marker, boolean bLeft, java.awt.Color color, double max_coverage, int max_variants)
protected void drawSummaryRegion(java.awt.Graphics2D g2d, java.awt.Shape min_polygon, int[] x_coord, int[] y_coord, java.awt.Color min_max_color, java.awt.Color avg_color)
protected void drawVariant(java.awt.Graphics g, Marker marker, int track, java.awt.Rectangle rect)
g
- marker
- track
- rect
- protected boolean prepareDrawVariant(java.awt.Graphics g, Marker marker)
g
- marker
- protected void drawVariantInterval(java.awt.Graphics2D g, Marker marker, int track, java.awt.Rectangle rect, VariableResolutionDataSetValues min_max_values)
protected void drawModification(java.awt.Graphics g, Marker marker, int column, java.awt.Rectangle rect)
g
- marker
- column
- rect
- protected void drawModificationInterval(java.awt.Graphics2D g, Marker marker, int column, java.awt.Rectangle rect, VariableResolutionDataSetValues min_max_values)
g
- column
- marker
- is_selected
- selected_color
- max_coverage
- max_variants
- max_ipd_fwd
- max_ipd_rev
- protected void drawHeaderFooter(java.awt.Graphics g)
drawHeaderFooter
in class GenomicViewBase
public java.lang.String getPanelTitle(boolean bLong)
bLong
- protected void paintLegendBackground(java.awt.Graphics g, int x, int y, int w, int h)
g
- x
- y
- w
- h
- protected void drawTrackMetricLabel(java.awt.Graphics g, int y_offset, int vertical_height, double delta_extent, java.lang.String metric)
g
- min
- max
- y_offset
- vertical_height
- delta_extent
- metric
- format_as_int
- protected void drawMinMaxLabel(java.awt.Graphics g, double min, double max, int y_offset, int vertical_height, double delta_extent, java.lang.String metric, boolean bLog10)
g
- min
- max
- y_offset
- vertical_height
- delta_extent
- metric
- format_as_int
- protected void drawAxisHeaderlabel(java.awt.Graphics g, double value, int half_char_width, int y_offset, boolean format_as_int)
protected void drawInfoLabel(java.awt.Graphics g, java.lang.String label, int y_offset)
protected void drawInfoLabelJustified(java.awt.Graphics g, java.lang.String label, int y_offset, int justification)
g
- label
- y_offset
- justification
- protected java.lang.String autofitLabelWidth(java.awt.Graphics g, java.lang.String label)
g
- label
- protected void drawLabelWithOffsetAndWidth(java.awt.Graphics g, java.lang.String label, int x, int y, int width)
g
- label
- x
- y
- width
- public int print(java.awt.Graphics graphics, java.awt.print.PageFormat pageFormat, int pageIndex) throws java.awt.print.PrinterException
print
in interface java.awt.print.Printable
java.awt.print.PrinterException
public java.awt.Dimension updateSize(boolean repaint, boolean revalidate)
updateSize
in class GenomicViewData
protected double getMaxMagnification()
protected double getMinMagnification()
public java.awt.Dimension setMagnificationScaleFactor(double sx, double sy)
public int xCoordToTrackIndex(int x)
x
- public int trackIndexToXCoord(int track_index)
track_index
- public int trackToYCoord(int track_index)
track_index
- public int yCoordToTrackIndex(int y)
y
- public int yCoordToMarkerCollectionIndex(int y)
y
- public int yCoordToMarkerCollectionIndexNew(int y)
public int yCoordToMarkerCollectionIndexOrg(int y)
y
- protected void paintActiveBorder(java.awt.Graphics g)
g
- public int BaseToXCoord(long pos)
pos
- public int BaseRangeToXExtent(double range)
pos
- public long XCoordToBase(int x)
x
- public int BaseToYCoord(long pos)
pos
- public long YCoordToBase(int y)
y
- public void invalidatePaintBuffer()
protected int scaleX(int x)
protected int scaleY(int y)
protected int getExtraRefTrackDistance()
public int getNumLeft()
public int getNumRight()
protected boolean showDataLabels()
public java.awt.Color getSelectedRangeColor()
protected void drawRotatedLabel(java.lang.String text, java.awt.Graphics g, java.awt.Color color, int x, int y, double dAngle)
text
- g
- color
- x
- y
- dAngle
- protected void drawHorizontalTracksHeader(java.awt.Graphics g)
Copyright © 2010-2014 Pacific Biosciences. All Rights Reserved.