apollo.gui.genomemap
Class ScaleView
java.lang.Object
apollo.gui.genomemap.LinearView
apollo.gui.genomemap.ScrollAdjustedView
apollo.gui.genomemap.ScaleView
- All Implemented Interfaces:
- PickViewI, PopupViewI, ViewI
public class ScaleView
- extends ScrollAdjustedView
- implements PopupViewI, PickViewI
Draw a scale line, BUT also draws sequence, and allows dragging of hairpins.
I think it would be easier if pixels were used instead of user coords in
the vertical direction
| Fields inherited from class apollo.gui.genomemap.LinearView |
apollo_panel, backgroundColour, debug, foregroundColour, graphics, limitsSet, transformer, transparent, viewBounds, visibilityListeners, visible |
|
Constructor Summary |
ScaleView(javax.swing.JComponent ap,
java.lang.String name)
|
|
Method Summary |
void |
addCutSites(java.util.Vector forward_sites,
java.util.Vector reverse_sites,
java.awt.Color site_color)
|
void |
clear()
|
void |
clearCutSites()
|
protected void |
drawSpliceBases(java.awt.Graphics graphics,
Transformer transformer,
int startCoord,
int endCoord,
java.lang.String seq,
int offset,
int viewY,
int strand)
|
protected void |
drawSpliceLines(java.awt.Graphics graphics,
Transformer transformer,
int startCoord,
int endCoord,
java.lang.String seq,
int strand)
|
Selection |
findFeaturesForSelection(java.awt.Point p,
boolean selectParents)
Find features for selection. |
Selection |
findFeaturesForSelection(java.awt.Rectangle rect)
Triggered by rubberbanding. |
javax.swing.Action |
getColouringAction()
|
java.awt.Rectangle |
getSelectedRectangle()
|
protected java.awt.Color |
getSpliceColor(java.awt.Graphics graphics,
int i,
int startCoord,
int endCoord,
java.lang.String seq,
int strand,
java.awt.Color prior_color)
|
void |
paintView()
paintView draws a cross in the centre of the View
and a small cross in the upper left quadrant |
void |
select(Selection selection)
|
void |
setCurationSet(CurationSet set)
This gets set to null by szap.getClearData to clear out old cur set on
loads. |
void |
setMinorTicks(boolean state)
|
void |
setSelectedRange(int startBase,
int endBase,
int strand)
|
void |
showPopupMenu(java.awt.event.MouseEvent evt)
|
| Methods inherited from class apollo.gui.genomemap.LinearView |
addViewListener, addVisibilityListener, areLimitsSet, fireViewEvent, getBackgroundColour, getBounds, getCentre, getComponent, getDrawBounds, getForegroundColour, getGraphics, getLimits, getMaximum, getMinimum, getName, getSelectionRectangle, getStrand, getTransform, getVisibleRange, init, isInvalid, isTransparent, isVisible, setBackgroundColour, setBounds, setCentre, setComponent, setDebug, setForegroundColour, setGraphics, setInvalidity, setLimits, setLimitsSet, setMaximum, setMinimum, setName, setStrand, setTransform, setTransparent, setVisible, setVisible, setZoomFactor |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface apollo.gui.genomemap.ViewI |
addViewListener, areLimitsSet, getBounds, getCentre, getComponent, getLimits, getMaximum, getMinimum, getName, getPreferredSize, getTransform, getVisibleRange, isInvalid, isTransparent, isVisible, setBounds, setCentre, setComponent, setGraphics, setInvalidity, setLimits, setLimitsSet, setMaximum, setMinimum, setName, setTransparent, setVisible, setZoomFactor |
logger
protected static final org.apache.log4j.Logger logger
SPLICE
public static final int SPLICE
- See Also:
- Constant Field Values
FEATURES
public static final int FEATURES
- See Also:
- Constant Field Values
ScaleView
public ScaleView(javax.swing.JComponent ap,
java.lang.String name)
setCurationSet
public void setCurationSet(CurationSet set)
- This gets set to null by szap.getClearData to clear out old cur set on
loads. All drawing access to curation set has to check for null curation
set on every use of curation set, because they are on 2 different
threads, curation set could be nulled at anytime during draw. An
alternative would be to have this spin if in the middle of the draw but
the funny thing there is you are then delaying the load in order to draw
the scale view of the old cur set you dont care about anymore - so the
null checks dont delay the load
setMinorTicks
public void setMinorTicks(boolean state)
setSelectedRange
public void setSelectedRange(int startBase,
int endBase,
int strand)
clear
public void clear()
- Specified by:
clear in interface ViewI- Overrides:
clear in class LinearView
getSelectedRectangle
public java.awt.Rectangle getSelectedRectangle()
paintView
public void paintView()
- Description copied from class:
LinearView
- paintView draws a cross in the centre of the View
and a small cross in the upper left quadrant
- Specified by:
paintView in interface ViewI- Overrides:
paintView in class LinearView
clearCutSites
public void clearCutSites()
addCutSites
public void addCutSites(java.util.Vector forward_sites,
java.util.Vector reverse_sites,
java.awt.Color site_color)
drawSpliceBases
protected void drawSpliceBases(java.awt.Graphics graphics,
Transformer transformer,
int startCoord,
int endCoord,
java.lang.String seq,
int offset,
int viewY,
int strand)
drawSpliceLines
protected void drawSpliceLines(java.awt.Graphics graphics,
Transformer transformer,
int startCoord,
int endCoord,
java.lang.String seq,
int strand)
getSpliceColor
protected java.awt.Color getSpliceColor(java.awt.Graphics graphics,
int i,
int startCoord,
int endCoord,
java.lang.String seq,
int strand,
java.awt.Color prior_color)
select
public void select(Selection selection)
showPopupMenu
public void showPopupMenu(java.awt.event.MouseEvent evt)
- Specified by:
showPopupMenu in interface PopupViewI
getColouringAction
public javax.swing.Action getColouringAction()
findFeaturesForSelection
public Selection findFeaturesForSelection(java.awt.Rectangle rect)
- Triggered by rubberbanding. Find and remember region that was selected
by rubberbanding at the axis.
This shouldn't trigger when we rubberband in some other view, yet it is.
- Specified by:
findFeaturesForSelection in interface PickViewI
findFeaturesForSelection
public Selection findFeaturesForSelection(java.awt.Point p,
boolean selectParents)
- Description copied from interface:
PickViewI
- Find features for selection. Returns selection with SelectionItems that have
model as data and drawables as listeners. This replaces findFeatures that only
returned model, the problem there being we then would hafta refind the drawables
later on which was awkward and inefficient.
If selectParents is true then return the parents of the features under the point.
- Specified by:
findFeaturesForSelection in interface PickViewI