|
|||||||||
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.OrganismView | +--org.concord.biologica.ui.SexView
An object of this class will generate the following property change events:
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 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 |
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.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 |
public static final int SEX_VIEW_MODE_NO_VIEWS
public static final int SEX_VIEW_MODE_SIX_VIEWS
public static final int SEX_VIEW_MODE_MEIOSIS_VIEW_MOTHER
public static final int SEX_VIEW_MODE_MEIOSIS_VIEW_FATHER
public static final int SEX_VIEW_MODE_FERTILIZATION_VIEW
public static final int SEX_VIEW_MODE_ALL_VIEWS
public static final int SEX_VIEW_TOP_TEXT_HEIGHT
public static final int SEX_VIEW_BOTTOM_BUTTON_HEIGHT
Constructor Detail |
public SexView()
java.lang.IllegalArgumentException
- - one of input arguments nullMethod Detail |
public void setCharacteristicsTextVisible(boolean aCharacteristicsTextVisible)
setCharacteristicsTextVisible
in class OrganismView
aCharacteristicsTextVisible
- boolean - visible?public void setNameTextVisible(boolean aNameTextVisible)
setNameTextVisible
in class OrganismView
aNameTextVisible
- boolean - visible?public void setSexTextVisible(boolean aSexTextVisible)
setSexTextVisible
in class OrganismView
aSexTextVisible
- boolean - visible?public void setSpeciesTextVisible(boolean aSpeciesTextVisible)
setSpeciesTextVisible
in class OrganismView
aSpeciesTextVisible
- boolean - visible?public BigMeiosisView getBigMeiosisView()
public BigFertilizationView getBigFertilizationView()
public SmallFertilizationView getSmallFertilizationView()
public SmallMeiosisView getFatherSmallMeiosisView()
public SmallMeiosisView getMotherSmallMeiosisView()
public boolean isAlignmentControlsVisible()
public void setAlignmentControlsVisible(boolean aVisible)
aVisible
- boolean - visibilitypublic boolean isCrossoverControlsVisible()
public void setCrossoverControlsVisible(boolean aVisible)
aVisible
- boolean - visibilitypublic Organism getMotherOrganism()
public void setMotherOrganism(Organism aMotherOrganism)
aMotherOrganism
- Organism - a new mother organism, may be nulljava.lang.IllegalArgumentException
- - mother organism illegal (not same species as father)public Organism getFatherOrganism()
public void setFatherOrganism(Organism aFatherOrganism)
aFatherOrganism
- Organism - a new father organism, may be nulljava.lang.IllegalArgumentException
- - father organism illegal (not same species as mother)public void replay()
public void reset()
public Organism getOffspringOrganism()
public MeiosisModel getMotherMeiosisModel()
public MeiosisModel getFatherMeiosisModel()
public FertilizationModel getOffspringFertilizationModel()
public int getSexViewMode()
public void setSexViewMode(int aSexViewMode)
aSexViewMode
- int - new sex view modepublic final boolean isFertilizationManuallyDisabled()
public void setFertilizationManuallyDisabled(boolean aManuallyDisabled)
aManuallyDisabled
- boolean - new manually disabled valuepublic int getOrganismViewHeightPercentage()
public void setOrganismViewHeightPercentage(int anOrganismViewHeightPercentage)
anOrganismViewHeightPercentage
- - between 0 and 100java.lang.IllegalArgumentException
- - input argument illegalpublic final boolean isResetAutomatic()
public void setResetAutomatic(boolean aResetAutomatic)
aResetAutomatic
- boolean - new reset automatic valuepublic final boolean isResetButtonEnabled()
public void setResetButtonEnabled(boolean aResetButtonEnabled)
aResetButtonEnabled
- boolean - new reset button enabledpublic final boolean isResetButtonVisible()
public void setResetButtonVisible(boolean aResetButtonVisible)
aResetButtonVisible
- boolean - new reset button visibilitypublic final boolean isReplayButtonEnabled()
public void setReplayButtonEnabled(boolean aReplayButtonEnabled)
aReplayButtonEnabled
- boolean - new replay button enabledpublic final boolean isGameteMoveButtonEnabled()
public void setGameteMoveButtonEnabled(boolean aGameteMoveButtonEnabled)
aReplayButtonEnabled
- boolean - new replay button enabledpublic final boolean isReplayButtonVisible()
public void setReplayButtonVisible(boolean aReplayButtonVisible)
aReplayButtonVisible
- boolean - new replay button visibilitypublic final boolean isResetDeleteOffspringOrganism()
public void setResetDeleteOffspringOrganism(boolean aResetDeleteOffspringOrganism)
aResetDeleteOffspringOrganism
- boolean - new reset delete offspring organism valuepublic final boolean isStopWhenFertilizationStarts()
public void setStopWhenFertilizationStarts(boolean aStopWhenFertilizationStarts)
aStopWhenFertilizationStarts
- - stop when fertilization starts?public final boolean isStopWhenMeiosisStarts()
public void setStopWhenMeiosisStarts(boolean aStopWhenMeiosisStarts)
aStopWhenMeiosisStarts
- - stop when meiosis starts?public void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
g
- Graphics - the given graphics to use in drawingpublic void setOrganismImageSize(int anOrganismImageSize)
setOrganismImageSize
in class OrganismView
anOrganismImageSize
- int - a new organism image sizejava.lang.IllegalArgumentException
- - illegal input valuepublic void setTextIndent(int aTextIndent)
setTextIndent
in class OrganismView
aTextIndent
- int - a new text indentpublic void setTextLineSpacing(int aTextLineSpacing)
setTextLineSpacing
in class OrganismView
aTextLineSpacing
- int - a new text line spacingpublic void setFont(java.awt.Font aFont)
setFont
in class UIView
aFont
- Font - a new font, if null, then will revert to default fontpublic void setBackground(java.awt.Color aBackgroundColor)
setBackground
in class UIView
aBackgroundColor
- Color - a new color, if null, then will revert to default background colorpublic void setBackgroundCellSubViews(java.awt.Color aBackgroundColor)
aBackgroundColor
- Color - a new color, if null, then will revert to default background colorpublic void setBackgroundOrganismSubViews(java.awt.Color aBackgroundColor)
aBackgroundColor
- Color - a new color, if null, then will revert to default background colorpublic void setForeground(java.awt.Color aForegroundColor)
setForeground
in class UIView
aForegroundColor
- Color - a new color, if null, then will revert to default foreground colorpublic void setForegroundCellSubViews(java.awt.Color aForegroundColor)
aForegroundColor
- Color - a new color, if null, then will revert to default foreground colorpublic void setForegroundOrganismSubViews(java.awt.Color aForegroundColor)
aForegroundColor
- Color - a new color, if null, then will revert to default foreground colorpublic void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange
in interface java.beans.PropertyChangeListener
event
- PropertyChangeEvent - the property change eventpublic void updateSize()
public void toolChanged(int aTool)
toolChanged
in class UIView
aTool
- int - the active toolpublic void componentHidden(java.awt.event.ComponentEvent event)
componentHidden
in interface java.awt.event.ComponentListener
public void componentMoved(java.awt.event.ComponentEvent event)
componentMoved
in interface java.awt.event.ComponentListener
public void componentResized(java.awt.event.ComponentEvent event)
componentResized
in interface java.awt.event.ComponentListener
public void componentShown(java.awt.event.ComponentEvent event)
componentShown
in interface java.awt.event.ComponentListener
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |