|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectapollo.gui.genomemap.LinearView
apollo.gui.genomemap.ManagedView
apollo.gui.genomemap.TierView
apollo.gui.genomemap.FeatureView
public abstract class FeatureView
FeatureView is a View for displaying DrawableSeqFeatures and DrawableFeatureSets (and maybe other Drawables), in linear tiers. It uses a FeatureTierManager to control the layout, and a Transformer for pixel to Base coord transforms. It can have a vertical scrollbar for scrolling tiers. It can do drag and drop.
| Field Summary | |
|---|---|
protected DrawableSetI |
dfset
|
protected java.util.Vector |
drawables
|
protected java.awt.Dimension |
pickSize
|
| Fields inherited from class apollo.gui.genomemap.TierView |
|---|
controller, dragSources, rightSide, selectionManager, vScroll, vscrollable |
| Fields inherited from class apollo.gui.genomemap.ManagedView |
|---|
dropSpaceSize, leadSpaceSize, logger, manager, visibleDrawables |
| Fields inherited from class apollo.gui.genomemap.LinearView |
|---|
apollo_panel, backgroundColour, debug, foregroundColour, graphics, limitsSet, transformer, transparent, viewBounds, visibilityListeners, visible |
| Fields inherited from interface apollo.gui.genomemap.ViewI |
|---|
LEFTSIDE, NONE, RIGHTSIDE |
| Constructor Summary | |
|---|---|
FeatureView(javax.swing.JComponent ap,
java.lang.String name,
SelectionManager selectionManager)
|
|
| Method Summary | |
|---|---|
boolean |
beginTierDrag(java.awt.event.MouseEvent evt)
Start a tier drag |
void |
clear()
sets internal vars to null: fset, dfset, visibleDrawables, graphics should it set them to empty vectors instead of null? T |
protected void |
clear(boolean justFeatures)
|
void |
clearEdges()
|
void |
clearFeatures()
just clears out features from view |
void |
clearHighlights()
|
protected abstract javax.swing.JPopupMenu |
createPopupMenu(ApolloPanelI ap,
java.awt.event.MouseEvent evt)
This is overridden by ResultView and AnnotView - make abstract? |
protected void |
drawDragRectangle(java.awt.Graphics g)
|
void |
endTierDrag(java.awt.event.MouseEvent evt)
end a tier drag |
void |
finalize()
|
protected java.util.Vector |
findDrawables(java.awt.Rectangle rect,
boolean selected_only)
returns a Vector of Drawable instances that overlap the area of the rectangle passed in The selected_only is ignored: first check children (if its a feature set), if no children hit check self this follows the old logic and you dont have to make 2 calls one with setFlag=false and if that didnt hit then with setFlag=false This is the only way i have seen this used so it seems ok to change. |
protected Selection |
findFeaturesForSelection(java.awt.Rectangle r,
boolean selectParents)
From PickViewI - |
DrawableSetI |
getDrawableSet()
Returns the DrawableFeatureSet that is the top(holder) of all the drawables in the view |
java.awt.Rectangle |
getPreferredSize()
This only sets the height to a sensible value. |
protected int |
getTierYCentre(Drawable dsf)
|
FeatureSetI |
getTopModel()
Returns the topmost model object of the result view, the FeatureSet that holds all of the tiers, (just dfset.getFeatureSet()) |
Selection |
getViewSelection(Selection selection)
given the entirety of what is currently selected, remove anything that doesn't belong to this view and return the remaining selections. |
protected boolean |
needsTextAvoidUpdate()
|
void |
paintView()
Just repaints scrollbars |
protected void |
putScrollAtStart()
double-check that the feature sets have been initialized |
void |
select(Selection selection)
Find the drawables in this view associated with the model in selection and select them. |
void |
setBounds(java.awt.Rectangle bounds)
Set the coordinates of the rectangle containing the View. |
void |
setCentre(int Position)
Set the centre position. |
void |
setDrawableSet(DrawableSetI dfset)
Expects a DrawableFeatureSet (which is a FeatureSetI) |
void |
setMatchingEdges(int[] edges,
boolean state)
|
void |
setTextAvoidance(boolean state)
|
void |
setXOrientation(int direction)
|
void |
setZoomFactor(double factor)
Set the ZoomFactor along the linear axis |
void |
showPopupMenu(java.awt.event.MouseEvent evt)
|
void |
updateTierDrag(java.awt.event.MouseEvent evt)
continue a tier drag |
void |
verticalScrollToSelection()
SelectViewI? |
void |
verticalScrollToSelection(java.util.Vector selectedDrawables)
Scroll to the Selection - move this to FeatureView? |
| Methods inherited from class apollo.gui.genomemap.ManagedView |
|---|
getDropSpaceSize, getLeadSpaceSize, getTierManager, getVisibleDrawables, getYRange, paintDrawables, setDropSpaceSize, setLeadSpaceSize, setTierManager |
| 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, setComponent, setDebug, setDrawBounds, setForegroundColour, setGraphics, setInvalidity, setLimits, setLimitsSet, setMaximum, setMinimum, setName, setStrand, setTransform, setTransparent, setVisible |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface apollo.gui.genomemap.TierViewI |
|---|
allowsTierDrags, createDragView, decrementTierHeight, getLowestVisibleTier, getVisibleDrawables, incrementTierHeight, setLowestVisibleTier |
| Methods inherited from interface apollo.gui.genomemap.ManagedViewI |
|---|
getTierManager, setTierManager |
| Methods inherited from interface apollo.gui.genomemap.ViewI |
|---|
addViewListener, areLimitsSet, getBounds, getCentre, getComponent, getLimits, getMaximum, getMinimum, getName, getTransform, getVisibleRange, isInvalid, isTransparent, isVisible, setComponent, setGraphics, setInvalidity, setLimits, setLimitsSet, setMaximum, setMinimum, setName, setTransparent, setVisible |
| Field Detail |
|---|
protected java.awt.Dimension pickSize
protected DrawableSetI dfset
protected java.util.Vector drawables
| Constructor Detail |
|---|
public FeatureView(javax.swing.JComponent ap,
java.lang.String name,
SelectionManager selectionManager)
| Method Detail |
|---|
public void paintView()
TierView
paintView in interface ViewIpaintView in class TierViewprotected void drawDragRectangle(java.awt.Graphics g)
public boolean beginTierDrag(java.awt.event.MouseEvent evt)
TierViewI
beginTierDrag in interface TierViewIbeginTierDrag in class TierViewpublic void updateTierDrag(java.awt.event.MouseEvent evt)
TierViewI
updateTierDrag in interface TierViewIupdateTierDrag in class TierViewpublic void endTierDrag(java.awt.event.MouseEvent evt)
TierViewI
endTierDrag in interface TierViewIendTierDrag in class TierView
protected Selection findFeaturesForSelection(java.awt.Rectangle r,
boolean selectParents)
findFeaturesForSelection in class TierView
protected java.util.Vector findDrawables(java.awt.Rectangle rect,
boolean selected_only)
findDrawables in class TierViewpublic DrawableSetI getDrawableSet()
public FeatureSetI getTopModel()
public void setDrawableSet(DrawableSetI dfset)
public void setMatchingEdges(int[] edges,
boolean state)
public void setXOrientation(int direction)
setXOrientation in class ManagedViewpublic void clearEdges()
public void clearHighlights()
public void select(Selection selection)
select in interface SelectViewIpublic void verticalScrollToSelection()
verticalScrollToSelection in interface SelectViewIpublic void verticalScrollToSelection(java.util.Vector selectedDrawables)
protected int getTierYCentre(Drawable dsf)
public void setCentre(int Position)
ViewI
setCentre in interface ViewIsetCentre in class LinearViewpublic void setBounds(java.awt.Rectangle bounds)
ViewI
setBounds in interface ViewIsetBounds in class ManagedViewbounds - The rectangle describing the new bounds of the View in
parent component coordinates.public void setZoomFactor(double factor)
ViewI
setZoomFactor in interface ViewIsetZoomFactor in class LinearViewpublic java.awt.Rectangle getPreferredSize()
getPreferredSize in interface ViewIgetPreferredSize in class LinearViewpublic void finalize()
finalize in class java.lang.Objectpublic void clear()
clear in interface ViewIclear in class TierViewpublic void clearFeatures()
protected void clear(boolean justFeatures)
public void setTextAvoidance(boolean state)
protected boolean needsTextAvoidUpdate()
protected abstract javax.swing.JPopupMenu createPopupMenu(ApolloPanelI ap,
java.awt.event.MouseEvent evt)
public void showPopupMenu(java.awt.event.MouseEvent evt)
showPopupMenu in interface PopupViewIpublic Selection getViewSelection(Selection selection)
getViewSelection in interface TierViewIgetViewSelection in class TierViewprotected void putScrollAtStart()
putScrollAtStart in class TierView
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||