net.openai.ai.nn.gui.data
Class AbstractGUINeuron

java.lang.Object
  |
  +--net.openai.ai.nn.gui.data.AbstractDataObject
        |
        +--net.openai.ai.nn.gui.data.AbstractGUINeuron
All Implemented Interfaces:
DataObject, Drawable, GUINeuron
Direct Known Subclasses:
DefaultGUINeuron

public abstract class AbstractGUINeuron
extends AbstractDataObject
implements GUINeuron

Implements the non-gui parts of the GUINeuron interface.

Version:
$Id: AbstractGUINeuron.java,v 1.4 2002/03/17 18:06:17 tweber Exp $ History:
$Log: AbstractGUINeuron.java,v $
Revision 1.4 2002/03/17 18:06:17 tweber
Additional methods for the propertysystem

Revision 1.3 2002/02/28 15:34:20 tweber
A lot of changes to make 'addLayer' working

Revision 1.2 2002/02/14 23:22:05 gleo
Jindent run through.

Revision 1.1 2002/02/13 09:15:22 tweber
Initial release of a new GUI-datamodel

Revision 1.1 2002/01/15 23:31:41 gleo
adding files to conform to naming conventions and some new updates
Author:
Peter Hanson / Thomas Weber

Field Summary
protected  Neuron neuron
          the encapsulated neuron that will be displayed
protected  boolean selected
          selection state
protected  int type
          Types 0 input 1 ouput 2 hidden -1 *shrugs*
protected  int x
          actual x position on the screen
protected  int y
          actual y position on the screen
 
Constructor Summary
AbstractGUINeuron(Neuron mNeuron, int x, int y, int mType)
          Constructs a new GUINeuron.
 
Method Summary
 void addConnection(Connection connection)
          Adds a new Connection
 java.util.Vector getConnections()
          Returns all Connections to other Neurons
 java.lang.String getConnectionState()
           
 long getID()
          Returns the ID of the object
 long getLayerID()
           
 Neuron getNeuron()
          Returns the neuron.
 boolean getSelected()
          Returns the 'selected' state
 int getType()
          Gets back the type of the GUINeuron
 int getX()
          Returns actual X-Position on the Screen
 int getY()
          Returns actual X-Position on the Screen
 void removeConnection(Connection connection)
          Remove a connection to another neuron
 void setID(long lID)
          Sets the ID of the object
 void setSelected(boolean s)
          Sets the selected - flag.
 void setX(int x)
          Set Y-Position on the Screen
 void setY(int y)
          Set X-Position on the Screen
 
Methods inherited from class net.openai.ai.nn.gui.data.AbstractDataObject
getParent, getSibbling, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.openai.ai.nn.gui.data.Drawable
contains, paint
 
Methods inherited from interface net.openai.ai.nn.gui.data.DataObject
getParent, getSibbling, setParent
 

Field Detail

neuron

protected Neuron neuron
the encapsulated neuron that will be displayed


x

protected int x
actual x position on the screen


y

protected int y
actual y position on the screen


selected

protected boolean selected
selection state


type

protected int type
Types 0 input 1 ouput 2 hidden -1 *shrugs*

Constructor Detail

AbstractGUINeuron

public AbstractGUINeuron(Neuron mNeuron,
                         int x,
                         int y,
                         int mType)
Constructs a new GUINeuron.

Parameters:
mNeuron - Neuron that will be encapsulated here
x - X-Position on the screen
y - Y-Position on the screen
mType - Type of the neuron, 0 input, 1 output, 2 hidden
Method Detail

getNeuron

public Neuron getNeuron()
Returns the neuron.

Specified by:
getNeuron in interface GUINeuron

getX

public int getX()
Returns actual X-Position on the Screen

Specified by:
getX in interface GUINeuron

setX

public void setX(int x)
Set Y-Position on the Screen

Specified by:
setX in interface GUINeuron

getY

public int getY()
Returns actual X-Position on the Screen

Specified by:
getY in interface GUINeuron

setY

public void setY(int y)
Set X-Position on the Screen

Specified by:
setY in interface GUINeuron

getType

public int getType()
Gets back the type of the GUINeuron

Specified by:
getType in interface GUINeuron

setSelected

public void setSelected(boolean s)
Sets the selected - flag. If this flag is true, the GUINeuron will apear highlighted on the screen.

Specified by:
setSelected in interface Drawable
Parameters:
s - true=selected, false=not selected

getSelected

public boolean getSelected()
Returns the 'selected' state

Specified by:
getSelected in interface Drawable

getConnections

public final java.util.Vector getConnections()
Returns all Connections to other Neurons

Specified by:
getConnections in interface GUINeuron

addConnection

public void addConnection(Connection connection)
Adds a new Connection

Specified by:
addConnection in interface GUINeuron

removeConnection

public void removeConnection(Connection connection)
Remove a connection to another neuron

Specified by:
removeConnection in interface GUINeuron

setID

public void setID(long lID)
Sets the ID of the object

Specified by:
setID in interface DataObject
Overrides:
setID in class AbstractDataObject

getID

public long getID()
Returns the ID of the object

Specified by:
getID in interface DataObject
Overrides:
getID in class AbstractDataObject

getLayerID

public long getLayerID()

getConnectionState

public java.lang.String getConnectionState()


Copyright - 2001 OpenAI Labs. All Rights Reserved.