|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.umd.cs.piccolo.PNode
org.simbrain.network.nodes.ScreenElement
org.simbrain.network.nodes.NeuronNode
public class NeuronNode
NeuronNode is a Piccolo PNode corresponding to a Neuron in the neural network model.
| Field Summary | |
|---|---|
static Font |
IN_OUT_FONT
Font for input and output labels. |
static Font |
NEURON_FONT
Neuron Font. |
static Font |
NEURON_FONT_BOLD
Neuron font bold. |
static Font |
NEURON_FONT_SMALL
Neuron font small. |
static Font |
NEURON_FONT_VERYSMALL
Neuron font very small. |
| Fields inherited from class edu.umd.cs.piccolo.PNode |
|---|
PROPERTY_BOUNDS, PROPERTY_CHILDREN, PROPERTY_CHILDREN_PICKABLE, PROPERTY_CLIENT_PROPERTIES, PROPERTY_FULL_BOUNDS, PROPERTY_PAINT, PROPERTY_PARENT, PROPERTY_PICKABLE, PROPERTY_TRANSFORM, PROPERTY_TRANSPARENCY, PROPERTY_VISIBLE |
| Fields inherited from interface java.awt.print.Printable |
|---|
NO_SUCH_PAGE, PAGE_EXISTS |
| Constructor Summary | |
|---|---|
NeuronNode()
Default constructor; used by Castor. |
|
NeuronNode(double x,
double y)
Initialize a NeuronNode to a location. |
|
NeuronNode(NetworkPanel net,
Neuron neuron)
Create a new neuron node. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
|
protected JPopupMenu |
createContextMenu()
|
Point2D |
getCenter()
Return the center of this node (the circle) in global coordinates. |
Set |
getConnectedSynapses()
|
protected JPopupMenu |
getContextMenu()
Return a context menu specific to this screen element. |
static int |
getDIAMETER()
|
String |
getId()
|
Neuron |
getNeuron()
Return the neuron for this neuron node. |
protected JDialog |
getPropertyDialog()
Return a property dialog for this screen element. |
protected String |
getToolTipText()
Return a String to use as tool tip text for this screen element. |
double |
getXpos()
|
double |
getYpos()
|
protected boolean |
hasContextMenu()
Return true if this screen element has a context menu. |
protected boolean |
hasPropertyDialog()
Return true if this screen element has a property dialog. |
protected boolean |
hasToolTipText()
Return true if this screen element has tool tip text. |
void |
initCastor(NetworkPanel net)
Initializes relevant data after a ScreenElement has been unmarshalled via Castor. |
boolean |
isDraggable()
Return true if this screen element is draggable. |
boolean |
isSelectable()
Return true if this screen element is selectable. |
void |
propertyChange(PropertyChangeEvent event)
|
void |
resetColors()
Reset colors when default colors have been changed in NetworkPreferences. |
void |
setId(String id)
|
void |
setNeuron(Neuron neuron)
Set the neuron for this neuron node to neuron. |
void |
setXpos(double xpos)
|
void |
setYpos(double ypos)
|
boolean |
showSelectionHandle()
Return true if this screen element should show a
selection handle. |
String |
toString()
Returns String representation of this NeuronNode. |
void |
update()
Update the neuron view based on the model neuron. |
void |
updateAttachmentStatus()
Change the color of input and output nodes to reflect whether they are 'attached' to an agent in a world. |
void |
updateInArrow()
Updates graphics depending on whether this is an input node or not. |
void |
updateInLabel()
Update the label showing sensory coupling information. |
void |
updateModelNeuronPosition()
Update the position of the model neuron based on the global coordinates of this pnode. |
void |
updateOutArrow()
Updates graphics depending on whether this is an output node or not. |
void |
updateOutLabel()
Update the label showing sensory coupling information. |
void |
updateSynapseNodePositions()
Update connected synapse node positions. |
| Methods inherited from class org.simbrain.network.nodes.ScreenElement |
|---|
getNetworkPanel, setNetworkPanel |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Font IN_OUT_FONT
public static final Font NEURON_FONT
public static final Font NEURON_FONT_BOLD
public static final Font NEURON_FONT_SMALL
public static final Font NEURON_FONT_VERYSMALL
| Constructor Detail |
|---|
public NeuronNode()
public NeuronNode(double x,
double y)
x - x coordinate of NeuronNodey - y coordinate of NeuronNode
public NeuronNode(NetworkPanel net,
Neuron neuron)
net - Reference to NetworkPanelneuron - reference to model neuron| Method Detail |
|---|
public void initCastor(NetworkPanel net)
ScreenElementScreenElement has been unmarshalled via Castor.
initCastor in class ScreenElementnet - network panelScreenElementpublic boolean isSelectable()
ScreenElementtrue if this screen element is selectable.
Being selectable requires that this screen element is pickable
as far as the Piccolo API is concerned, so if this method returns
true, be sure that this class also returns true
for its getPickable() method.
isSelectable in class ScreenElementScreenElementpublic boolean showSelectionHandle()
ScreenElementtrue if this screen element should show a
selection handle.
Showing a selection handle requires that this screen element is pickable
as far as the Piccolo API is concerned, so if this method returns
true, be sure that this class also returns true
for its getPickable() method.
Showing a selection handle also requires that this screen element is selectable,
so if this method returns true, be sure that this class also
returns true for its isSelectable() method.
showSelectionHandle in class ScreenElementScreenElementpublic boolean isDraggable()
ScreenElementtrue if this screen element is draggable.
Being draggable requires that this screen element is pickable
as far as the Piccolo API is concerned, so if this method returns
true, be sure that this class also returns true
for its getPickable() method.
Being draggable also requires that this screen element is selectable,
so if this method returns true, be sure that this class also
returns true for its isSelectable() method.
isDraggable in class ScreenElementScreenElementprotected boolean hasToolTipText()
ScreenElementtrue if this screen element has tool tip text.
If this screen element does not have tool tip text, a tool tip
event handler will not be registered.
hasToolTipText in class ScreenElementScreenElementprotected String getToolTipText()
ScreenElementString to use as tool tip text for this screen element.
Return null if this screen element does not have tool tip text
or to temporarily prevent the tool tip from displaying.
getToolTipText in class ScreenElementString to use as tool tip text for this screen elementScreenElementprotected boolean hasContextMenu()
ScreenElementtrue if this screen element has a context menu.
If this screen element does not have a context menu, a context menu
event handler will not be registered.
hasContextMenu in class ScreenElementScreenElementpublic Point2D getCenter()
protected JPopupMenu getContextMenu()
ScreenElementnull if this screen element does not have a context
menu.
getContextMenu in class ScreenElementScreenElementprotected boolean hasPropertyDialog()
ScreenElementtrue if this screen element has a property dialog.
If this screen element does not have a property dialog, a property
dialog event handler will not be registered.
hasPropertyDialog in class ScreenElementScreenElementprotected JDialog getPropertyDialog()
ScreenElementnull if this screen element does not have a
property dialog.
getPropertyDialog in class ScreenElementScreenElementpublic void update()
public void updateInArrow()
public void updateOutArrow()
public void updateInLabel()
public void updateOutLabel()
public String toString()
toString in class PNodepublic Neuron getNeuron()
public void setNeuron(Neuron neuron)
neuron.
This is a bound property.
neuron - neuron for this neuron nodeprotected JPopupMenu createContextMenu()
ScreenElementpublic void propertyChange(PropertyChangeEvent event)
propertyChange in interface PropertyChangeListenerPropertyChangeListenerpublic void updateModelNeuronPosition()
public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerActionListenerpublic static int getDIAMETER()
public Set getConnectedSynapses()
public void updateSynapseNodePositions()
public String getId()
public void setId(String id)
id - The id to set.public double getXpos()
public void setXpos(double xpos)
xpos - The xpos to set.public double getYpos()
public void setYpos(double ypos)
ypos - The ypos to set.public void updateAttachmentStatus()
public void resetColors()
ScreenElementNetworkPreferences.
resetColors in class ScreenElementScreenElement
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||