|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectapollo.gui.genomemap.LinearView
public abstract class LinearView
A basic, non useful, implementation of the LinearViewI interface.
| Field Summary | |
|---|---|
protected javax.swing.JComponent |
apollo_panel
|
protected java.awt.Color |
backgroundColour
|
protected boolean |
debug
|
protected java.awt.Color |
foregroundColour
|
protected java.awt.Graphics |
graphics
|
protected boolean |
limitsSet
|
protected static org.apache.log4j.Logger |
logger
|
protected Transformer |
transformer
|
protected boolean |
transparent
|
protected java.awt.Rectangle |
viewBounds
|
protected java.util.List<VisibilityListener> |
visibilityListeners
|
protected boolean |
visible
|
| Fields inherited from interface apollo.gui.genomemap.ViewI |
|---|
LEFTSIDE, NONE, RIGHTSIDE |
| Constructor Summary | |
|---|---|
LinearView(javax.swing.JComponent ap,
java.lang.String name,
boolean visible)
|
|
| Method Summary | |
|---|---|
void |
addViewListener(ViewListener l)
Add a View event listener |
void |
addVisibilityListener(VisibilityListener l)
|
boolean |
areLimitsSet()
|
void |
clear()
|
void |
fireViewEvent(ViewEvent evt)
|
java.awt.Color |
getBackgroundColour()
|
java.awt.Rectangle |
getBounds()
Get the coordinates of the rectangle containing the View. |
int |
getCentre()
Get the maximum limit. |
javax.swing.JComponent |
getComponent()
LinearViews components that are part of an ApolloPanel which is a JComponent |
java.awt.Rectangle |
getDrawBounds()
|
java.awt.Color |
getForegroundColour()
|
java.awt.Graphics |
getGraphics()
|
int[] |
getLimits()
Limits not necasarily equal to seq start and end, Component.syncViewLimits pads out the limits beyond sequence |
int |
getMaximum()
Get the maximum limit. |
int |
getMinimum()
Get the minimum limit. |
java.lang.String |
getName()
Returns the name of the view. |
java.awt.Rectangle |
getPreferredSize()
Get the preferred size for the view |
protected java.awt.Rectangle |
getSelectionRectangle(java.awt.Point pnt)
|
int |
getStrand()
|
Transformer |
getTransform()
Get the tranform object to convert between View and component coordinates. |
int[] |
getVisibleRange()
visible range in base pairs |
protected void |
init(javax.swing.JComponent ap,
java.lang.String name,
boolean visible)
|
boolean |
isInvalid()
Get a flag indicating whether the view is invalid |
boolean |
isTransparent()
|
boolean |
isVisible()
return whether or not a view is visible |
void |
paintView()
paintView draws a cross in the centre of the View and a small cross in the upper left quadrant |
void |
setBackgroundColour(java.awt.Color colour)
|
void |
setBounds(java.awt.Rectangle rect)
Set the coordinates of the rectangle containing the View. |
void |
setCentre(int centre)
Set the centre position. |
void |
setComponent(javax.swing.JComponent ap)
Set the component the view belongs to. |
void |
setDebug(boolean state)
|
void |
setDrawBounds(java.awt.Rectangle rect)
|
void |
setForegroundColour(java.awt.Color colour)
|
void |
setGraphics(java.awt.Graphics graphics)
Set the Graphics to draw to. |
void |
setInvalidity(boolean state)
Set a flag indicating whether the view is currently invalid |
void |
setLimits(int[] limits)
Sets the minimum and maximum limits for the extent |
void |
setLimitsSet(boolean state)
|
void |
setMaximum(int max)
Sets the maximum limit for the extent |
void |
setMinimum(int min)
Sets the minimum limit for the extent |
void |
setName(java.lang.String name)
Sets the name of the view |
void |
setStrand(int strand)
I moved strand from FeatureView to here, because scrolling is different on reverse strand than forward strand. |
void |
setTransform(Transformer transformer)
|
void |
setTransparent(boolean state)
|
void |
setVisible(boolean state)
Set whether or not a view is visible |
void |
setVisible(boolean state,
boolean remove)
|
void |
setZoomFactor(double factor)
Set the ZoomFactor along the linear axis |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.log4j.Logger logger
protected javax.swing.JComponent apollo_panel
protected Transformer transformer
protected java.awt.Graphics graphics
protected java.awt.Color backgroundColour
protected java.awt.Color foregroundColour
protected java.awt.Rectangle viewBounds
protected boolean visible
protected boolean debug
protected boolean limitsSet
protected boolean transparent
protected java.util.List<VisibilityListener> visibilityListeners
| Constructor Detail |
|---|
public LinearView(javax.swing.JComponent ap,
java.lang.String name,
boolean visible)
| Method Detail |
|---|
protected void init(javax.swing.JComponent ap,
java.lang.String name,
boolean visible)
public void setComponent(javax.swing.JComponent ap)
ViewI
setComponent in interface ViewIpublic javax.swing.JComponent getComponent()
getComponent in interface ViewIpublic void setInvalidity(boolean state)
ViewI
setInvalidity in interface ViewIpublic boolean isInvalid()
ViewI
isInvalid in interface ViewIpublic void setBounds(java.awt.Rectangle rect)
ViewI
setBounds in interface ViewIrect - The rectangle describing the new bounds of the View in
parent component coordinates.public java.awt.Rectangle getBounds()
ViewI
getBounds in interface ViewIpublic java.awt.Rectangle getDrawBounds()
public void setDrawBounds(java.awt.Rectangle rect)
public void setName(java.lang.String name)
ViewI
setName in interface ViewIname - The name of the view.public java.lang.String getName()
ViewI
getName in interface ViewIpublic void setGraphics(java.awt.Graphics graphics)
ViewI
setGraphics in interface ViewIgraphics - The new graphics to draw to. This will usually be the Graphics for the
containing component (or for its offscreen buffer).public java.awt.Graphics getGraphics()
public void paintView()
paintView in interface ViewIpublic Transformer getTransform()
ViewI
getTransform in interface ViewIpublic void setTransform(Transformer transformer)
public void setLimits(int[] limits)
ViewI
setLimits in interface ViewIpublic boolean areLimitsSet()
areLimitsSet in interface ViewIpublic void setLimitsSet(boolean state)
setLimitsSet in interface ViewIpublic void setMinimum(int min)
ViewI
setMinimum in interface ViewIpublic void setMaximum(int max)
ViewI
setMaximum in interface ViewIpublic int[] getLimits()
getLimits in interface ViewIpublic int getMaximum()
ViewI
getMaximum in interface ViewIpublic int getMinimum()
ViewI
getMinimum in interface ViewIpublic void setCentre(int centre)
ViewI
setCentre in interface ViewIpublic int getCentre()
ViewI
getCentre in interface ViewIpublic java.awt.Rectangle getPreferredSize()
ViewI
getPreferredSize in interface ViewIpublic void setZoomFactor(double factor)
ViewI
setZoomFactor in interface ViewIpublic int[] getVisibleRange()
getVisibleRange in interface ViewI
public void setVisible(boolean state,
boolean remove)
public void setVisible(boolean state)
ViewI
setVisible in interface ViewIpublic boolean isVisible()
ViewI
isVisible in interface ViewIpublic void setDebug(boolean state)
public void addViewListener(ViewListener l)
ViewI
addViewListener in interface ViewIpublic void fireViewEvent(ViewEvent evt)
public void setBackgroundColour(java.awt.Color colour)
public java.awt.Color getBackgroundColour()
public void setForegroundColour(java.awt.Color colour)
public java.awt.Color getForegroundColour()
public void setTransparent(boolean state)
setTransparent in interface ViewIpublic boolean isTransparent()
isTransparent in interface ViewIpublic void clear()
clear in interface ViewIpublic void setStrand(int strand)
public int getStrand()
protected java.awt.Rectangle getSelectionRectangle(java.awt.Point pnt)
public void addVisibilityListener(VisibilityListener l)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||