org.concord.biologica.ui
Class DNAView

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--org.concord.biologica.ui.UIView
                          |
                          +--org.concord.biologica.ui.DNAView
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.AdjustmentListener, javax.swing.event.ChangeListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.event.KeyListener, java.awt.MenuContainer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.beans.PropertyChangeListener, java.io.Serializable

public final class DNAView
extends UIView
implements java.awt.image.ImageObserver, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.beans.PropertyChangeListener, java.awt.event.AdjustmentListener, javax.swing.event.ChangeListener, java.awt.event.ActionListener, java.awt.event.KeyListener

The chromosome view of BioLogica.

An object of this class will generate the following property change events:

Version:
$Revision: 1.2 $ $Date: 2001/06/12 15:30:04 $
Author:
$Author: ed $
See Also:
UIProp.APPLY_BUTTON_PUSHED, UIProp.DEFER_APPLY, UIProp.DEFER_REVERT, UIProp.ORGANISM_ALLELE, UIProp.ORGANISM_ALLELE_PAIR, UIProp.REVERT_BUTTON_PUSHED, UIProp.SELECTED_BASES, PropertyChangeListener, Serialized Form

Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
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 BOTTOM_ALLELE
           
protected  java.awt.Color cursorColor
          Cursor color
protected  java.awt.Color differentBaseColor
          Different base color
static int DNA_AREA_DOUBLE_HEIGHT
           
static int DNA_AREA_GAP
           
static int DNA_AREA_LEFT
          DNA area static values, used in drawing and picking on the DNA area
static int DNA_AREA_SINGLE_HEIGHT
           
static int DNA_AREA_TOP
           
static int DNA_AREA_WIDTH
           
static int DNA_BOTTOM_STRAND
           
static int DNA_BOTTOM_STRAND_Y
           
static java.lang.String DNA_CMD_APPLY
           
static java.lang.String DNA_CMD_REVERT
           
static int DNA_CURSOR_HEIGHT
           
static int DNA_IMAGE_ARROWS_INDEX
           
static int DNA_IMAGE_AT_DARK_INDEX
           
static int DNA_IMAGE_AT_DARK_SELECTED_INDEX
           
static int DNA_IMAGE_AT_LIGHT_INDEX
           
static int DNA_IMAGE_CG_DARK_INDEX
           
static int DNA_IMAGE_CG_DARK_SELECTED_INDEX
           
static int DNA_IMAGE_CG_LIGHT_INDEX
           
static int DNA_IMAGE_GC_DARK_INDEX
           
static int DNA_IMAGE_GC_DARK_SELECTED_INDEX
           
static int DNA_IMAGE_GC_LIGHT_INDEX
           
static int DNA_IMAGE_HEIGHT
          DNA image values, used to draw base pairs
static int DNA_IMAGE_MAX_BASES
           
static int DNA_IMAGE_TA_DARK_INDEX
           
static int DNA_IMAGE_TA_DARK_SELECTED_INDEX
           
static int DNA_IMAGE_TA_LIGHT_INDEX
           
static int DNA_IMAGE_WIDTH
           
static int DNA_SCROLLBAR_AREA_OFFSET
           
static int DNA_SCROLLBAR_GARBAGE_WIDTH_IN_BASES
           
static int DNA_SCROLLBAR_HEIGHT
          Scrollbar values
static int DNA_TOP_STRAND
          Strand values
static int DNA_TOP_STRAND_Y
           
protected  java.awt.Color equalBaseColor
          Equal base color
static int TOP_ALLELE
          Top or bottom allele?
 
Fields inherited from class org.concord.biologica.ui.UIView
changes, fontAscent, fontDescent, fontHeight, fontMetrics, preferredHeight, preferredWidth, scrollPane
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
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
DNAView()
          Creates a chromosome view.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          React to actions
 void addActionListener(java.awt.event.ActionListener listener)
           
 void adjustmentValueChanged(java.awt.event.AdjustmentEvent event)
          Handle adjustment event
 void allelesEdited()
          Alleles edited
 void applyPendingChanges()
          Apply pending changes made to DNA
protected  void callActionListeners(java.awt.event.ActionEvent e)
           
 java.lang.String getAllelePendingTextSymbol(int topOrBottomAllele)
          Get the text symbol of the top or bottom allele if the pending changes are made to that allele.
 java.awt.Color getCursorColor()
          Get the cursor color
static java.awt.Color getDefaultCursorColor()
          Get the default cursor color
static java.awt.Color getDefaultDifferentBaseColor()
          Get the default different base color
static java.awt.Color getDefaultEqualBaseColor()
          Get the default equal base color
 boolean getDeferApply()
          Get the defer apply setting.
 boolean getDeferRevert()
          Get the defer revert setting.
 java.awt.Color getDifferentBaseColor()
          Get the different base color
 java.awt.Color getEqualBaseColor()
          Get the equal base color
 OrganismAllele getOrganismAllele()
          Get the shown organism allele for this view.
 OrganismAllelePair getOrganismAllelePair()
          Get the shown organism allele pair for this view.
 java.awt.Dimension getPreferredSize()
          Return the preferred size of this canvas
 boolean imageUpdate(java.awt.Image anImage, int infoFlags, int x, int y, int width, int height)
          ImageObserver method
 void keyPressed(java.awt.event.KeyEvent e)
          Handle key pressed event
 void keyReleased(java.awt.event.KeyEvent e)
          Handle key released event
 void keyTyped(java.awt.event.KeyEvent e)
          Handle key typed event
 void mouseClicked(java.awt.event.MouseEvent event)
          Handle mouse click events
 void mouseDragged(java.awt.event.MouseEvent event)
          Handle mouse dragged event
 void mouseEntered(java.awt.event.MouseEvent event)
          Handle mouse entered event
 void mouseExited(java.awt.event.MouseEvent event)
          Handle mouse exited event
 void mouseMoved(java.awt.event.MouseEvent event)
          Handle mouse moved event
 void mousePressed(java.awt.event.MouseEvent event)
          Handle mouse pressed event
 void mouseReleased(java.awt.event.MouseEvent event)
          Handle mouse released event
 void paintAllele(java.awt.Graphics g, OrganismAllele allele, OrganismAllele comparisonAllele, int xTopLeft, int yTopLeft)
          Paint a single allele
 void paintBase(java.awt.Graphics g, byte base, int xInView, int yInView, boolean inAllele, boolean selected)
          Paint a single base pair
 void paintComponent(java.awt.Graphics g)
          Draw the graphics in this view.
 void propertyChange(java.beans.PropertyChangeEvent event)
          Handle property change events
 void removeActionListener(java.awt.event.ActionListener listener)
           
 void revertPendingChanges()
          Revert pending changes to DNA
 void setApplyVisible(boolean visible)
           
 void setCursorColor(java.awt.Color aColor)
          Set the cursor color.
static void setDefaultCursorColor(java.awt.Color aColor)
          Set the default cursor color.
static void setDefaultDifferentBaseColor(java.awt.Color aColor)
          Set the default different base color.
static void setDefaultEqualBaseColor(java.awt.Color aColor)
          Set the default equal base color.
 void setDeferApply(boolean trueOrFalse)
          Set the defer apply setting.
 void setDeferRevert(boolean trueOrFalse)
          Set the defer revert setting.
 void setDifferentBaseColor(java.awt.Color aColor)
          Set the different base color.
 void setEqualBaseColor(java.awt.Color aColor)
          Set the equal base color.
 void setOrganismAllele(OrganismAllele anOrganismAllele)
          Set the shown organism allele for this view.
 void setOrganismAllelePair(OrganismAllelePair anOrganismAllelePair)
          Set the shown organism allele pair for this view.
 void setRevertVisible(boolean visible)
           
 void startMouseMotionListener(int startIndex, int endIndex)
          Start mouse motion listener given the start and end index of any current selection.
 void stateChanged(javax.swing.event.ChangeEvent event)
          Handle change event
 
Methods inherited from class org.concord.biologica.ui.UIView
addPropertyChangeListener, getLocalImage, paintBackground, removePropertyChangeListener, setBackground, setFont, setForeground, setScrollPane, toolChanged, updateFont
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DNA_CMD_APPLY

public static final java.lang.String DNA_CMD_APPLY

DNA_CMD_REVERT

public static final java.lang.String DNA_CMD_REVERT

DNA_AREA_LEFT

public static final int DNA_AREA_LEFT
DNA area static values, used in drawing and picking on the DNA area

DNA_AREA_TOP

public static final int DNA_AREA_TOP

DNA_AREA_WIDTH

public static final int DNA_AREA_WIDTH

DNA_AREA_SINGLE_HEIGHT

public static final int DNA_AREA_SINGLE_HEIGHT

DNA_AREA_DOUBLE_HEIGHT

public static final int DNA_AREA_DOUBLE_HEIGHT

DNA_AREA_GAP

public static final int DNA_AREA_GAP

DNA_IMAGE_HEIGHT

public static final int DNA_IMAGE_HEIGHT
DNA image values, used to draw base pairs

DNA_IMAGE_WIDTH

public static final int DNA_IMAGE_WIDTH

DNA_IMAGE_MAX_BASES

public static final int DNA_IMAGE_MAX_BASES

DNA_IMAGE_ARROWS_INDEX

public static final int DNA_IMAGE_ARROWS_INDEX

DNA_IMAGE_GC_DARK_INDEX

public static final int DNA_IMAGE_GC_DARK_INDEX

DNA_IMAGE_CG_DARK_INDEX

public static final int DNA_IMAGE_CG_DARK_INDEX

DNA_IMAGE_TA_DARK_INDEX

public static final int DNA_IMAGE_TA_DARK_INDEX

DNA_IMAGE_AT_DARK_INDEX

public static final int DNA_IMAGE_AT_DARK_INDEX

DNA_IMAGE_GC_LIGHT_INDEX

public static final int DNA_IMAGE_GC_LIGHT_INDEX

DNA_IMAGE_CG_LIGHT_INDEX

public static final int DNA_IMAGE_CG_LIGHT_INDEX

DNA_IMAGE_TA_LIGHT_INDEX

public static final int DNA_IMAGE_TA_LIGHT_INDEX

DNA_IMAGE_AT_LIGHT_INDEX

public static final int DNA_IMAGE_AT_LIGHT_INDEX

DNA_IMAGE_GC_DARK_SELECTED_INDEX

public static final int DNA_IMAGE_GC_DARK_SELECTED_INDEX

DNA_IMAGE_CG_DARK_SELECTED_INDEX

public static final int DNA_IMAGE_CG_DARK_SELECTED_INDEX

DNA_IMAGE_TA_DARK_SELECTED_INDEX

public static final int DNA_IMAGE_TA_DARK_SELECTED_INDEX

DNA_IMAGE_AT_DARK_SELECTED_INDEX

public static final int DNA_IMAGE_AT_DARK_SELECTED_INDEX

DNA_TOP_STRAND_Y

public static final int DNA_TOP_STRAND_Y

DNA_BOTTOM_STRAND_Y

public static final int DNA_BOTTOM_STRAND_Y

DNA_CURSOR_HEIGHT

public static final int DNA_CURSOR_HEIGHT

DNA_SCROLLBAR_HEIGHT

public static final int DNA_SCROLLBAR_HEIGHT
Scrollbar values

DNA_SCROLLBAR_AREA_OFFSET

public static final int DNA_SCROLLBAR_AREA_OFFSET

DNA_SCROLLBAR_GARBAGE_WIDTH_IN_BASES

public static final int DNA_SCROLLBAR_GARBAGE_WIDTH_IN_BASES

DNA_TOP_STRAND

public static final int DNA_TOP_STRAND
Strand values

DNA_BOTTOM_STRAND

public static final int DNA_BOTTOM_STRAND

TOP_ALLELE

public static final int TOP_ALLELE
Top or bottom allele?

BOTTOM_ALLELE

public static final int BOTTOM_ALLELE

cursorColor

protected java.awt.Color cursorColor
Cursor color

equalBaseColor

protected java.awt.Color equalBaseColor
Equal base color

differentBaseColor

protected java.awt.Color differentBaseColor
Different base color
Constructor Detail

DNAView

public DNAView()
Creates a chromosome view.
Method Detail

getDefaultCursorColor

public static java.awt.Color getDefaultCursorColor()
Get the default cursor color
Returns:
Color - default cursor color, never null

setDefaultCursorColor

public static void setDefaultCursorColor(java.awt.Color aColor)
Set the default cursor color. This will be used as the default cursor color for views created after calling this method.

Parameters:
aColor - Color - a default cursor color, may not be null
Throws:
java.lang.IllegalArgumentException - - input argument illegal (null)

getDefaultEqualBaseColor

public static java.awt.Color getDefaultEqualBaseColor()
Get the default equal base color
Returns:
Color - default equal base color, never null

setDefaultEqualBaseColor

public static void setDefaultEqualBaseColor(java.awt.Color aColor)
Set the default equal base color. This will be used as the default equal base color for views created after calling this method.

Parameters:
aColor - Color - a default equal base color, may not be null
Throws:
java.lang.IllegalArgumentException - - input argument illegal (null)

getDefaultDifferentBaseColor

public static java.awt.Color getDefaultDifferentBaseColor()
Get the default different base color
Returns:
Color - default different base color, never null

setDefaultDifferentBaseColor

public static void setDefaultDifferentBaseColor(java.awt.Color aColor)
Set the default different base color. This will be used as the default different base color for views created after calling this method.

Parameters:
aColor - Color - a default different base color, may not be null
Throws:
java.lang.IllegalArgumentException - - input argument illegal (null)

getCursorColor

public java.awt.Color getCursorColor()
Get the cursor color
Returns:
Color - cursor color for this

setCursorColor

public void setCursorColor(java.awt.Color aColor)
Set the cursor color. If null is input, the color reverts back to the default cursor color.

Parameters:
aColor - Color - a new cursor color, may be null

getEqualBaseColor

public java.awt.Color getEqualBaseColor()
Get the equal base color
Returns:
Color - equal base color for this view

setEqualBaseColor

public void setEqualBaseColor(java.awt.Color aColor)
Set the equal base color. If null is input, the color reverts back to the default equal base color.

Parameters:
aColor - Color - a new equal base color, may be null

getDifferentBaseColor

public java.awt.Color getDifferentBaseColor()
Get the different base color
Returns:
Color - different base color for this view

setDifferentBaseColor

public void setDifferentBaseColor(java.awt.Color aColor)
Set the different base color. If null is input, the color reverts back to the default different base color.

Parameters:
aColor - Color - a new different base color, may be null

getDeferApply

public boolean getDeferApply()
Get the defer apply setting.
Returns:
boolean - defer apply setting

setDeferApply

public void setDeferApply(boolean trueOrFalse)
Set the defer apply setting. If true, then the apply will not happen when the user pushes on the apply button. Instead, only notification that the user pushed the button will be done and it is up to a listener to apply the pending changes (or revert them or do nothing with them).
Parameters:
trueOrFalse - boolean - true or false

getDeferRevert

public boolean getDeferRevert()
Get the defer revert setting.
Returns:
boolean - defer revert setting

setDeferRevert

public void setDeferRevert(boolean trueOrFalse)
Set the defer revert setting. If true, then the revert will not happen when the user pushes on the revert button. Instead, only notification that the user pushed the revert button will be done and it is up to a listener to revert the pending changes (or apply them or do nothing with them).
Parameters:
trueOrFalse - boolean - true or false

paintComponent

public void paintComponent(java.awt.Graphics g)
Draw the graphics in this view. Note that we are NOT overriding the paint method, as that would mean we're also responsible for painting the border and children, which we would rather leave to standard JFC code.

Overrides:
paintComponent in class javax.swing.JComponent
Parameters:
g - Graphics - the given graphics to use in drawing

paintAllele

public void paintAllele(java.awt.Graphics g,
                        OrganismAllele allele,
                        OrganismAllele comparisonAllele,
                        int xTopLeft,
                        int yTopLeft)
Paint a single allele

paintBase

public void paintBase(java.awt.Graphics g,
                      byte base,
                      int xInView,
                      int yInView,
                      boolean inAllele,
                      boolean selected)
Paint a single base pair

getPreferredSize

public java.awt.Dimension getPreferredSize()
Return the preferred size of this canvas
Overrides:
getPreferredSize in class UIView
Returns:
Dimension - preferred size of canvas

imageUpdate

public boolean imageUpdate(java.awt.Image anImage,
                           int infoFlags,
                           int x,
                           int y,
                           int width,
                           int height)
ImageObserver method
Specified by:
imageUpdate in interface java.awt.image.ImageObserver
Overrides:
imageUpdate in class java.awt.Component

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent event)
Handle mouse click events
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent event)
Handle mouse entered event
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent event)
Handle mouse exited event
Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent event)
Handle mouse pressed event
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent event)
Handle mouse released event
Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent event)
Handle mouse dragged event
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent event)
Handle mouse moved event
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

startMouseMotionListener

public void startMouseMotionListener(int startIndex,
                                     int endIndex)
Start mouse motion listener given the start and end index of any current selection. If there is no current selection, then startIndex and endIndex should be the same.

getOrganismAllele

public OrganismAllele getOrganismAllele()
Get the shown organism allele for this view.
Returns:
OrganismAllele - the shown organism allele in this view, may be null

setOrganismAllele

public void setOrganismAllele(OrganismAllele anOrganismAllele)
Set the shown organism allele for this view. This will result in the given organism allele's base pairs being shown in the view. No particular base pair is selected initially.

Parameters:
anOrganismAllele - OrganismAllele - the organism allele whose base pairs to show, may be null

getOrganismAllelePair

public OrganismAllelePair getOrganismAllelePair()
Get the shown organism allele pair for this view.
Returns:
OrganismAllelePair - the shown organism allele pair in this view, may be null

setOrganismAllelePair

public void setOrganismAllelePair(OrganismAllelePair anOrganismAllelePair)
Set the shown organism allele pair for this view. This will result in the given organism allele pair's base pairs being shown in the view. No particular base pair is selected initially.

Parameters:
anOrganismAllelePair - OrganismAllelePair - the organism allele pair whose base pairs to show, may be null

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
Handle property change events
Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Parameters:
event - PropertyChangeEvent - the property change event

adjustmentValueChanged

public void adjustmentValueChanged(java.awt.event.AdjustmentEvent event)
Handle adjustment event
Specified by:
adjustmentValueChanged in interface java.awt.event.AdjustmentListener

stateChanged

public void stateChanged(javax.swing.event.ChangeEvent event)
Handle change event
Specified by:
stateChanged in interface javax.swing.event.ChangeListener

setRevertVisible

public void setRevertVisible(boolean visible)

setApplyVisible

public void setApplyVisible(boolean visible)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
React to actions
Specified by:
actionPerformed in interface java.awt.event.ActionListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Handle key typed event
Specified by:
keyTyped in interface java.awt.event.KeyListener

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Handle key pressed event
Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Handle key released event
Specified by:
keyReleased in interface java.awt.event.KeyListener

allelesEdited

public void allelesEdited()
Alleles edited

getAllelePendingTextSymbol

public java.lang.String getAllelePendingTextSymbol(int topOrBottomAllele)
Get the text symbol of the top or bottom allele if the pending changes are made to that allele.

Parameters:
topOrBottomAllele - int - DNAView.TOP_ALLELE or DNAView.BOTTOM_ALLELE
Returns:
textSymbol String - text symbol of allele, null if no strands are shown
Throws:
java.lang.IllegalArgumentException - - input topOrBottomAllele argument illegal

applyPendingChanges

public void applyPendingChanges()
Apply pending changes made to DNA

revertPendingChanges

public void revertPendingChanges()
Revert pending changes to DNA

addActionListener

public void addActionListener(java.awt.event.ActionListener listener)

removeActionListener

public void removeActionListener(java.awt.event.ActionListener listener)

callActionListeners

protected void callActionListeners(java.awt.event.ActionEvent e)