net.openai.ai.nn.gui.data
Class DefaultGUINeuron
java.lang.Object
|
+--net.openai.ai.nn.gui.data.AbstractDataObject
|
+--net.openai.ai.nn.gui.data.AbstractGUINeuron
|
+--net.openai.ai.nn.gui.data.DefaultGUINeuron
- All Implemented Interfaces:
- ConnectionEventListener, DataObject, Drawable, GUINeuron
- public class DefaultGUINeuron
- extends AbstractGUINeuron
- implements ConnectionEventListener
A visual representation of a neuron.
The neuron is represented by a java-AWT Polygon.
This Polygon is also used as a delegation object for the shape interface.
- Version:
- $Id: DefaultGUINeuron.java,v 1.6 2002/02/28 17:11:40 tweber Exp $
History:
$Log: DefaultGUINeuron.java,v $
Revision 1.6 2002/02/28 17:11:40 tweber
updated to work with the changed event-system
Revision 1.5 2002/02/28 15:34:20 tweber
A lot of changes to make 'addLayer' working
Revision 1.4 2002/02/20 20:25:13 tweber
- able to handle a connectionAdded event.
- Author:
- Thomas Weber
Field Summary |
protected java.awt.Polygon |
polygon
|
Method Summary |
boolean |
contains(double x,
double y)
Checks if x,y is within the objects visual representation |
void |
handleConnectionEvent(ConnectionEvent event)
Method declaration |
void |
paint(java.awt.Graphics g,
double zoom)
This routine renders the neuron |
Methods inherited from class net.openai.ai.nn.gui.data.AbstractGUINeuron |
addConnection, getConnections, getConnectionState, getID, getLayerID, getNeuron, getSelected, getType, getX, getY, removeConnection, setID, setSelected, setX, setY |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
polygon
protected java.awt.Polygon polygon
DefaultGUINeuron
public DefaultGUINeuron(Neuron mNeuron,
int x,
int y,
int mType)
- Constructs a new GUINeuron
- Parameters:
mNeuron
- Neuron that will be encapsulated herex
- X-Position on the screeny
- Y-Position on the screenmType
- Type of the neuron, 0 input, 1 output, 2 hidden
DefaultGUINeuron
public DefaultGUINeuron(Network network,
Neuron neuron)
- Construct a new GUINeuron out of a neuron-instance
contains
public boolean contains(double x,
double y)
- Checks if x,y is within the objects visual representation
- Specified by:
contains
in interface Drawable
paint
public void paint(java.awt.Graphics g,
double zoom)
- This routine renders the neuron
- Specified by:
paint
in interface Drawable
handleConnectionEvent
public void handleConnectionEvent(ConnectionEvent event)
- Description copied from interface:
ConnectionEventListener
- Method declaration
- Specified by:
handleConnectionEvent
in interface ConnectionEventListener
- Parameters:
event
- - See Also:
Copyright - 2001 OpenAI Labs. All Rights Reserved.