|
|||||||||
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.PedigreeOrganismView
The pedigree organism view of BioLogica.
An object of this class will generate the following property change events:
UIProp.BACKGROUND
,
UIProp.CHARACTERISTICS_TEXT_VISIBLE
,
UIProp.CHROMOSOME_TOOL_PICK_ON_ORGANISM
,
UIProp.CROSS_SUCCEEDED
,
UIProp.FIXED_NUMBER_CHILDREN
,
UIProp.FONT
,
UIProp.FOREGROUND
,
UIProp.LOCK_SYMBOL_VISIBLE
,
UIProp.MAXIMUM_NUMBER_CHILDREN
,
UIProp.MINIMUM_NUMBER_CHILDREN
,
UIProp.NAME_TEXT_VISIBLE
,
UIProp.NUMBER_FEMALE_CHILDREN
,
UIProp.NUMBER_MALE_CHILDREN
,
UIProp.OFFSPRING_MODE
,
UIProp.ORGANISM_ADDED_TO_VIEW
,
UIProp.ORGANISM_IMAGE_SIZE
,
UIProp.ORGANISM_REMOVED_FROM_VIEW
,
UIProp.PEDIGREE_TOOL_PICK_ON_ORGANISM
,
UIProp.SEX_TEXT_VISIBLE
,
UIProp.SNIP_TOOL_PICK_ON_FAMILY
,
UIProp.SNIP_TOOL_PICK_ON_ORGANISM
,
UIProp.SPECIES_TEXT_VISIBLE
,
UIProp.TEXT_INDENT
,
UIProp.TEXT_LINE_SPACING
,
UIProp.TRAIT
,
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 |
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 | |
PedigreeOrganismView()
Creates a pedigree organism view. |
Method Summary | |
void |
addFamily(Family aFamily,
int xLocation,
int yLocation)
Add a family to this view. |
void |
addOrganism(Organism anOrganism,
int xLocation,
int yLocation)
Add an organism to this view without any required ties to a family. |
void |
addOrganism(Organism anOrganism,
int xLocation,
int yLocation,
java.lang.String aTraitName)
Add an organism to this view without any required ties to a family. |
boolean |
containsOrganism(Organism anOrganism)
Returns whether or not the given organism is in this view. |
int |
findLevelForFamily(PedigreeFamily aPedigreeFamily)
Find the level containing the pedigreeFamily |
int |
findLevelForOrganism(PedigreeOrganism aPedigreeOrganism)
Find the level containing the pedigreeOrganism |
PedigreeFamily |
findPedigreeFamily(Family aFamily)
Find the pedigreeFamily corresponding to a given family |
PedigreeFamily |
findPedigreeFamily(Family aFamily,
int[] returnLevel)
Find the PedigreeFamily for the given Family |
PedigreeOrganism |
findPedigreeOrganism(Organism anOrganism)
Find the pedigreeOrganism corresponding to a given organism. |
int |
getActiveTool()
Get the active tool. |
boolean |
getCrossOverTurnOn()
Is cross over turn on? |
java.util.Enumeration |
getFamilies()
|
Family |
getFamilyForParents(Organism parentOne,
Organism parentTwo)
Get the Family for the given parent Organisms |
int |
getFixedNumberChildren()
Get the fixed number of children from a breeding. |
int |
getMaximumNumberChildren()
Get the maximum number of children from a breeding. |
int |
getMinimumNumberChildren()
Get the minimum number of children from a breeding. |
int |
getNumberFemaleChildren()
Get the number of female children to create in a family when the view is in PedigreeView.OFFSPRING_MODE_MALE_FEMALE mode. |
int |
getNumberMaleChildren()
Get the number of male children to create in a family when the view is in PedigreeView.OFFSPRING_MODE_MALE_FEMALE mode. |
int |
getNumberOfFamilies()
Get the number of pedigreeFamilies in this view. |
int |
getNumberOfOrganisms()
Get the number of pedigreeOrganisms in this view. |
int |
getOffspringMode()
Get the offspring mode |
java.util.Enumeration |
getOrganisms()
Get the set of pedigreeOrganisms in this view. |
SelectionSet |
getSelectionSet()
Get the current selection set |
Species |
getSpecies()
Get the current species. |
Trait |
getTrait()
Get the trait for this view. |
boolean |
isOnlyLiveChildren()
Is the Only Live Children flag true? |
boolean |
isOrganismImagesVisible()
Is the organism images visible? |
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 |
paintComponent(java.awt.Graphics g)
Draw the graphics in this view. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Handle property change events |
void |
removeAll()
Remove all the objects in this view, both organisms and families, without deleting anything. |
boolean |
removeFamily(Family aFamily)
Removes a family from this view. |
boolean |
removeOrganism(Organism anOrganism)
Removes an organism from this view. |
void |
selectionChanged()
Selection changed |
void |
setActiveTool(int anActiveTool)
Set the active tool |
void |
setCrossOverCheckBox(javax.swing.JCheckBox box)
|
void |
setCrossOverPossibility(double p)
|
void |
setCrossOverTurnOn(boolean on)
Set cross over turn on? |
void |
setFixedNumberChildren(int aFixedNumberChildren)
Set the fixed number of children from a breeding. |
void |
setMaximumNumberChildren(int aMaximumNumberChildren)
Set the maximum number of children from a breeding. |
void |
setMinimumNumberChildren(int aMinimumNumberChildren)
Set the minimum number of children from a breeding. |
void |
setMinMaxNumberChildren(int aMinimumNumberChildren,
int aMaximumNumberChildren)
Set the minimum and maximum number of children from a breeding. |
void |
setNumberFemaleChildren(int aNumberFemaleChildren)
Set the number of female children to create in a family when the view is in PedigreeView.OFFSPRING_MODE_MALE_FEMALE mode. |
void |
setNumberMaleChildren(int aNumberMaleChildren)
Set the number of male children to create in a family when the view is in PedigreeView.OFFSPRING_MODE_MALE_FEMALE mode. |
void |
setNumberMaleFemaleChildren(int aNumberFemaleChildren,
int aNumberMaleChildren)
Set the number of female and male children to create in a family when the view is in PedigreeView.OFFSPRING_MODE_MALE_FEMALE mode. |
void |
setOffspringMode(int anOffspringMode)
Set the offspring mode |
void |
setOffspringModePulldown(BioComboBox anOffspringModePulldown)
Set the offspring mode pulldown. |
void |
setOnlyLiveChildren(boolean anOnlyLiveChildren)
Set the Only Live Children flag |
void |
setOrganismImagesVisible(boolean visible)
Set the organism images visible |
void |
setScrollPane(javax.swing.JScrollPane aScrollPane)
Tell this view its scroll pane. |
void |
setSelectionSet(SelectionSet aSelectionSet)
Set the current selection set. |
void |
setSpecies(Species aSpecies)
Set the current species. |
void |
setTrait(java.lang.String aTraitName)
Set the trait for this view. |
void |
setTraitPulldown(BioComboBox aTraitPulldown)
Set the trait pulldown. |
Methods inherited from class org.concord.biologica.ui.UIView |
addPropertyChangeListener, getLocalImage, getPreferredSize, 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, 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 |
Constructor Detail |
public PedigreeOrganismView()
Method Detail |
public void setScrollPane(javax.swing.JScrollPane aScrollPane)
setScrollPane
in class UIView
aScrollPane
- JScrollPane - the scroll pane containing this viewpublic int getOffspringMode()
public void setOffspringMode(int anOffspringMode)
anOffspringMode
- int - the new offspring modejava.lang.IllegalArgumentException
- - input offspring mode illegalpublic SelectionSet getSelectionSet()
getSelectionSet
in interface SelectionPresenter
public void setSelectionSet(SelectionSet aSelectionSet)
setSelectionSet
in interface SelectionPresenter
aSelectionSet
- SelectionSet - a new selection setpublic boolean isOrganismImagesVisible()
public void setOrganismImagesVisible(boolean visible)
visible
- boolean - visible?public boolean isOnlyLiveChildren()
public void setOnlyLiveChildren(boolean anOnlyLiveChildren)
anOnlyLiveChildren
- boolean - only live children?public int getActiveTool()
public void setActiveTool(int anActiveTool)
anActiveTool
- int - the new active toolpublic void addFamily(Family aFamily, int xLocation, int yLocation)
If neither parent is in the view, the given x, y coordinates are used to place the mother organism and then the father and children positions are calculated relative to the mother's position.
aFamily
- Family - a family to add, may not be null nor already in the viewxLocation
- int - x location of first parent organism, ignored if a parent already in viewyLocation
- int - y location of first parent organism, ignored if a parent already in viewjava.lang.IllegalArgumentException
- - input organism nullpublic boolean removeFamily(Family aFamily)
aFamily
- Family - a family, may be nullpublic int getNumberOfFamilies()
public void addOrganism(Organism anOrganism, int xLocation, int yLocation, java.lang.String aTraitName)
Note: X and Y locations are now ignored. Placement is done via new PedigreeLevel class. This interface should be changed to take a level number instead of X and Y coordinates.
anOrganism
- Organism - an organism to add, may not be nullxLocation
- int - x location of organismyLocation
- int - y location of organismaTraitName
- String - a trait name, if null then full organism images will be shownjava.lang.IllegalArgumentException
- - input organism nullpublic void addOrganism(Organism anOrganism, int xLocation, int yLocation)
Note: X and Y locations are now ignored. Placement is done via new PedigreeLevel class. This interface should be changed to take a level number instead of X and Y coordinates.
anOrganism
- Organism - an organism to add, may not be nullxLocation
- int - x location of organismyLocation
- int - y location of organismjava.lang.IllegalArgumentException
- - input organism nullpublic boolean removeOrganism(Organism anOrganism)
anOrganism
- Organism - an organism, may be nullpublic int getNumberOfOrganisms()
public java.util.Enumeration getOrganisms()
public java.util.Enumeration getFamilies()
public void removeAll()
Remove all the listeners and then the objects.
removeAll
in class java.awt.Container
public Species getSpecies()
public void setSpecies(Species aSpecies)
aSpecies
- Species - new current species, may be nullpublic void setTraitPulldown(BioComboBox aTraitPulldown)
aTraitPulldown
- BioComboBox - a trait pulldown, may be nullpublic void setCrossOverCheckBox(javax.swing.JCheckBox box)
public void setOffspringModePulldown(BioComboBox anOffspringModePulldown)
anOffspringPulldown
- BioComboBox - an offspring pulldown, may be nullpublic Trait getTrait()
public void setTrait(java.lang.String aTraitName)
aTraitName
- String - the name of the trait to draw, may be null to cause whole organisms to be drawnpublic int getFixedNumberChildren()
public void setFixedNumberChildren(int aFixedNumberChildren)
aFixedNumberChildren
- int - fixed number of children from a breedingjava.lang.IllegalArgumentException
- - new fixed number illegalpublic int getMaximumNumberChildren()
public void setMaximumNumberChildren(int aMaximumNumberChildren)
aMaximumNumberChildren
- int - maximum number of children from a breedingjava.lang.IllegalArgumentException
- - new maximum illegal, may be less than minimumpublic int getMinimumNumberChildren()
public void setMinimumNumberChildren(int aMinimumNumberChildren)
aMinimumNumberChildren
- int - minimum number of children from a breedingjava.lang.IllegalArgumentException
- - new minimum illegal, may be more than maximumpublic void setMinMaxNumberChildren(int aMinimumNumberChildren, int aMaximumNumberChildren)
aMinimumNumberChildren
- int - minimum number of children from a breedingaMaximumNumberChildren
- int - maximum number of children from a breedingjava.lang.IllegalArgumentException
- - new minimum illegal, may be more than maximumpublic int getNumberFemaleChildren()
public void setNumberFemaleChildren(int aNumberFemaleChildren)
aNumberFemaleChildren
- int - new number of female children, must be >= 0java.lang.IllegalArgumentException
- - new value illegalpublic int getNumberMaleChildren()
public void setNumberMaleChildren(int aNumberMaleChildren)
aNumberMaleChildren
- int - new number of male children, must be >= 0java.lang.IllegalArgumentException
- - new value illegalpublic void setNumberMaleFemaleChildren(int aNumberFemaleChildren, int aNumberMaleChildren)
aNumberFemaleChildren
- int - new number of female children, must be >= 0aNumberMaleChildren
- int - new number of male children, must be >= 0java.lang.IllegalArgumentException
- - new value illegalpublic boolean containsOrganism(Organism anOrganism)
anOrganism
- Organism - the organism to findpublic PedigreeOrganism findPedigreeOrganism(Organism anOrganism)
anOrganism
- Organism - the organism to findpublic PedigreeFamily findPedigreeFamily(Family aFamily)
aFamily
- Family - the family to findpublic PedigreeFamily findPedigreeFamily(Family aFamily, int[] returnLevel)
aFamily
- Family - the Family to findreturnLevel
- int[] - the resulting level (in the first array element)public int findLevelForOrganism(PedigreeOrganism aPedigreeOrganism)
aPedigreeOrganism
- PedigreeOrganism - the pedigree organism to findpublic int findLevelForFamily(PedigreeFamily aPedigreeFamily)
aPedigreeFamily
- PedigreeFamily - the pedigree organism to findpublic Family getFamilyForParents(Organism parentOne, Organism parentTwo)
parentOne
- Organism - the first parent OrganismparentTwo
- Organism - the second parent Organismpublic void setCrossOverTurnOn(boolean on)
public boolean getCrossOverTurnOn()
public void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
g
- Graphics - the given graphics to use in drawingpublic void mouseClicked(java.awt.event.MouseEvent event)
mouseClicked
in interface java.awt.event.MouseListener
event
- MouseEvent - the event objectpublic void mouseEntered(java.awt.event.MouseEvent event)
mouseEntered
in interface java.awt.event.MouseListener
event
- MouseEvent - the event objectpublic void mouseExited(java.awt.event.MouseEvent event)
mouseExited
in interface java.awt.event.MouseListener
event
- MouseEvent - the event objectpublic void mousePressed(java.awt.event.MouseEvent event)
mousePressed
in interface java.awt.event.MouseListener
event
- MouseEvent - the event objectpublic void mouseReleased(java.awt.event.MouseEvent event)
mouseReleased
in interface java.awt.event.MouseListener
event
- MouseEvent - the event objectpublic void mouseDragged(java.awt.event.MouseEvent event)
mouseDragged
in interface java.awt.event.MouseMotionListener
event
- MouseEvent - the event objectpublic void mouseMoved(java.awt.event.MouseEvent event)
mouseMoved
in interface java.awt.event.MouseMotionListener
event
- MouseEvent - the event objectpublic void selectionChanged()
selectionChanged
in interface SelectionPresenter
public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange
in interface java.beans.PropertyChangeListener
event
- PropertyChangeEvent - the property change eventpublic void setCrossOverPossibility(double p)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |