public class SynapseGroupNodeBidirectional extends org.piccolo2d.PNode implements java.beans.PropertyChangeListener, SynapseGroupArrow, GroupNode
FILL_STRATEGY_ASPECT_COVER, FILL_STRATEGY_ASPECT_FIT, FILL_STRATEGY_EXACT_FIT, PROPERTY_BOUNDS, PROPERTY_CHILDREN, PROPERTY_CHILDREN_PICKABLE, PROPERTY_CLIENT_PROPERTIES, PROPERTY_CODE_BOUNDS, PROPERTY_CODE_CHILDREN, PROPERTY_CODE_CHILDREN_PICKABLE, PROPERTY_CODE_CLIENT_PROPERTIES, PROPERTY_CODE_FULL_BOUNDS, PROPERTY_CODE_PAINT, PROPERTY_CODE_PARENT, PROPERTY_CODE_PICKABLE, PROPERTY_CODE_TRANSFORM, PROPERTY_CODE_TRANSPARENCY, PROPERTY_CODE_VISIBLE, PROPERTY_FULL_BOUNDS, PROPERTY_PAINT, PROPERTY_PARENT, PROPERTY_PICKABLE, PROPERTY_TRANSFORM, PROPERTY_TRANSPARENCY, PROPERTY_VISIBLE, SCENE_GRAPH_DELEGATE
Modifier and Type | Method and Description |
---|---|
static SynapseGroupNodeBidirectional |
createBidirectionalSynapseGN(NetworkPanel networkPanel,
SynapseGroup synGroup1,
SynapseGroup synGroup2)
Create a bidirectional simple synapse group PNode.
|
void |
determineProperEndPoints()
Determines what the end points should be depending on what this arrow
connects.
|
java.awt.geom.Point2D |
getEndPt() |
SynapseGroup |
getGroup() |
SynapseGroup |
getGroup2() |
java.util.List<InteractionBox> |
getInteractionBoxes()
Returns a list of child interaction boxes, or null if
it does not contain an interaction box.
|
java.awt.geom.Point2D |
getOpposingDefaultPosition(NeuronGroup ng)
Based on the NeuronGroup at either end of this arrow, gives a "dummy"
default opposing position.
|
float |
getRequiredSpacing() |
java.awt.geom.Point2D |
getStartPt() |
SynapseGroup[] |
getSynapseGroups() |
void |
layout(java.awt.geom.Point2D src,
java.awt.geom.Point2D tar)
Lays out the arrow(s) between the two specified points.
|
void |
layoutChildren()
Override PNode layoutChildren method in order to properly set the
positions of children nodes.
|
void |
layoutChildrenQuiet(java.awt.geom.Point2D pt1,
java.awt.geom.Point2D pt2)
Lays out the child nodes of the class implementing this interface in
a way that expressly ensures that layoutChildren() will not be called
concurrently until this method has fully completed.
|
java.awt.geom.Point2D |
midpoint(java.awt.geom.Point2D pt1,
java.awt.geom.Point2D pt2)
Returns the midpoint for for
|
void |
propertyChange(java.beans.PropertyChangeEvent evt) |
void |
removeFromParent()
TODO: Not sure why below is needed.
|
void |
updateConstituentNodes()
Update all pnode constituents of this group node to update their
visible state (in the case of synapse group nodes, only do this
if there are visible synapses).
|
void |
updateText()
Updates the text in the interaction boxes of the group.
|
addActivity, addAttribute, addChild, addChild, addChildren, addInputEventListener, addPropertyChangeListener, addPropertyChangeListener, animateToBounds, animateToColor, animateToPositionScaleRotation, animateToRelativePosition, animateToTransform, animateToTransparency, animateTransformToBounds, centerBoundsOnPoint, centerFullBoundsOnPoint, clone, computeFullBounds, endResizeBounds, findIntersectingNodes, fireChildPropertyChange, firePropertyChange, fullIntersects, fullPaint, fullPick, getAllNodes, getAllNodes, getAttribute, getAttribute, getBooleanAttribute, getBounds, getBoundsChanged, getBoundsReference, getBoundsVolatile, getChild, getChildBoundsInvalid, getChildBoundsVolatile, getChildPaintInvalid, getChildrenCount, getChildrenIterator, getChildrenPickable, getChildrenReference, getClientProperties, getClientPropertyKeysEnumeration, getDoubleAttribute, getFullBounds, getFullBoundsInvalid, getFullBoundsReference, getGlobalBounds, getGlobalFullBounds, getGlobalRotation, getGlobalScale, getGlobalToLocalTransform, getGlobalTranslation, getHeight, getInputEventListeners, getIntegerAttribute, getInverseTransform, getListenerList, getLocalToGlobalTransform, getName, getOccluded, getOffset, getPaint, getPaintInvalid, getParent, getPickable, getPropertyChangeParentMask, getRoot, getRotation, getScale, getTransform, getTransformReference, getTransparency, getUnionOfChildrenBounds, getVisible, getWidth, getX, getXOffset, getY, getYOffset, globalToLocal, globalToLocal, globalToLocal, indexOfChild, internalUpdateBounds, intersects, invalidateFullBounds, invalidateLayout, invalidatePaint, isAncestorOf, isDescendentOf, isDescendentOfRoot, isOpaque, lerp, localToGlobal, localToGlobal, localToGlobal, localToParent, localToParent, localToParent, lower, lower, lowerBelow, lowerToBottom, lowerToBottom, offset, paint, paintAfterChildren, parentBoundsChanged, parentToLocal, parentToLocal, parentToLocal, pick, pickAfterChildren, print, print, raise, raise, raiseAbove, raiseToTop, raiseToTop, removeAllChildren, removeChild, removeChild, removeChildren, removeInputEventListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaintFrom, reparent, replaceWith, resetBounds, rotate, rotateAboutPoint, rotateAboutPoint, rotateInPlace, scale, scaleAboutPoint, scaleAboutPoint, setBounds, setBounds, setBoundsChanged, setChildBoundsInvalid, setChildBoundsVolatile, setChildPaintInvalid, setChildrenPickable, setFullBoundsInvalid, setGlobalRotation, setGlobalScale, setGlobalTranslation, setHeight, setName, setOccluded, setOffset, setOffset, setPaint, setPaintInvalid, setParent, setPickable, setPropertyChangeParentMask, setRotation, setScale, setTransform, setTransparency, setVisible, setWidth, setX, setY, signalBoundsChanged, startResizeBounds, toImage, toImage, toImage, toImage, transformBy, translate, validateFullBounds, validateFullPaint
public static SynapseGroupNodeBidirectional createBidirectionalSynapseGN(NetworkPanel networkPanel, SynapseGroup synGroup1, SynapseGroup synGroup2)
networkPanel
- parent panelsynGroup1
- the synapse groupsynGroup2
- public void layoutChildren()
layoutChildren
in class org.piccolo2d.PNode
public void layout(java.awt.geom.Point2D src, java.awt.geom.Point2D tar)
SynapseGroupArrow
SynapseGroupArrow.layoutChildrenQuiet(Point2D, Point2D)
should call this method.layout
in interface SynapseGroupArrow
public void layoutChildrenQuiet(java.awt.geom.Point2D pt1, java.awt.geom.Point2D pt2)
SynapseGroupArrow
layoutChildrenQuiet
in interface SynapseGroupArrow
pt1
- the start point, if null should be replaced by the arrow's
current start point. If the arrow doesn't have a start point yet,
SynapseGroupArrow.getOpposingDefaultPosition(NeuronGroup)
should be called using
the neuron group opposite to this point.pt2
- pt1 the end point, if null should be replaced by the arrow's
current end point. If the arrow doesn't have an end point yet,
SynapseGroupArrow.getOpposingDefaultPosition(NeuronGroup)
should be called using
the neuron group opposite to this point.public java.awt.geom.Point2D midpoint(java.awt.geom.Point2D pt1, java.awt.geom.Point2D pt2)
midpoint
in interface SynapseGroupArrow
pt1
- the first pointpt2
- the second pointpublic void determineProperEndPoints()
determineProperEndPoints
in interface SynapseGroupArrow
public java.awt.geom.Point2D getOpposingDefaultPosition(NeuronGroup ng)
getOpposingDefaultPosition
in interface SynapseGroupArrow
ng
- the neuron group for the known endpointpublic void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
public void removeFromParent()
removeFromParent
in class org.piccolo2d.PNode
public SynapseGroup getGroup()
getGroup
in interface SynapseGroupArrow
public SynapseGroup getGroup2()
public SynapseGroup[] getSynapseGroups()
public java.awt.geom.Point2D getStartPt()
getStartPt
in interface SynapseGroupArrow
public java.awt.geom.Point2D getEndPt()
getEndPt
in interface SynapseGroupArrow
public float getRequiredSpacing()
getRequiredSpacing
in interface SynapseGroupArrow
public void updateConstituentNodes()
GroupNode
updateConstituentNodes
in interface GroupNode
public java.util.List<InteractionBox> getInteractionBoxes()
GroupNode
getInteractionBoxes
in interface GroupNode
public void updateText()