PanelConfiguration
Class RetineConfigurationPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--PanelConfiguration.PanelConfiguration
                          |
                          +--PanelConfiguration.RetineConfigurationPanel

public class RetineConfigurationPanel
extends PanelConfiguration
implements MouseListener

This class provides a panel in order to add on it some useful textfield for the retina algorithme simulation. By exemple, TextFields for the cone layer, horizontal layer...

Version:
1.0
Author:
Sebastien baehni
See Also:
PanelConfiguration, Serialized Form

Field Summary
protected  Panel centerCenterPanel
          The center center panel (see the code for more informations).
protected  Panel centerEastPanel
          The center east panel (see the code for more informations).
protected  Panel centerGridPanel
          The panel that contains the cone layer parameters
protected  Panel centerNorthPanel
          The center north panel (see the code for more informations).
protected  Panel centerPanel
          The center panel (see the code for more informations).
protected  float coneJonctionResistanceFloat
          The value for the cone jonction resistance.
protected  Label coneJonctionResistanceLabel
          The label for the cone jonction resistance.
protected  MouseListener coneJonctionResistanceMouseListener
          The mouse listener for the cone jonction resistance.
protected  TextField coneJonctionResistanceTextField
          The textfield for the cone jonction resistance.
protected  Label coneLayerLabel
          The label for the cone layer.
protected  float coneMembranarCapacityFloat
          The value for the cone membran capacity.
protected  Label coneMembranarCapacityLabel
          The label for the cone membran capacity.
protected  MouseListener coneMembranarCapacityMouseListener
          The mouse listener for the cone membran capacity.
protected  TextField coneMembranarCapacityTextField
          The textfield for the cone membran capacity.
protected  float coneMembranarResistanceFloat
          The value for the cone membran resistance.
protected  Label coneMembranarResistanceLabel
          The label for the cone membran resistance.
protected  MouseListener coneMembranarResistanceMouseListener
          The mouse listener for the cone membran resistance.
protected  TextField coneMembranarResistanceTextField
          The textfield for the cone membran resistance.
protected  float coneSynapticResistanceFloat
          The value for the cone synaptic resistance.
protected  Label coneSynapticResistanceLabel
          The label for the cone synaptic resistance.
protected  MouseListener coneSynapticResistanceMouseListener
          The mouse listener for the cone synaptic resistance.
protected  TextField coneSynapticResistanceTextField
          The textfield for the cone synaptic resistance.
protected  FormsMakerPanel formsMakerPanel
          The panel for drawing forms.
protected  float horizontalJonctionResistanceFloat
          The value for the horizontal jonction resistance.
protected  Label horizontalJonctionResistanceLabel
          The label for the horizontal jonction resistance.
protected  MouseListener horizontalJonctionResistanceMouseListener
          The mouse listener for the horizontal jonction resistance.
protected  TextField horizontalJonctionResistanceTextField
          The textfield for the horizontal jonction resistance.
protected  Label horizontalLayerLabel
          The label for the horizontal layer.
protected  float horizontalMembranarCapacityFloat
          The value for the horizontal membran capacity.
protected  Label horizontalMembranarCapacityLabel
          The label for the horizontal membran capacity.
protected  MouseListener horizontalMembranarCapacityMouseListener
          The mouse listener for the horizontal membran capacity.
protected  TextField horizontalMembranarCapacityTextField
          The textfield for the horizontal membran capacity.
protected  float horizontalMembranarResistanceFloat
          The value for the horizontal membran resistance.
protected  Label horizontalMembranarResistanceLabel
          The label for the horizontal membran resistance.
protected  MouseListener horizontalMembranarResistanceMouseListener
          The mouse listener for the horizontal membran resistance.
protected  TextField horizontalMembranarResistanceTextField
          The textfield for the horizontal membran resistance.
protected  float horizontalSynapticResistanceFloat
          The value for the horizontal synaptic resistance.
protected  Label horizontalSynapticResistanceLabel
          The label for the horizontal synaptic resistance.
protected  MouseListener horizontalSynapticResistanceMouseListener
          The mouse listener for the horizontal synaptic resistance.
protected  TextField horizontalSynapticResistanceTextField
          The textfield for the horizontal synaptic resistance.
protected  boolean initSucceed
          Boolean very useful to know if the user has entered valid parameters.
protected  ModifiedPaintSurfacePanel modifiedPaintSurfacePanel
          The panel that contains the result of the algorithm.
protected  Panel northCenterPanel
          The north center panel (see the code for more informations).
protected  Panel northEastPanel
          The north east panel (see the code for more informations).
protected  Panel northNorthPanel
          The north north panel (see the code for more informations).
protected  Panel northPanel
          The north panel (see the code for more informations).
protected  Label numberOfMillisToSleepLabel
          The label for the sleep textfield.
protected  long numberOfMillisToSleepLong
          The value for the sleeping (in ms).
protected  MouseListener numberOfMillisToSleepMouseListener
          The mouse listener for the sleeping (in ms).
protected  TextField numberOfMillisToSleepTextField
          The textfield for sleeping in the algorithm.
protected  Panel[] panel
          The panels for the parameters fields.
protected  Button resetButton
          The reset button.
protected  MouseListener resetMouseListener
          The mouse listener for the reset button.
protected  Panel southGridPanel
          The panel that contains the horizontal layer parameters
protected  Panel southNorthPanel
          The south north panel (see the code for more informations).
protected  Panel southPanel
          The south panel (see the code for more informations).
protected  Panel southSouthPanel
          The south south panel (see the code for more informations).
protected  Button startButton
          The start button.
protected  MouseListener startMouseListener
          The mouse listener for the start button.
protected  Button stopButton
          The stop button.
protected  MouseListener stopMouseListener
          The mouse listener for the stop button.
protected  ToolPanel toolPanel
          The panel in which we are going to display help messages.
protected  Label[] unitLabel
          The labels for the unit.
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
RetineConfigurationPanel()
          The constructor.
RetineConfigurationPanel(Color backgroundColor)
          The constructor.
 
Method Summary
protected  void disableWhenSimulating()
          This method disable all the panel when we are simulating the retina algorithme.
protected  void enableAfterSimulating()
          This method enable all the panel when the simulation stopped.
 boolean formsMakerEnable()
          This method returns if the FormsMakerPanel is enable or not.
 boolean formsMakerPaintingDisable()
          This method returns if the FormsMakerPanel is enable or not (used when the user is painting).
 void init(ToolPanel toolPanel, FormsMakerPanel formsMakerPanel, ModifiedPaintSurfacePanel modifiedPaintSurfacePanel)
          Initialization of the RetineConfigurationPanel.
protected  void initLabel(int number)
          This method create a number of label with a specified layout.
protected  void initMouseListener()
          Initialization of all the mouse listeners of the different components.
 void initSimulation()
          This method is called when the user clicked on the start button.
 boolean initSucceed()
          Return if we can start the simulation or not.
 void mouseClicked(MouseEvent e)
          When the mouse is clicked.
 void mouseEntered(MouseEvent e)
          When the mouse enters.
 void mouseExited(MouseEvent e)
          When the mouse exits.
 void mousePressed(MouseEvent e)
          When the mouse is pressed.
 void mouseReleased(MouseEvent e)
          When the mouse is released.
protected  void resetAllTextFields()
          This method resets all the textfields.
 void setText(String string)
          This method draw a help message in a text area.
 void setText(String string, Color color)
          This method draw a help message in a text area.
 void startSimulation()
          We start the simulation.
 void stopSimulation()
          We stop the simulation.
 
Methods inherited from class PanelConfiguration.PanelConfiguration
Disable, Enable
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree
 
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, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

toolPanel

protected ToolPanel toolPanel
The panel in which we are going to display help messages.
See Also:
ToolPanel

formsMakerPanel

protected FormsMakerPanel formsMakerPanel
The panel for drawing forms.
See Also:
FormsMakerPanel

modifiedPaintSurfacePanel

protected ModifiedPaintSurfacePanel modifiedPaintSurfacePanel
The panel that contains the result of the algorithm.
See Also:
ModifiedPaintSurfacePanel

coneLayerLabel

protected Label coneLayerLabel
The label for the cone layer.

horizontalLayerLabel

protected Label horizontalLayerLabel
The label for the horizontal layer.

coneSynapticResistanceLabel

protected Label coneSynapticResistanceLabel
The label for the cone synaptic resistance.

coneMembranarResistanceLabel

protected Label coneMembranarResistanceLabel
The label for the cone membran resistance.

coneJonctionResistanceLabel

protected Label coneJonctionResistanceLabel
The label for the cone jonction resistance.

coneMembranarCapacityLabel

protected Label coneMembranarCapacityLabel
The label for the cone membran capacity.

horizontalSynapticResistanceLabel

protected Label horizontalSynapticResistanceLabel
The label for the horizontal synaptic resistance.

horizontalMembranarResistanceLabel

protected Label horizontalMembranarResistanceLabel
The label for the horizontal membran resistance.

horizontalJonctionResistanceLabel

protected Label horizontalJonctionResistanceLabel
The label for the horizontal jonction resistance.

horizontalMembranarCapacityLabel

protected Label horizontalMembranarCapacityLabel
The label for the horizontal membran capacity.

numberOfMillisToSleepLabel

protected Label numberOfMillisToSleepLabel
The label for the sleep textfield.

unitLabel

protected Label[] unitLabel
The labels for the unit.

coneSynapticResistanceTextField

protected TextField coneSynapticResistanceTextField
The textfield for the cone synaptic resistance.

coneMembranarResistanceTextField

protected TextField coneMembranarResistanceTextField
The textfield for the cone membran resistance.

coneJonctionResistanceTextField

protected TextField coneJonctionResistanceTextField
The textfield for the cone jonction resistance.

coneMembranarCapacityTextField

protected TextField coneMembranarCapacityTextField
The textfield for the cone membran capacity.

horizontalSynapticResistanceTextField

protected TextField horizontalSynapticResistanceTextField
The textfield for the horizontal synaptic resistance.

horizontalMembranarResistanceTextField

protected TextField horizontalMembranarResistanceTextField
The textfield for the horizontal membran resistance.

horizontalJonctionResistanceTextField

protected TextField horizontalJonctionResistanceTextField
The textfield for the horizontal jonction resistance.

horizontalMembranarCapacityTextField

protected TextField horizontalMembranarCapacityTextField
The textfield for the horizontal membran capacity.

numberOfMillisToSleepTextField

protected TextField numberOfMillisToSleepTextField
The textfield for sleeping in the algorithm.

startButton

protected Button startButton
The start button.

stopButton

protected Button stopButton
The stop button.

resetButton

protected Button resetButton
The reset button.

coneSynapticResistanceFloat

protected float coneSynapticResistanceFloat
The value for the cone synaptic resistance.

coneMembranarResistanceFloat

protected float coneMembranarResistanceFloat
The value for the cone membran resistance.

coneJonctionResistanceFloat

protected float coneJonctionResistanceFloat
The value for the cone jonction resistance.

coneMembranarCapacityFloat

protected float coneMembranarCapacityFloat
The value for the cone membran capacity.

horizontalSynapticResistanceFloat

protected float horizontalSynapticResistanceFloat
The value for the horizontal synaptic resistance.

horizontalMembranarResistanceFloat

protected float horizontalMembranarResistanceFloat
The value for the horizontal membran resistance.

horizontalJonctionResistanceFloat

protected float horizontalJonctionResistanceFloat
The value for the horizontal jonction resistance.

horizontalMembranarCapacityFloat

protected float horizontalMembranarCapacityFloat
The value for the horizontal membran capacity.

numberOfMillisToSleepLong

protected long numberOfMillisToSleepLong
The value for the sleeping (in ms).

coneSynapticResistanceMouseListener

protected MouseListener coneSynapticResistanceMouseListener
The mouse listener for the cone synaptic resistance.

coneMembranarResistanceMouseListener

protected MouseListener coneMembranarResistanceMouseListener
The mouse listener for the cone membran resistance.

coneJonctionResistanceMouseListener

protected MouseListener coneJonctionResistanceMouseListener
The mouse listener for the cone jonction resistance.

coneMembranarCapacityMouseListener

protected MouseListener coneMembranarCapacityMouseListener
The mouse listener for the cone membran capacity.

horizontalSynapticResistanceMouseListener

protected MouseListener horizontalSynapticResistanceMouseListener
The mouse listener for the horizontal synaptic resistance.

horizontalMembranarResistanceMouseListener

protected MouseListener horizontalMembranarResistanceMouseListener
The mouse listener for the horizontal membran resistance.

horizontalJonctionResistanceMouseListener

protected MouseListener horizontalJonctionResistanceMouseListener
The mouse listener for the horizontal jonction resistance.

horizontalMembranarCapacityMouseListener

protected MouseListener horizontalMembranarCapacityMouseListener
The mouse listener for the horizontal membran capacity.

numberOfMillisToSleepMouseListener

protected MouseListener numberOfMillisToSleepMouseListener
The mouse listener for the sleeping (in ms).

startMouseListener

protected MouseListener startMouseListener
The mouse listener for the start button.

stopMouseListener

protected MouseListener stopMouseListener
The mouse listener for the stop button.

resetMouseListener

protected MouseListener resetMouseListener
The mouse listener for the reset button.

initSucceed

protected boolean initSucceed
Boolean very useful to know if the user has entered valid parameters.

panel

protected Panel[] panel
The panels for the parameters fields.

centerGridPanel

protected Panel centerGridPanel
The panel that contains the cone layer parameters

southGridPanel

protected Panel southGridPanel
The panel that contains the horizontal layer parameters

northPanel

protected Panel northPanel
The north panel (see the code for more informations).

northCenterPanel

protected Panel northCenterPanel
The north center panel (see the code for more informations).

northNorthPanel

protected Panel northNorthPanel
The north north panel (see the code for more informations).

northEastPanel

protected Panel northEastPanel
The north east panel (see the code for more informations).

centerPanel

protected Panel centerPanel
The center panel (see the code for more informations).

centerCenterPanel

protected Panel centerCenterPanel
The center center panel (see the code for more informations).

centerNorthPanel

protected Panel centerNorthPanel
The center north panel (see the code for more informations).

centerEastPanel

protected Panel centerEastPanel
The center east panel (see the code for more informations).

southPanel

protected Panel southPanel
The south panel (see the code for more informations).

southSouthPanel

protected Panel southSouthPanel
The south south panel (see the code for more informations).

southNorthPanel

protected Panel southNorthPanel
The south north panel (see the code for more informations).
Constructor Detail

RetineConfigurationPanel

public RetineConfigurationPanel(Color backgroundColor)
The constructor. It creates a new RetineConfigurationPanel with all the upper components.
Parameters:
backgroundcolor - The background color of the panel.

RetineConfigurationPanel

public RetineConfigurationPanel()
The constructor. It creates a new RetineConfigurationPanel with all the upper components. Its background color is white.
Method Detail

init

public void init(ToolPanel toolPanel,
                 FormsMakerPanel formsMakerPanel,
                 ModifiedPaintSurfacePanel modifiedPaintSurfacePanel)
Initialization of the RetineConfigurationPanel.
Parameters:
toolPanel - The panel on which we display the help message.
formsMakerPanel - The panel we are going to get if the user is drawing a form or not.
modifiedPaintSurfacePanel - The panel we are going to tell if the simulation could start or not.
See Also:
ToolPanel, FormsMakerPanel, ModifiedPaintSurfacePanel

initLabel

protected void initLabel(int number)
This method create a number of label with a specified layout.
Parameters:
number - The number of panel you want ot create.

initMouseListener

protected void initMouseListener()
Initialization of all the mouse listeners of the different components.

initSimulation

public void initSimulation()
This method is called when the user clicked on the start button. We take all the parameters defined by the user and we give them to algorithme if the their are valids. If the parameters are not valid we display a message in a the help panel.

startSimulation

public void startSimulation()
We start the simulation. Called when the user clicks on the start button.

stopSimulation

public void stopSimulation()
We stop the simulation. Called when the user clicks on the stop button.

setText

public void setText(String string)
This method draw a help message in a text area.
Parameters:
string - The help message.

setText

public void setText(String string,
                    Color color)
This method draw a help message in a text area.
Parameters:
string - The help message.
color - The color of the help message.

initSucceed

public boolean initSucceed()
Return if we can start the simulation or not.
Returns:
True if the simulation can start. False otherwise.

formsMakerPaintingDisable

public boolean formsMakerPaintingDisable()
This method returns if the FormsMakerPanel is enable or not (used when the user is painting).
Returns:
True if the user is painting a form. False otherwise.
See Also:
FormsMakerPanel

formsMakerEnable

public boolean formsMakerEnable()
This method returns if the FormsMakerPanel is enable or not.
Returns:
True if the user is painting a form. False otherwise.
See Also:
FormsMakerPanel

disableWhenSimulating

protected void disableWhenSimulating()
This method disable all the panel when we are simulating the retina algorithme.

enableAfterSimulating

protected void enableAfterSimulating()
This method enable all the panel when the simulation stopped.

resetAllTextFields

protected void resetAllTextFields()
This method resets all the textfields.

mouseClicked

public void mouseClicked(MouseEvent e)
When the mouse is clicked.
Specified by:
mouseClicked in interface MouseListener
Parameters:
e - The MouseEvent.

mouseEntered

public void mouseEntered(MouseEvent e)
When the mouse enters.
Specified by:
mouseEntered in interface MouseListener
Parameters:
e - The MouseEvent.

mouseExited

public void mouseExited(MouseEvent e)
When the mouse exits.
Specified by:
mouseExited in interface MouseListener
Parameters:
e - The MouseEvent.

mousePressed

public void mousePressed(MouseEvent e)
When the mouse is pressed.
Specified by:
mousePressed in interface MouseListener
Parameters:
e - The MouseEvent.

mouseReleased

public void mouseReleased(MouseEvent e)
When the mouse is released.
Specified by:
mouseReleased in interface MouseListener
Parameters:
e - The MouseEvent.