|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Canvas
|
+--AFLPgui.GelView
Displays the gel as an image and provides the methods used to allow user interaction with the gel, such as placing bins and zooming. It also lets the user adjust the size range displayed and the intensity of the image. The class will resize itself to contain the whole gel image, so the parent should accomadate these changes.
| Inner classes inherited from class java.awt.Canvas |
java.awt.Canvas.AccessibleAWTCanvas |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| 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 | |
GelView(Gel gel,
java.awt.Frame topWindow)
Creates a new viewable object of the specified gel |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
Deal with action events. |
void |
drawBins(java.awt.Graphics g)
Draws all the bins in the gel onto the specified graphics object. |
void |
drawLaneHeaders(java.awt.Graphics g)
Draws the headers for the lanes, (the little grey tabs at the top of the gel). |
void |
finalize()
Cleans up before this class is disposed off. |
int |
findLaneAt(int pos)
Gives the position in the gel of the lane at the given size. |
double |
findSizeAt(int pos)
Calculates the size in bp that corresponds to the screen location given. |
ButtonBar |
getButtonBar()
Gives the button bar that should be used with this object. |
Bin |
getCurrentBin()
Gives the bin that is currently selected on the gel. |
Bar |
getInfoBar()
Returns a bar that displays information about the gel. |
boolean |
isSizeSet()
|
void |
itemStateChanged(java.awt.event.ItemEvent e)
Handle events for the choice box, which adjusts the zoom. |
void |
keyPressed(java.awt.event.KeyEvent e)
Unused |
void |
keyReleased(java.awt.event.KeyEvent e)
Watches for the enter key to be pushed in a text field, and then refreshes the gel when it is. |
void |
keyTyped(java.awt.event.KeyEvent e)
Unused |
void |
mouseClicked(java.awt.event.MouseEvent e)
Handle the click of the mouse. |
void |
mouseDragged(java.awt.event.MouseEvent e)
Handle the dragging of the mouse. |
void |
mouseEntered(java.awt.event.MouseEvent e)
Don't care about this event. |
void |
mouseExited(java.awt.event.MouseEvent e)
Don't care about this event. |
void |
mouseMoved(java.awt.event.MouseEvent e)
Handle moving the mouse. |
int |
mouseOverType(int x,
int y)
Determines what the mouse is pointing to. |
void |
mousePressed(java.awt.event.MouseEvent e)
Handle the event of the mouse button being pressed. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Handle the event of the mouse button being released. |
void |
paint(java.awt.Graphics g)
Manages the display area and is called automatically when needed. |
void |
rebuild()
Recreates the gel image from the data. |
void |
refresh(boolean rebuildGel)
Called when the image on screen should be redrawn. |
void |
setCurrentBin(Bin bin)
Sets the selection to the specified bin. |
void |
setGelLength(int length)
Set the length of the gel image to the specified value. |
void |
setGelSizeToMax(int laneNum)
|
void |
syncDisplay()
|
void |
update(java.awt.Graphics g)
Called when the screen needs to be updated. |
| Methods inherited from class java.awt.Canvas |
addNotify, getAccessibleContext |
| 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, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, validate |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public GelView(Gel gel,
java.awt.Frame topWindow)
gel - the gel to be displayed and manipulated| Method Detail |
public void syncDisplay()
public boolean isSizeSet()
public void setGelSizeToMax(int laneNum)
public void paint(java.awt.Graphics g)
refresh should be called. It will determine what action
to take. Paint will only display the image of the gel known to this
class, which may have to be rebuilt. The paint method makes use of
double buffering to speed the display.paint in class java.awt.Canvasrefresh(boolean)public void drawBins(java.awt.Graphics g)
g - the graphics object to draw topublic void drawLaneHeaders(java.awt.Graphics g)
g - the graphics object to draw on.public void update(java.awt.Graphics g)
update in class java.awt.Componentpublic ButtonBar getButtonBar()
public Bar getInfoBar()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged in interface java.awt.event.ItemListenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mouseOverType method. The type the mouse is
currently over is stored in an instance variable and is updated whenever
the mouse moves.mousePressed in interface java.awt.event.MouseListenermouseOverType(int, int)public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenermouseOverType(int, int)public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseOverType method, and then displaying the appropriate
information.mouseMoved in interface java.awt.event.MouseMotionListenermouseOverType(int, int)
public int mouseOverType(int x,
int y)
x - the x coordinate of the mouse, relative to this component.y - the y coordinate of the mouse, relative to this component.public void keyReleased(java.awt.event.KeyEvent e)
keyReleased in interface java.awt.event.KeyListenerpublic double findSizeAt(int pos)
pos - the verticle position to calculate the size in bp forpublic int findLaneAt(int pos)
public void refresh(boolean rebuildGel)
rebuildGel - if this is true, then the gel image will be
recreated from the data in the gel, using the current
gel settings.Gelpublic void rebuild()
public Bin getCurrentBin()
public void setCurrentBin(Bin bin)
bin - the bin to highlight as selected.public void setGelLength(int length)
length - the length in pixels.
public void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable - something bad happened.public void keyPressed(java.awt.event.KeyEvent e)
keyPressed in interface java.awt.event.KeyListenerpublic void keyTyped(java.awt.event.KeyEvent e)
keyTyped in interface java.awt.event.KeyListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||