org.concord.biologica.ui
Class SexView

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--org.concord.biologica.ui.UIView
                          |
                          +--org.concord.biologica.ui.OrganismView
                                |
                                +--org.concord.biologica.ui.SexView
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.ComponentListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable

public final class SexView
extends OrganismView
implements java.beans.PropertyChangeListener, java.awt.event.ActionListener, java.awt.event.ComponentListener

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

See Also:
UIProp.ALIGNMENT_CONTROLS_VISIBLE, UIProp.BACKGROUND, UIProp.CHARACTERISTICS_TEXT_VISIBLE, UIProp.CHROMOSOME_TOOL_PICK_ON_ORGANISM, UIProp.CROSSOVER_CONTROLS_VISIBLE, UIProp.FERTILIZATION_STARTED_AND_STOPPED, UIProp.FERTILIZATION_STEP, UIProp.FERTILIZATION_MANUALLY_DISABLED, UIProp.FONT, UIProp.FATHER_ORGANISM, UIProp.FOREGROUND, UIProp.MEIOSIS_FATHER_STARTED_AND_STOPPED, UIProp.MEIOSIS_FATHER_STEP, UIProp.MEIOSIS_MOTHER_STARTED_AND_STOPPED, UIProp.MEIOSIS_MOTHER_STEP, UIProp.MOTHER_ORGANISM, UIProp.MOVED_FATHER_GAMETE, UIProp.MOVED_MOTHER_GAMETE, UIProp.NAME_TEXT_VISIBLE, UIProp.OFFSPRING_ORGANISM, UIProp.ORGANISM_IMAGE_SIZE, UIProp.ORGANISM_LAYOUT_STYLE, UIProp.ORGANISM_VIEW_HEIGHT_PERCENTAGE, UIProp.REPLAY_BUTTON_ENABLED, UIProp.REPLAY_BUTTON_VISIBLE, UIProp.RESET_AUTOMATIC, UIProp.RESET_BUTTON_ENABLED, UIProp.RESET_BUTTON_VISIBLE, UIProp.RESET_DELETE_OFFSPRING_ORGANISM, UIProp.SELECTED_FATHER_GAMETE, UIProp.SELECTED_MOTHER_GAMETE, UIProp.SEX_TEXT_VISIBLE, UIProp.SEX_VIEW_MODE, UIProp.SPECIES_TEXT_VISIBLE, UIProp.STOP_WHEN_FERTILIZATION_STARTS, UIProp.STOP_WHEN_MEIOSIS_STARTS, UIProp.TEXT_INDENT, UIProp.TEXT_LINE_SPACING, 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 SEX_VIEW_BOTTOM_BUTTON_HEIGHT
           
static int SEX_VIEW_MODE_ALL_VIEWS
           
static int SEX_VIEW_MODE_FERTILIZATION_VIEW
           
static int SEX_VIEW_MODE_MEIOSIS_VIEW_FATHER
           
static int SEX_VIEW_MODE_MEIOSIS_VIEW_MOTHER
           
static int SEX_VIEW_MODE_NO_VIEWS
           
static int SEX_VIEW_MODE_SIX_VIEWS
           
static int SEX_VIEW_TOP_TEXT_HEIGHT
           
 
Fields inherited from class org.concord.biologica.ui.OrganismView
characteristicsTextVisible, highlightColor, hotspotOrganism, hotspotOrganismImage, lockSymbolVisible, nameTextVisible, organismImageSize, selectionColor, sexTextVisible, speciesTextVisible, textIndent, textLineSpacing
 
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
SexView()
          Creates a sex view.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          React to actions
 void componentHidden(java.awt.event.ComponentEvent event)
          Component events
 void componentMoved(java.awt.event.ComponentEvent event)
           
 void componentResized(java.awt.event.ComponentEvent event)
           
 void componentShown(java.awt.event.ComponentEvent event)
           
 BigFertilizationView getBigFertilizationView()
           
 BigMeiosisView getBigMeiosisView()
           
 MeiosisModel getFatherMeiosisModel()
          Get the father's meiosis model
 Organism getFatherOrganism()
          Get the father organism for this view
 SmallMeiosisView getFatherSmallMeiosisView()
           
 MeiosisModel getMotherMeiosisModel()
          Get the mother's meiosis model
 Organism getMotherOrganism()
          Get the mother organism for this view
 SmallMeiosisView getMotherSmallMeiosisView()
           
 FertilizationModel getOffspringFertilizationModel()
          Get the fertilization model
 Organism getOffspringOrganism()
          Get the offspring organism for this view
 int getOrganismViewHeightPercentage()
          Get the organism view height percentage.
 int getSexViewMode()
          Get the sex view mode.
 SmallFertilizationView getSmallFertilizationView()
           
 boolean isAlignmentControlsVisible()
          Get alignment controls visibility in big meiosis view
 boolean isCrossoverControlsVisible()
          Get crossover controls visibility in big meiosis view
 boolean isFertilizationManuallyDisabled()
          Get whether or not fertilization is manually disabled.
 boolean isGameteMoveButtonEnabled()
          Get whether or not the replay button is enabled.
 boolean isReplayButtonEnabled()
          Get whether or not the replay button is enabled.
 boolean isReplayButtonVisible()
          Get whether or not the replay button is visible.
 boolean isResetAutomatic()
          Get whether or not reset is automatic when an offspring is created.
 boolean isResetButtonEnabled()
          Get whether or not the reset button is enabled.
 boolean isResetButtonVisible()
          Get whether or not the reset button is visible.
 boolean isResetDeleteOffspringOrganism()
          Get whether or not reset should automatically delete an offspring organism.
 boolean isStopWhenFertilizationStarts()
          Get whether or not fertilization should stop immediately when it starts.
 boolean isStopWhenMeiosisStarts()
          Get whether or not meiosiis should stop immediately when it starts.
 void paintComponent(java.awt.Graphics g)
          Draw the graphics in this view.
 void propertyChange(java.beans.PropertyChangeEvent event)
          Handle property change events
 void replay()
          Replay the state of this view back to the very start.
 void reset()
          Reset the state of this view, erasing and recalculating all meiosis state, removing any state for fertilization (e.g.
 void setAlignmentControlsVisible(boolean aVisible)
          Set alignment controls visibility in big meiosis view
 void setBackground(java.awt.Color aBackgroundColor)
          Set the background color for this view.
 void setBackgroundCellSubViews(java.awt.Color aBackgroundColor)
          Set the background color for the cell sub views.
 void setBackgroundOrganismSubViews(java.awt.Color aBackgroundColor)
          Set the background color for the organism sub views.
 void setCharacteristicsTextVisible(boolean aCharacteristicsTextVisible)
          Set the characteristics text visible boolean.
 void setCrossoverControlsVisible(boolean aVisible)
          Set crossover controls visibility
 void setFatherOrganism(Organism aFatherOrganism)
          Set the father organism for this view
 void setFertilizationManuallyDisabled(boolean aManuallyDisabled)
          Set whether fertilization is manually disabled or not.
 void setFont(java.awt.Font aFont)
          Set the font for this view.
 void setForeground(java.awt.Color aForegroundColor)
          Set the foreground color for this view.
 void setForegroundCellSubViews(java.awt.Color aForegroundColor)
          Set the foreground color for the cell sub views.
 void setForegroundOrganismSubViews(java.awt.Color aForegroundColor)
          Set the foreground color for the organism sub views.
 void setGameteMoveButtonEnabled(boolean aGameteMoveButtonEnabled)
          Set whether the replay button is enabled.
 void setMotherOrganism(Organism aMotherOrganism)
          Set the mother organism for this view
 void setNameTextVisible(boolean aNameTextVisible)
          Set the name text visible boolean.
 void setOrganismImageSize(int anOrganismImageSize)
          Set the organism image size for this view.
 void setOrganismViewHeightPercentage(int anOrganismViewHeightPercentage)
          Set the organism view height percentage.
 void setReplayButtonEnabled(boolean aReplayButtonEnabled)
          Set whether the replay button is enabled.
 void setReplayButtonVisible(boolean aReplayButtonVisible)
          Set whether the replay button is visible.
 void setResetAutomatic(boolean aResetAutomatic)
          Set whether a reset is automatic when an offspring is created.
 void setResetButtonEnabled(boolean aResetButtonEnabled)
          Set whether the reset button is enabled.
 void setResetButtonVisible(boolean aResetButtonVisible)
          Set whether the reset button is visible.
 void setResetDeleteOffspringOrganism(boolean aResetDeleteOffspringOrganism)
          Set whether reset should automaticallly delete an offspring organism.
 void setSexTextVisible(boolean aSexTextVisible)
          Set the sex text visible boolean.
 void setSexViewMode(int aSexViewMode)
          Set sex view mode, updating view and subviews appropriately.
 void setSpeciesTextVisible(boolean aSpeciesTextVisible)
          Set the species text visible boolean.
 void setStopWhenFertilizationStarts(boolean aStopWhenFertilizationStarts)
          Set whether fertilization should immediately stop when it starts.
 void setStopWhenMeiosisStarts(boolean aStopWhenMeiosisStarts)
          Set whether meiosis should immediately stop when it starts.
 void setTextIndent(int aTextIndent)
          Set the text indent for this view.
 void setTextLineSpacing(int aTextLineSpacing)
          Set the text line spacing for this view, the number of pixels between lines of text below an organism.
 void toolChanged(int aTool)
          Method called by ToolView when the current tool changes.
 void updateSize()
          Update the size of this view.
 
Methods inherited from class org.concord.biologica.ui.OrganismView
getDefaultHighlightColor, getDefaultSelectionColor, getHighlightColor, getOrganismCellDimensions, getOrganismImageSize, getSelectionColor, getTextIndent, getTextLineSpacing, imageUpdate, isCharacteristicsTextVisible, isLockSymbolVisible, isNameTextVisible, isSexTextVisible, isSpeciesTextVisible, preloadSpeciesImages, setDefaultHighlightColor, setDefaultSelectionColor, setHighlightColor, setLockSymbolVisible, setSelectionColor, updateHotspotOnMousePress, updateHotspotOnMouseReleased
 
Methods inherited from class org.concord.biologica.ui.UIView
addPropertyChangeListener, getLocalImage, getPreferredSize, paintBackground, removePropertyChangeListener, setScrollPane, 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

SEX_VIEW_MODE_NO_VIEWS

public static final int SEX_VIEW_MODE_NO_VIEWS

SEX_VIEW_MODE_SIX_VIEWS

public static final int SEX_VIEW_MODE_SIX_VIEWS

SEX_VIEW_MODE_MEIOSIS_VIEW_MOTHER

public static final int SEX_VIEW_MODE_MEIOSIS_VIEW_MOTHER

SEX_VIEW_MODE_MEIOSIS_VIEW_FATHER

public static final int SEX_VIEW_MODE_MEIOSIS_VIEW_FATHER

SEX_VIEW_MODE_FERTILIZATION_VIEW

public static final int SEX_VIEW_MODE_FERTILIZATION_VIEW

SEX_VIEW_MODE_ALL_VIEWS

public static final int SEX_VIEW_MODE_ALL_VIEWS

SEX_VIEW_TOP_TEXT_HEIGHT

public static final int SEX_VIEW_TOP_TEXT_HEIGHT

SEX_VIEW_BOTTOM_BUTTON_HEIGHT

public static final int SEX_VIEW_BOTTOM_BUTTON_HEIGHT
Constructor Detail

SexView

public SexView()
Creates a sex view.
Throws:
java.lang.IllegalArgumentException - - one of input arguments null
Method Detail

setCharacteristicsTextVisible

public void setCharacteristicsTextVisible(boolean aCharacteristicsTextVisible)
Set the characteristics text visible boolean.
Overrides:
setCharacteristicsTextVisible in class OrganismView
Parameters:
aCharacteristicsTextVisible - boolean - visible?

setNameTextVisible

public void setNameTextVisible(boolean aNameTextVisible)
Set the name text visible boolean.
Overrides:
setNameTextVisible in class OrganismView
Parameters:
aNameTextVisible - boolean - visible?

setSexTextVisible

public void setSexTextVisible(boolean aSexTextVisible)
Set the sex text visible boolean.
Overrides:
setSexTextVisible in class OrganismView
Parameters:
aSexTextVisible - boolean - visible?

setSpeciesTextVisible

public void setSpeciesTextVisible(boolean aSpeciesTextVisible)
Set the species text visible boolean.
Overrides:
setSpeciesTextVisible in class OrganismView
Parameters:
aSpeciesTextVisible - boolean - visible?

getBigMeiosisView

public BigMeiosisView getBigMeiosisView()

getBigFertilizationView

public BigFertilizationView getBigFertilizationView()

getSmallFertilizationView

public SmallFertilizationView getSmallFertilizationView()

getFatherSmallMeiosisView

public SmallMeiosisView getFatherSmallMeiosisView()

getMotherSmallMeiosisView

public SmallMeiosisView getMotherSmallMeiosisView()

isAlignmentControlsVisible

public boolean isAlignmentControlsVisible()
Get alignment controls visibility in big meiosis view
Returns:
boolean - visibility

setAlignmentControlsVisible

public void setAlignmentControlsVisible(boolean aVisible)
Set alignment controls visibility in big meiosis view
Parameters:
aVisible - boolean - visibility

isCrossoverControlsVisible

public boolean isCrossoverControlsVisible()
Get crossover controls visibility in big meiosis view
Returns:
boolean - visibility

setCrossoverControlsVisible

public void setCrossoverControlsVisible(boolean aVisible)
Set crossover controls visibility
Parameters:
aVisible - boolean - visibility

getMotherOrganism

public Organism getMotherOrganism()
Get the mother organism for this view
Returns:
Organism - mother organism, may be null

setMotherOrganism

public void setMotherOrganism(Organism aMotherOrganism)
Set the mother organism for this view
Parameters:
aMotherOrganism - Organism - a new mother organism, may be null
Throws:
java.lang.IllegalArgumentException - - mother organism illegal (not same species as father)

getFatherOrganism

public Organism getFatherOrganism()
Get the father organism for this view
Returns:
Organism - father organism, may be null

setFatherOrganism

public void setFatherOrganism(Organism aFatherOrganism)
Set the father organism for this view
Parameters:
aFatherOrganism - Organism - a new father organism, may be null
Throws:
java.lang.IllegalArgumentException - - father organism illegal (not same species as mother)

replay

public void replay()
Replay the state of this view back to the very start. This means we lose all fertilization state but we retain the meiosis state, the selected gamete, etc. So the user can replay meiosis, see the selected gamete and then manually move that selected gamete into the fertilization chamber if they want. Or they may choose to select another gamete.

reset

public void reset()
Reset the state of this view, erasing and recalculating all meiosis state, removing any state for fertilization (e.g. selected gametes), etc.

getOffspringOrganism

public Organism getOffspringOrganism()
Get the offspring organism for this view
Returns:
Organism - offspring organism, may be null

getMotherMeiosisModel

public MeiosisModel getMotherMeiosisModel()
Get the mother's meiosis model

getFatherMeiosisModel

public MeiosisModel getFatherMeiosisModel()
Get the father's meiosis model

getOffspringFertilizationModel

public FertilizationModel getOffspringFertilizationModel()
Get the fertilization model

getSexViewMode

public int getSexViewMode()
Get the sex view mode.
Returns:
sexViewMode int - the current sex view mode

setSexViewMode

public void setSexViewMode(int aSexViewMode)
Set sex view mode, updating view and subviews appropriately.
Parameters:
aSexViewMode - int - new sex view mode

isFertilizationManuallyDisabled

public final boolean isFertilizationManuallyDisabled()
Get whether or not fertilization is manually disabled.

Returns:
boolean - is fertilization manually disabled?

setFertilizationManuallyDisabled

public void setFertilizationManuallyDisabled(boolean aManuallyDisabled)
Set whether fertilization is manually disabled or not.

Parameters:
aManuallyDisabled - boolean - new manually disabled value

getOrganismViewHeightPercentage

public int getOrganismViewHeightPercentage()
Get the organism view height percentage. This is the percentage of the total view height devoted to the organism views. The acceptable range is 0 to 100.

Returns:
int - organism view height percentage

setOrganismViewHeightPercentage

public void setOrganismViewHeightPercentage(int anOrganismViewHeightPercentage)
Set the organism view height percentage. The input value must be between 0 and 100.
Parameters:
anOrganismViewHeightPercentage - - between 0 and 100
Throws:
java.lang.IllegalArgumentException - - input argument illegal

isResetAutomatic

public final boolean isResetAutomatic()
Get whether or not reset is automatic when an offspring is created.

Returns:
boolean - is reset automatic when an offspring is created

setResetAutomatic

public void setResetAutomatic(boolean aResetAutomatic)
Set whether a reset is automatic when an offspring is created.

Parameters:
aResetAutomatic - boolean - new reset automatic value

isResetButtonEnabled

public final boolean isResetButtonEnabled()
Get whether or not the reset button is enabled.

Returns:
boolean - is reset button enabled

setResetButtonEnabled

public void setResetButtonEnabled(boolean aResetButtonEnabled)
Set whether the reset button is enabled.

Parameters:
aResetButtonEnabled - boolean - new reset button enabled

isResetButtonVisible

public final boolean isResetButtonVisible()
Get whether or not the reset button is visible.

Returns:
boolean - is reset button visible

setResetButtonVisible

public void setResetButtonVisible(boolean aResetButtonVisible)
Set whether the reset button is visible.

Parameters:
aResetButtonVisible - boolean - new reset button visibility

isReplayButtonEnabled

public final boolean isReplayButtonEnabled()
Get whether or not the replay button is enabled.

Returns:
boolean - is replay button enabled

setReplayButtonEnabled

public void setReplayButtonEnabled(boolean aReplayButtonEnabled)
Set whether the replay button is enabled.

Parameters:
aReplayButtonEnabled - boolean - new replay button enabled

isGameteMoveButtonEnabled

public final boolean isGameteMoveButtonEnabled()
Get whether or not the replay button is enabled.

Returns:
boolean - is replay button enabled

setGameteMoveButtonEnabled

public void setGameteMoveButtonEnabled(boolean aGameteMoveButtonEnabled)
Set whether the replay button is enabled.

Parameters:
aReplayButtonEnabled - boolean - new replay button enabled

isReplayButtonVisible

public final boolean isReplayButtonVisible()
Get whether or not the replay button is visible.

Returns:
boolean - is replay button visible

setReplayButtonVisible

public void setReplayButtonVisible(boolean aReplayButtonVisible)
Set whether the replay button is visible.

Parameters:
aReplayButtonVisible - boolean - new replay button visibility

isResetDeleteOffspringOrganism

public final boolean isResetDeleteOffspringOrganism()
Get whether or not reset should automatically delete an offspring organism.

Returns:
boolean - should reset delete an offspring?

setResetDeleteOffspringOrganism

public void setResetDeleteOffspringOrganism(boolean aResetDeleteOffspringOrganism)
Set whether reset should automaticallly delete an offspring organism.

Parameters:
aResetDeleteOffspringOrganism - boolean - new reset delete offspring organism value

isStopWhenFertilizationStarts

public final boolean isStopWhenFertilizationStarts()
Get whether or not fertilization should stop immediately when it starts. This is used by scripts to stop fertilization and put up some sort of a message or do something keyed off fertilization starting. The script will continue fertilization after the user has done whatever.

Returns:
boolean - stop when fertilization starts?

setStopWhenFertilizationStarts

public void setStopWhenFertilizationStarts(boolean aStopWhenFertilizationStarts)
Set whether fertilization should immediately stop when it starts.

Parameters:
aStopWhenFertilizationStarts - - stop when fertilization starts?

isStopWhenMeiosisStarts

public final boolean isStopWhenMeiosisStarts()
Get whether or not meiosiis should stop immediately when it starts. This is used by scripts to stop meiosis and put up some sort of a message or do something keyed off meiosis starting. The script may continue meiosis after the user has done whatever.

Returns:
boolean - stop when meiosis starts?

setStopWhenMeiosisStarts

public void setStopWhenMeiosisStarts(boolean aStopWhenMeiosisStarts)
Set whether meiosis should immediately stop when it starts.

Parameters:
aStopWhenMeiosisStarts - - stop when meiosis starts?

paintComponent

public void paintComponent(java.awt.Graphics g)
Draw the graphics in this view.
Overrides:
paintComponent in class javax.swing.JComponent
Parameters:
g - Graphics - the given graphics to use in drawing

setOrganismImageSize

public void setOrganismImageSize(int anOrganismImageSize)
Set the organism image size for this view. The size must be one of the SpeciesImage.XXX_IMAGE_SIZE static values.

Overrides:
setOrganismImageSize in class OrganismView
Parameters:
anOrganismImageSize - int - a new organism image size
Throws:
java.lang.IllegalArgumentException - - illegal input value

setTextIndent

public void setTextIndent(int aTextIndent)
Set the text indent for this view.

Overrides:
setTextIndent in class OrganismView
Parameters:
aTextIndent - int - a new text indent

setTextLineSpacing

public void setTextLineSpacing(int aTextLineSpacing)
Set the text line spacing for this view, the number of pixels between lines of text below an organism.

Overrides:
setTextLineSpacing in class OrganismView
Parameters:
aTextLineSpacing - int - a new text line spacing

setFont

public void setFont(java.awt.Font aFont)
Set the font for this view. If a null font is specified, the view will revert back to its default font.

Overrides:
setFont in class UIView
Parameters:
aFont - Font - a new font, if null, then will revert to default font

setBackground

public void setBackground(java.awt.Color aBackgroundColor)
Set the background color for this view. If a null background color is specified, the view will revert back to its default background color.

Overrides:
setBackground in class UIView
Parameters:
aBackgroundColor - Color - a new color, if null, then will revert to default background color

setBackgroundCellSubViews

public void setBackgroundCellSubViews(java.awt.Color aBackgroundColor)
Set the background color for the cell sub views. If a null foreground color is specified, the view will revert back to its default background color.

Parameters:
aBackgroundColor - Color - a new color, if null, then will revert to default background color

setBackgroundOrganismSubViews

public void setBackgroundOrganismSubViews(java.awt.Color aBackgroundColor)
Set the background color for the organism sub views. If a null foreground color is specified, the view will revert back to its default background color.

Parameters:
aBackgroundColor - Color - a new color, if null, then will revert to default background color

setForeground

public void setForeground(java.awt.Color aForegroundColor)
Set the foreground color for this view. If a null foreground color is specified, the view will revert back to its default foreground color.

Overrides:
setForeground in class UIView
Parameters:
aForegroundColor - Color - a new color, if null, then will revert to default foreground color

setForegroundCellSubViews

public void setForegroundCellSubViews(java.awt.Color aForegroundColor)
Set the foreground color for the cell sub views. If a null foreground color is specified, the view will revert back to its default foreground color.

Parameters:
aForegroundColor - Color - a new color, if null, then will revert to default foreground color

setForegroundOrganismSubViews

public void setForegroundOrganismSubViews(java.awt.Color aForegroundColor)
Set the foreground color for the organism sub views. If a null foreground color is specified, the view will revert back to its default foreground color.

Parameters:
aForegroundColor - Color - a new color, if null, then will revert to default foreground color

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

updateSize

public void updateSize()
Update the size of this view. To do this, get the current size of the view and update the models for anything shown in the view. Do not repaint or generate a repaint event, as that event is already coming automatically from AWT.

toolChanged

public void toolChanged(int aTool)
Method called by ToolView when the current tool changes. If we get a tool other than snip or chromosome, we default to the selection tool. In other words, we ignore tools that we don't understand (e.g. DNA tool, Cross tool).

Overrides:
toolChanged in class UIView
Parameters:
aTool - int - the active tool

componentHidden

public void componentHidden(java.awt.event.ComponentEvent event)
Component events
Specified by:
componentHidden in interface java.awt.event.ComponentListener

componentMoved

public void componentMoved(java.awt.event.ComponentEvent event)
Specified by:
componentMoved in interface java.awt.event.ComponentListener

componentResized

public void componentResized(java.awt.event.ComponentEvent event)
Specified by:
componentResized in interface java.awt.event.ComponentListener

componentShown

public void componentShown(java.awt.event.ComponentEvent event)
Specified by:
componentShown in interface java.awt.event.ComponentListener

actionPerformed

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