|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Panel | +--AFLPgui.Thumbnail
This class displays thumbnails for a bin. A thumbnail is a trace of
a lane, but the trace is not the full trace. Instead, it is only the
portion of the lane that is included in the bin. Each thumbnail shows
the lane number and the scoring label as well as the trace. The
thumbnails have a set width. The width of the display area is set
not to exceed the the size avaiable. If all of the thumbnails do not
fit on one row, another row will be made. There is no limit on the
number of rows. A CutoffSlider
is provided to adjust
the cutoff levels. Buttons allow the user to move to the next or previous
bin, as well as add a cutoff level and show a dialog to manipulate the
cutoffs. A button also changes the scoring to the opposite of it's current
setting. This is useful if one has two parents, and wants to keep the
scoring consistant. The class can be drawn to a printer page by
setting the width with setViewWidth
and paint
.
The paint method will recognize the print request and behave appropriately.
Normally the display is double-buffered, but this is disabled when
drawing to a printed page (PrinteGraphics
). The scoring can
also be adjusted manually by clicking on the trace.
CutoffSlider
, Serialized FormInner classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Field Summary | |
static int |
BLANK
|
static int |
TRACE
|
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
Thumbnail(DataList lanes,
DataList bins,
java.awt.Frame parentWindow)
Creates thumbnails with the specified parameters. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
Handles the buttons in the button bar. |
void |
drawTrace(java.awt.Graphics g,
Lane lane,
int x,
int y)
Draws the trace portion of the thumbnail. |
int |
findPositionInfo(int x,
int y)
Gives the size and intensity for the given point. |
Bin |
getBin()
Gives the bin displayed. |
ButtonBar |
getButtonBar()
Gives the ButtonBar associated with the thumbnails. |
Bar |
getInfoBar()
Returns a bar that displays information about the thumbnails. |
DataList |
getLanes()
Gives the lanes that are being displayed. |
java.awt.Dimension |
getThumbnailSize()
Gives the size of an individual thumbnail, including the border around it. |
protected void |
handleScoreError(ScoringFailure error)
Shows an options dialog if an error occurs when scoring a bin. |
void |
init()
Performs calculations neccessary to display the thumbnails. |
void |
mouseClicked(java.awt.event.MouseEvent e)
Adjusts the scoring for a lane if the mouse is over the trace. |
void |
mouseDragged(java.awt.event.MouseEvent e)
Refreshes the display if the mouse is on the slider. |
void |
mouseEntered(java.awt.event.MouseEvent e)
Unused |
void |
mouseExited(java.awt.event.MouseEvent e)
Unused |
void |
mouseMoved(java.awt.event.MouseEvent e)
Determines what the mouse is over and displays info in the info bar. |
void |
mousePressed(java.awt.event.MouseEvent e)
Unused |
void |
mouseReleased(java.awt.event.MouseEvent e)
Rescores the bin if the mouse was on the slider. |
void |
paint(java.awt.Graphics g)
Draws the thumbnails. |
void |
refresh()
Updates the display so that it matches the data, which may have changed. |
void |
setBin(Bin b)
Sets the bin for the thumbnails to the specified one. |
void |
setBinList(DataList bins)
Sets the bins for the thumbnail. |
void |
setLanes(DataList lanes)
Sets the lanes for which to display thumbnails to the specified value. |
void |
setViewWidth(int width)
Sets the width of the display area. |
void |
update(java.awt.Graphics g)
Updates the display and is called by java. |
Methods inherited from class java.awt.Panel |
addNotify, getAccessibleContext |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int BLANK
public static final int TRACE
Constructor Detail |
public Thumbnail(DataList lanes, DataList bins, java.awt.Frame parentWindow)
lanes
- the lanes to produce thumbnails forbins
- the bins defined in the gel.parentWindow
- a windows used as the owner of various dialog boxes.Method Detail |
public void init()
public void paint(java.awt.Graphics g)
PrintGraphics
is supplied. Normally
the display is double-buffered, but not when drawing to a printer page.paint
in class java.awt.Container
public void drawTrace(java.awt.Graphics g, Lane lane, int x, int y)
inti
. The trace will be drawn in the same color
as the signal for the lane. It also draws the border box and
adds the lane number and score label for the lane to the top
of the box, as well as the cutoff for the lane. If the cutoff is
a line (type LinearCutoff
then a straight line is
drawn. Otherwise, the CutoffFunction is drawn by playing connect
the dots.g
- the graphics to draw onlane
- the lane to display in the thumbnailx
- the top-left position of the thumbnail.y
- the top left position of the thumbnail.public void update(java.awt.Graphics g)
update
in class java.awt.Container
public ButtonBar getButtonBar()
protected void handleScoreError(ScoringFailure error)
error
- the orignal failurepublic Bar getInfoBar()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void setLanes(DataList lanes)
lanes
- a list of lanes to display.public DataList getLanes()
setLanes(AFLPcore.DataList)
public void setViewWidth(int width)
width
- the width of the page.public void setBin(Bin b)
b
- the bin whose thumbnails to dislay.public Bin getBin()
public java.awt.Dimension getThumbnailSize()
public void setBinList(DataList bins)
bins
- the bins in the gelpublic int findPositionInfo(int x, int y)
x
- the x-coordinate of the point.y
- the y-coordinate of the point.BLANK
or
TRACE
, which are constants declared in this class.public void refresh()
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |