|
|||||||||
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 | +--javax.swing.JComponent | +--org.concord.biologica.ui.UIView | +--org.concord.biologica.ui.ChromosomeView
The chromosome view of BioLogica.
An object of this class will generate the following property change events:
UIProp.ORGANISM
,
UIProp.SELECTED_ALLELE
,
UIProp.SELECTED_CHROMOSOME
,
PropertyChangeListener
, Serialized FormInner 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[] |
CHROMOSOME_BOTTOM_LENGTH
|
static int[] |
CHROMOSOME_BOTTOM_SECTION_BOTTOM
|
static int[] |
CHROMOSOME_BOTTOM_SECTION_TOP
|
static int |
CHROMOSOME_IMAGE_HEIGHT
|
static int |
CHROMOSOME_IMAGE_WIDTH
|
static float[] |
CHROMOSOME_MID_POINT
|
static int[] |
CHROMOSOME_TOP_LENGTH
|
static int[] |
CHROMOSOME_TOP_SECTION_BOTTOM
|
static int[] |
CHROMOSOME_TOP_SECTION_TOP
Chromosome image values, used to draw genes and alleles on them |
static int[] |
CHROMOSOME_TOTAL_LENGTH
|
static int |
MIN_PREFERRED_HEIGHT
|
protected java.awt.Color |
selectionColor
Selection color for a particular view |
static int |
X_BLUE_CHROMOSOME
|
static int |
X_COMBO_BOX_OFFSET
|
static int |
X_LEFT_IMAGE
|
static int |
X_RIGHT_IMAGE
|
static int |
X_YELLOW_CHROMOSOME
|
static int |
Y_IMAGE_OFFSET
|
static int |
Y_TOP_IMAGE
|
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 | |
ChromosomeView()
Creates a chromosome view. |
Method Summary | |
int |
getChromosomesToShow()
Get the chromosomes to show. |
OrganismChromosome |
getCurrentChromosome()
|
static java.awt.Color |
getDefaultSelectionColor()
Get the default selection color |
java.lang.String |
getNewAllele()
|
java.lang.String |
getOldAllele()
|
Organism |
getOrganism()
Get the shown organism for this view. |
java.awt.Dimension |
getPreferredSize()
Return the preferred size of this canvas |
OrganismAllele |
getSelectedAllele()
Get the selected allele. |
OrganismChromosome |
getSelectedChromosome()
Get the selected chromosome. |
java.awt.Color |
getSelectionColor()
Get the selection color |
SelectionSet |
getSelectionSet()
|
boolean |
imageUpdate(java.awt.Image anImage,
int infoFlags,
int x,
int y,
int width,
int height)
ImageObserver method |
boolean |
isChromosomesSelectable(boolean selectable)
|
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 |
organismAlleleControlChanged(OrganismAlleleControl control,
OrganismAllele allele,
java.lang.String newValue)
Handle combo box item changed events. |
void |
paintComponent(java.awt.Graphics g)
Draw the graphics in this view. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Handle property change events |
void |
setChromosomesSelectable(boolean selectable)
|
void |
setChromosomesToShow(int aChromosomesToShow)
Set the chromosomes to show. |
void |
setCurrentChromosome(OrganismChromosome chr)
|
static void |
setDefaultSelectionColor(java.awt.Color aColor)
Set the default selection color. |
void |
setNewAllele(java.lang.String newOne)
|
void |
setOldAllele(java.lang.String oldOne)
|
void |
setOrganism(Organism anOrganism)
Set the shown organism for this view. |
void |
setScrollPane(javax.swing.JScrollPane aScrollPane)
Tell this view its scroll pane. |
void |
setSelectedAllele(OrganismAllele anAllele)
Set the selected allele. |
void |
setSelectedChromosome(OrganismChromosome aChromosome)
Set the selected chromosome. |
void |
setSelectionColor(java.awt.Color aColor)
Set the selection color. |
void |
setSelectionSet(SelectionSet selectSet)
|
void |
updateScrollBars()
Update the scroll bar extents based on the number of organisms |
void |
updateState()
Update our view state. |
Methods inherited from class org.concord.biologica.ui.UIView |
addPropertyChangeListener, getLocalImage, paintBackground, removePropertyChangeListener, setBackground, setFont, setForeground, 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 |
public static final int CHROMOSOME_IMAGE_WIDTH
public static final int CHROMOSOME_IMAGE_HEIGHT
public static final int X_YELLOW_CHROMOSOME
public static final int X_BLUE_CHROMOSOME
public static final int MIN_PREFERRED_HEIGHT
public static final int Y_TOP_IMAGE
public static final int Y_IMAGE_OFFSET
public static final int X_LEFT_IMAGE
public static final int X_RIGHT_IMAGE
public static final int X_COMBO_BOX_OFFSET
public static final int[] CHROMOSOME_TOP_SECTION_TOP
public static final int[] CHROMOSOME_TOP_SECTION_BOTTOM
public static final int[] CHROMOSOME_BOTTOM_SECTION_TOP
public static final int[] CHROMOSOME_BOTTOM_SECTION_BOTTOM
public static final int[] CHROMOSOME_TOP_LENGTH
public static final int[] CHROMOSOME_BOTTOM_LENGTH
public static final int[] CHROMOSOME_TOTAL_LENGTH
public static final float[] CHROMOSOME_MID_POINT
protected java.awt.Color selectionColor
Constructor Detail |
public ChromosomeView()
Method Detail |
public static java.awt.Color getDefaultSelectionColor()
public static void setDefaultSelectionColor(java.awt.Color aColor)
aColor
- Color - a default selection color, may not be nulljava.lang.IllegalArgumentException
- - input argument illegal (null)public void setScrollPane(javax.swing.JScrollPane aScrollPane)
setScrollPane
in class UIView
aScrollPane
- JScrollPane - the scroll pane containing this viewpublic void updateScrollBars()
public void setChromosomesSelectable(boolean selectable)
public boolean isChromosomesSelectable(boolean selectable)
public void setSelectionSet(SelectionSet selectSet)
public SelectionSet getSelectionSet()
public java.awt.Color getSelectionColor()
public void setSelectionColor(java.awt.Color aColor)
aColor
- Color - a new selection color, may be nullpublic void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
g
- Graphics - the given graphics to use in drawingpublic java.awt.Dimension getPreferredSize()
getPreferredSize
in class UIView
public int getChromosomesToShow()
public void setChromosomesToShow(int aChromosomesToShow)
aChromosomesToShow
- int - the chromosome pair to showpublic boolean imageUpdate(java.awt.Image anImage, int infoFlags, int x, int y, int width, int height)
imageUpdate
in interface java.awt.image.ImageObserver
imageUpdate
in class java.awt.Component
public void mouseClicked(java.awt.event.MouseEvent event)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent event)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent event)
mouseExited
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent event)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent event)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseDragged(java.awt.event.MouseEvent event)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseMoved(java.awt.event.MouseEvent event)
mouseMoved
in interface java.awt.event.MouseMotionListener
public Organism getOrganism()
public void setOrganism(Organism anOrganism)
anOrganism
- Organism - the organism whose chromosomes to show, may be nullpublic OrganismChromosome getSelectedChromosome()
public void setSelectedChromosome(OrganismChromosome aChromosome)
aChromosome
- - an organism chromosome to select, may be nullpublic OrganismAllele getSelectedAllele()
public void setSelectedAllele(OrganismAllele anAllele)
anAllele
- - an organism allele to select, may be nullpublic void updateState()
public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange
in interface java.beans.PropertyChangeListener
event
- PropertyChangeEvent - the property change eventpublic void setOldAllele(java.lang.String oldOne)
public java.lang.String getOldAllele()
public void setNewAllele(java.lang.String newOne)
public java.lang.String getNewAllele()
public void setCurrentChromosome(OrganismChromosome chr)
public OrganismChromosome getCurrentChromosome()
public void organismAlleleControlChanged(OrganismAlleleControl control, OrganismAllele allele, java.lang.String newValue)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |