|
The Physiologist's Friend Simulation API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
ch.unizh.ini.friend.gui.TangentScreen
public class TangentScreen
Represents the plotting "tangent screen" -- the screen on which experimentalists display stimuli to characterize or measure cell responses.
The stimulus appears in this tangent screen. You set the stimulus using setStimulus(ch.unizh.ini.friend.stimulus.Stimulus)
. You set the simulation using setSimulationSetup(ch.unizh.ini.friend.simulation.SimulationSetup)
.
The Stimulus
that is shown in the TangentScreen is scaled to the size of the screen to maintain an aspect
ratio of 1:1. The minimum dimension of the TangentScrren sets the scaling of both x and y coordinates of the stimulus.
This component manages the popup menu for the selection of stimulus color, rotation, etc. It also handles the mouse wheel actions on the stimulus.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected ColorChooser |
colorChooser
Color-chooser to select the forground and background color of the (color) stimulus. |
static float |
SCREEN_DIMENSION
Dimension of tangent screen in our user (stimulus) coordinates. |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
TangentScreen(SimulationSetup simulationSetup)
Creates new form TangentScreen. |
Method Summary | |
---|---|
void |
addMarker()
add a marker to the tangent screen |
void |
clearMarkers()
clear all markers |
void |
clearSpikeImage()
clears recorded spikes and markers |
int |
getSpikeMemoryDepth()
|
Stimulus |
getStimulus()
get the displayed stimulus |
boolean |
isPhotoreceptorsShown()
are photoreceptor locations being shown? |
boolean |
isSpikeFadeEnabled()
|
boolean |
isSpikeFillEnabled()
|
boolean |
isStimulusControlEnabled()
is mouse/keyboard control of stimulus enabled? |
void |
paintComponent(Graphics g)
Draws the background and stimulus in the tangent screen. |
void |
refillFrame()
resize this TangentScreen to fill the parent container |
void |
setPhotoreceptorsShown(boolean flag)
enable showing the locations of the photoreceptors |
void |
setSimulationSetup(SimulationSetup setup)
sets the SimulationSetup |
void |
setSpikeFadeEnabled(boolean fade)
|
void |
setSpikeFillEnabled(boolean f)
|
void |
setSpikeMemoryDepth(int n)
|
void |
setStimulus(Stimulus s)
set the stimulus displayed. |
void |
setStimulusControlEnabled(boolean f)
set mouse/keyboard control of stimulus enabled |
void |
spikeOccurred(SpikeEvent e)
called by spike source ( SpikeReporter ) when a spike is detected |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final float SCREEN_DIMENSION
SCREEN_DIMENSION
is 10.0f.
Even if the Panel is resized to a non-square size, the stimulus aspect ratio 1:1 is maintained.
protected ColorChooser colorChooser
Constructor Detail |
---|
public TangentScreen(SimulationSetup simulationSetup)
simulationSetup
- the simulationSetup passed to FriendGUIMethod Detail |
---|
public void setSimulationSetup(SimulationSetup setup)
SimulationSetup
setup
- the SimulationSetup
public void setStimulus(Stimulus s)
Stimulus
is and is not an instance of ColorStimulus
.
s
- the Stimuluspublic Stimulus getStimulus()
public void setPhotoreceptorsShown(boolean flag)
public boolean isPhotoreceptorsShown()
public void setStimulusControlEnabled(boolean f)
public boolean isStimulusControlEnabled()
public void refillFrame()
public void paintComponent(Graphics g)
repaint()
.
paintComponent
in class JComponent
public void setSpikeMemoryDepth(int n)
n
- the number of spikes to display when recordingpublic int getSpikeMemoryDepth()
public void setSpikeFadeEnabled(boolean fade)
fade
- enables fading of spike-triggered stimulipublic boolean isSpikeFadeEnabled()
public boolean isSpikeFillEnabled()
public void setSpikeFillEnabled(boolean f)
f
- filling in spike-triggered stimulipublic void addMarker()
public void clearMarkers()
public void spikeOccurred(SpikeEvent e)
SpikeReporter
) when a spike is detected
spikeOccurred
in interface SpikeListener
e
- the spike eventpublic void clearSpikeImage()
|
http://www.ini.unizh.ch/~tobi/friend | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |