DrawableSurface
Class ModifiedPaintSurface

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Canvas
              |
              +--DrawableSurface.DrawableSurface
                    |
                    +--DrawableSurface.ModifiedPaintSurface

public class ModifiedPaintSurface
extends DrawableSurface
implements Runnable, MouseListener

This is the class which return the image modified by the retina algorithme.

Version:
1.0
Author:
Sebastien Baehni
See Also:
Serialized Form

Field Summary
protected  Algorithme algorithme
          The retina algorithme.
protected  float coneJonctionResistanceFloat
          The value of the cone jonction resistance.
protected  float coneMembranarCapacityFloat
          The value of the cone membran capacity.
protected  float coneMembranarResistanceFloat
          The value of the cone membran resistance.
protected  float coneSynapticResistanceFloat
          The value of the cone synaptic resistance.
protected  float deltaT
          The value of the deltatT.
protected  float horizontalJonctionResistanceFloat
          The value of the horizontal jonction resistance.
protected  float horizontalMembranarCapacityFloat
          The value of the horizontal membran capacity.
protected  float horizontalMembranarResistanceFloat
          The value of the horizontal membran resistance.
protected  float horizontalSynapticResistanceFloat
          The value of the horizontal synaptic resistance.
protected  long numberOfMillisToSleep
          The number of millis second we want to sleep in the algorithme.
protected  PaintSurface paintSurface
          The surface that we are going to take the pixels in order to put them in the algorithme.
protected  boolean simulationStopped
          This boolean allow the user to stop/restart the algorithme.
protected  ToolPanel toolPanel
          The toolpanel.
 
Fields inherited from class DrawableSurface.DrawableSurface
animatedImage, height, painted, width
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
ModifiedPaintSurface(int width, int height)
          The second constructor.
ModifiedPaintSurface(int width, int height, Color background_color)
          The first constructor.
 
Method Summary
 void init(PaintSurface paintSurface, ToolPanel toolPanel)
          Initialisation of our modifiedPaintSurface.
 void initSimulation(float coneSynapticResistanceFloat, float coneMembranarResistanceFloat, float coneMembranarCapacityFloat, float coneJonctionResistanceFloat, float horizontalSynapticResistanceFloat, float horizontalMembranarResistanceFloat, float horizontalMembranarCapacityFloat, float horizontalJonctionResistanceFloat, long numberOfMillisToSleepLong)
          Method which initialize the modifiedPaintSurface's parameters with the specified values.
 void mouseClicked(MouseEvent e)
           
 void mouseEntered(MouseEvent e)
           
 void mouseExited(MouseEvent e)
           
 void mousePressed(MouseEvent e)
           
 void mouseReleased(MouseEvent e)
           
 void run()
          This method is invoqued when we start the algorithme.
 void stop()
          This method is called when the user wants to stop the simulation.
 
Methods inherited from class DrawableSurface.DrawableSurface
animatedImage, eraseSurface, height, paint, start, update, width
 
Methods inherited from class java.awt.Canvas
addNotify
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

toolPanel

protected ToolPanel toolPanel
The toolpanel.
See Also:
ToolPanel

algorithme

protected Algorithme algorithme
The retina algorithme.
See Also:
Algorithme

paintSurface

protected PaintSurface paintSurface
The surface that we are going to take the pixels in order to put them in the algorithme.

coneSynapticResistanceFloat

protected float coneSynapticResistanceFloat
The value of the cone synaptic resistance.

coneMembranarResistanceFloat

protected float coneMembranarResistanceFloat
The value of the cone membran resistance.

coneMembranarCapacityFloat

protected float coneMembranarCapacityFloat
The value of the cone membran capacity.

coneJonctionResistanceFloat

protected float coneJonctionResistanceFloat
The value of the cone jonction resistance.

horizontalSynapticResistanceFloat

protected float horizontalSynapticResistanceFloat
The value of the horizontal synaptic resistance.

horizontalMembranarResistanceFloat

protected float horizontalMembranarResistanceFloat
The value of the horizontal membran resistance.

horizontalMembranarCapacityFloat

protected float horizontalMembranarCapacityFloat
The value of the horizontal membran capacity.

horizontalJonctionResistanceFloat

protected float horizontalJonctionResistanceFloat
The value of the horizontal jonction resistance.

deltaT

protected final float deltaT
The value of the deltatT.

numberOfMillisToSleep

protected long numberOfMillisToSleep
The number of millis second we want to sleep in the algorithme. This is very useful for someone who want to see the algorithme step by step.

simulationStopped

protected boolean simulationStopped
This boolean allow the user to stop/restart the algorithme.
Constructor Detail

ModifiedPaintSurface

public ModifiedPaintSurface(int width,
                            int height,
                            Color background_color)
The first constructor. It is identical of the drawable surface constructor except that it creates an new instance of the retina algorithme.
Parameters:
width - The width of our modifiedPaintSurface
height - The height of our modifiedPaintSurface
backgroundColor - The background color of our modifiedPaintSurface
See Also:
DrawableSurface

ModifiedPaintSurface

public ModifiedPaintSurface(int width,
                            int height)
The second constructor. It is identical of the drawable surface constructor except that it creates an new instance of the retina algorithme.
Parameters:
width - The width of our modifiedPaintSurface
height - The height of our modifiedPaintSurface
See Also:
DrawableSurface
Method Detail

init

public void init(PaintSurface paintSurface,
                 ToolPanel toolPanel)
Initialisation of our modifiedPaintSurface.
Parameters:
paintSurface - The paintSurface. This is it that will give us the pixels for the input of the retina algorithme.
toolPanel - The panel in which we are going to display the help message.
See Also:
ToolPanel

initSimulation

public void initSimulation(float coneSynapticResistanceFloat,
                           float coneMembranarResistanceFloat,
                           float coneMembranarCapacityFloat,
                           float coneJonctionResistanceFloat,
                           float horizontalSynapticResistanceFloat,
                           float horizontalMembranarResistanceFloat,
                           float horizontalMembranarCapacityFloat,
                           float horizontalJonctionResistanceFloat,
                           long numberOfMillisToSleepLong)
Method which initialize the modifiedPaintSurface's parameters with the specified values.
Parameters:
coneSynapticResistanceFloat - The value for the synaptic resistance of the cone layer.
coneMembranarResistanceFloat - The value for the membranar resistance of the cone layer.
coneMembranarCapacityFloat - The value for the membranar capacity of the cone layer.
coneJonctionResistanceFloat - The value for the jonction resistance of the cone layer.
horizontalSynapticResistanceFloat - The value for the synaptic resistance of the horizontal layer.
horizontalMembranarResistanceFloat - The value for the membranar resistance of the horizontal layer.
horizontalMembranarCapacityFloat - The value for the membranar capacity of the horizontal layer.
horizontalJonctionResistanceFloat - The value for the jonction resistance of the horizontal layer.
numberOfMillisToSleepLong - The value of which we ara going to sleep in the algorithme.

run

public void run()
This method is invoqued when we start the algorithme. This is an individual thread. We stop it when we want to do something else (repaint another surface, etc..)
Specified by:
run in interface Runnable

stop

public void stop()
This method is called when the user wants to stop the simulation.

mouseClicked

public void mouseClicked(MouseEvent e)
Specified by:
mouseClicked in interface MouseListener

mouseEntered

public void mouseEntered(MouseEvent e)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent e)
Specified by:
mouseExited in interface MouseListener

mousePressed

public void mousePressed(MouseEvent e)
Specified by:
mousePressed in interface MouseListener

mouseReleased

public void mouseReleased(MouseEvent e)
Specified by:
mouseReleased in interface MouseListener