public class NeuronGroupNode extends org.piccolo2d.PNode implements GroupNode, java.beans.PropertyChangeListener
SubnetworkNode
.Modifier and Type | Class and Description |
---|---|
class |
NeuronGroupNode.NeuronGroupInteractionBox
Custom interaction box for Subnetwork node.
|
static class |
NeuronGroupNode.Port |
Modifier and Type | Field and Description |
---|---|
protected javax.swing.Action |
clampNeuronsAction
Action for clamping neurons
|
protected javax.swing.Action |
removeAction
Action for removing this group
|
protected javax.swing.Action |
renameAction
Action for editing the group name.
|
protected javax.swing.Action |
testInputsAction
Open a window for sending inputs to this neuron group.
|
protected javax.swing.Action |
unclampNeuronsAction
Action for unclamping neurons
|
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
Constructor and Description |
---|
NeuronGroupNode(NetworkPanel networkPanel,
NeuronGroup group)
Create a Neuron Group PNode.
|
Modifier and Type | Method and Description |
---|---|
void |
addCustomMenuItem(javax.swing.JMenuItem item)
Add a custom menu item to the list.
|
void |
addNeuronNode(NeuronNode node)
Add a neuron node to the group node.
|
java.util.HashMap<java.awt.geom.Point2D,SynapseGroupArrow> |
generateTerminaMappings(java.util.Set<SynapseGroupArrow> synGroups) |
javax.swing.JPopupMenu |
getDefaultContextMenu()
Returns default actions for a context menu.
|
java.awt.geom.Point2D |
getDockingPoint(NeuronGroupNode.Port port,
SynapseGroupArrow synGN) |
java.util.HashMap<NeuronGroupNode.Port,java.util.HashMap<SynapseGroupArrow,java.awt.geom.Point2D>> |
getDockingPorts() |
NeuronGroupNode.NeuronGroupInteractionBox |
getInteractionBox() |
java.util.List<InteractionBox> |
getInteractionBoxes()
Returns a list of child interaction boxes, or null if
it does not contain an interaction box.
|
NetworkPanel |
getNetworkPanel() |
NeuronGroup |
getNeuronGroup()
Get a reference to the underlying neuron group.
|
java.awt.geom.Point2D |
getTerminus(SynapseGroupArrow synGN) |
void |
layoutChildren()
Override PNode layoutChildren method in order to properly set the
positions of children nodes.
|
void |
offset(double dx,
double dy) |
void |
propertyChange(java.beans.PropertyChangeEvent evt) |
java.util.LinkedHashMap<java.awt.geom.Point2D,java.awt.geom.Point2D> |
proposeMapping(java.util.List<java.awt.geom.Point2D> dockPoints,
java.util.Set<SynapseGroupArrow> groups,
NeuronGroupNode.Port port) |
void |
removeNeuronNode(NeuronNode node)
Remove a neuron node from the group node.
|
void |
removeSynapseDock(NeuronGroupNode.Port port,
SynapseGroupArrow synGN) |
protected void |
setInteractionBox(NeuronGroupNode.NeuronGroupInteractionBox newBox)
Set a custom interaction box.
|
java.util.LinkedHashMap<java.awt.geom.Point2D,java.awt.geom.Point2D> |
untangle(java.util.LinkedHashMap<java.awt.geom.Point2D,java.awt.geom.Point2D> map,
java.util.HashMap<java.awt.geom.Point2D,SynapseGroupArrow> terminaMap) |
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 |
updateSynapseNodePositions()
Call update synapse node positions on all constituent neuron nodes.
|
void |
updateText()
Update the text in the interaction box.
|
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, paint, paintAfterChildren, parentBoundsChanged, parentToLocal, parentToLocal, parentToLocal, pick, pickAfterChildren, print, print, raise, raise, raiseAbove, raiseToTop, raiseToTop, removeAllChildren, removeChild, removeChild, removeChildren, removeFromParent, 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
protected javax.swing.Action renameAction
protected javax.swing.Action removeAction
protected javax.swing.Action clampNeuronsAction
protected javax.swing.Action unclampNeuronsAction
protected javax.swing.Action testInputsAction
public NeuronGroupNode(NetworkPanel networkPanel, NeuronGroup group)
networkPanel
- parent panelgroup
- the neuron grouppublic java.util.HashMap<NeuronGroupNode.Port,java.util.HashMap<SynapseGroupArrow,java.awt.geom.Point2D>> getDockingPorts()
public void layoutChildren()
layoutChildren
in class org.piccolo2d.PNode
public NetworkPanel getNetworkPanel()
public NeuronGroup getNeuronGroup()
public void addCustomMenuItem(javax.swing.JMenuItem item)
item
- the custom item to addpublic void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
public void updateSynapseNodePositions()
public void updateConstituentNodes()
GroupNode
updateConstituentNodes
in interface GroupNode
public void offset(double dx, double dy)
offset
in class org.piccolo2d.PNode
public void addNeuronNode(NeuronNode node)
node
- to addpublic void removeNeuronNode(NeuronNode node)
node
- to removepublic javax.swing.JPopupMenu getDefaultContextMenu()
public NeuronGroupNode.NeuronGroupInteractionBox getInteractionBox()
protected void setInteractionBox(NeuronGroupNode.NeuronGroupInteractionBox newBox)
newBox
- the newBox to set.public void updateText()
public java.awt.geom.Point2D getDockingPoint(NeuronGroupNode.Port port, SynapseGroupArrow synGN)
port
- synGN
- public java.util.LinkedHashMap<java.awt.geom.Point2D,java.awt.geom.Point2D> proposeMapping(java.util.List<java.awt.geom.Point2D> dockPoints, java.util.Set<SynapseGroupArrow> groups, NeuronGroupNode.Port port)
dockPoints
- groups
- port
- public java.util.LinkedHashMap<java.awt.geom.Point2D,java.awt.geom.Point2D> untangle(java.util.LinkedHashMap<java.awt.geom.Point2D,java.awt.geom.Point2D> map, java.util.HashMap<java.awt.geom.Point2D,SynapseGroupArrow> terminaMap)
map
- terminaMap
- public java.awt.geom.Point2D getTerminus(SynapseGroupArrow synGN)
synGN
- public java.util.HashMap<java.awt.geom.Point2D,SynapseGroupArrow> generateTerminaMappings(java.util.Set<SynapseGroupArrow> synGroups)
synGroups
- public void removeSynapseDock(NeuronGroupNode.Port port, SynapseGroupArrow synGN)
public java.util.List<InteractionBox> getInteractionBoxes()
GroupNode
getInteractionBoxes
in interface GroupNode