All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class guinea.ui.PlayPanel
java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----guinea.ui.PlayPanel
  -  public class PlayPanel
  
-  extends Panel
  
-  implements ControlInterface, MonitorInterface, PropertyLoader
   
The PlayPanel component is a control component
that is used by the subjects to play samples.  It also acts as a
monitor that can show which sample is currently playing.
  Constructor Index
  -   · 
	PlayPanel()
  
 -  Construct a new sample play control/monitor panel.
  
 -   · 
	PlayPanel(Object[])
  
 -  Construct a new sample play control/monitor panel.
  
 -   · 
	PlayPanel(Object[], String[])
  
 -  Construct a new sample play control/monitor panel.
 
  Method Index
  -   · 
	addControlListener(ControlListener)
  
 -  Adds the specified control listener to receive control events
from this component.
  
 -   · 
	getControlValue()
  
 -  Get the control value of the controller.
  
 -   · 
	isControlEnabled()
  
 -  Test whether control is enabled or disabled.
  
 -   · 
	isMonitorEnabled()
  
 -  Test whether monitor is enabled or disabled.
  
 -   · 
	processControlEvent(ControlEvent)
  
 -  Fire a control event to registered listeners.
  
 -   · 
	propertyLoad(Properties, String)
  
 -  Read object properties from the Properties list.
  
 -   · 
	removeControlListener(ControlListener)
  
 -  Removes the specified listener so it no longer receives
control motion events from this component.
  
 -   · 
	reset()
  
 -  Reset control to default value.
  
 -   · 
	setChoices(Object[])
  
 -  Set the choices for this answering component.
  
 -   · 
	setChoices(Object[], String[])
  
 -  Set the answers and corresponding labels for this answering
component.
  
 -   · 
	setControlEnabled(boolean)
  
 -  Enable or disable control component.
  
 -   · 
	setControlValue(Object)
  
 -  The the value that this controller controls.
  
 -   · 
	setMonitorEnabled(boolean)
  
 -  Enable or disable monitoring.
  
 -   · 
	setMonitorValue(Object)
  
 -  Set the value of this monitor.
  
 -   · 
	showPlaying(Object)
  
 -  Set which sample is currently playing.
 
  Constructors
 · 
PlayPanel
 public PlayPanel()
  -  Construct a new sample play control/monitor panel.  The
choices are initally undefined.
 
 · 
PlayPanel
 public PlayPanel(Object answers[])
  -  Construct a new sample play control/monitor panel.  The button
labels are generated by calling the 
toString()
method of the asnwers.
  
    -  Parameters:
    
 -  answers - The answers/control values this components
sends.
  
 
 
 
 · 
PlayPanel
 public PlayPanel(Object answers[],
                  String labels[])
  -  Construct a new sample play control/monitor panel.  Labels can
be used to show different labels on the buttons than what is
actually sent to the test.
  
    -  Parameters:
    
 -  answers - The answers/control values this components
sends.
    
-  labels - The corresponding labels for the buttons.
  
  
 
 
  Methods
 · 
setChoices
 public void setChoices(Object answers[])
  -  Set the choices for this answering component.  Corresponding
labels are generated by calling the toString() method
of the corresponding answer.
  
    -  Parameters:
    
 -  answers - Array of answers.
  
 
 
 
 · 
setChoices
 public synchronized void setChoices(Object answers[],
                                     String labels[])
  -  Set the answers and corresponding labels for this answering
component.
  
    -  Parameters:
    
 -  answers - Array of answers.
    
-  labels - Array of labels that are shown to the subject.
  
  
 
 
 · 
setControlValue
 public void setControlValue(Object value)
  -  The the value that this controller controls.  Calls
showPlaying(value) to do the work.
  
    -  Parameters:
    
 -  value - the value to set.
    
 -  See Also:
    
 -  showPlaying
  
 
 
 
 · 
getControlValue
 public synchronized Object getControlValue()
  -  Get the control value of the controller.
  
    -  Parameters:
    
 -  controlID - The ID of the controller component.
    
 -  Returns:
    
 -  The value of the controlled variable.
  
 
 
 
 · 
showPlaying
 public synchronized void showPlaying(Object answer)
  -  Set which sample is currently playing.
  
    -  Parameters:
    
 -  answer - which sample is playing.  It is usually the same
value that was returned from the playing control panel.  Null
resets the indicator (no sample is playing).
  
 
 
 
 · 
reset
 public synchronized void reset()
  -  Reset control to default value.
 
 · 
setControlEnabled
 public void setControlEnabled(boolean enable)
  -  Enable or disable control component.
  
    -  Parameters:
    
 -  enabled - Use 
true to enable,
false to disable the controller.
   
 
 
 · 
isControlEnabled
 public boolean isControlEnabled()
  -  Test whether control is enabled or disabled.
  
    -  Returns:
    
 -  
true if controller is enabled,
false if not.
   
 
 
 · 
setMonitorEnabled
 public void setMonitorEnabled(boolean enabled)
  -  Enable or disable monitoring.
  
    -  Parameters:
    
 -  enabled - 
True to enable component,
false to disable.
   
 
 
 · 
isMonitorEnabled
 public boolean isMonitorEnabled()
  -  Test whether monitor is enabled or disabled.
  
    -  Returns:
    
 -  
true if monitor is enabled,
false if not.
   
 
 
 · 
setMonitorValue
 public void setMonitorValue(Object value)
  -  Set the value of this monitor.  This components sets the
sample play component to highlight the currently playing
sample.
  
    -  Parameters:
    
 -  value - The name of the currently playing sample.  Using
null resets the component.
   
 
 
 · 
addControlListener
 public synchronized void addControlListener(ControlListener listener)
  -  Adds the specified control listener to receive control events
from this component.
  
    -  Parameters:
    
 -  listener - The control listener
  
 
 
 
 · 
removeControlListener
 public synchronized void removeControlListener(ControlListener listener)
  -  Removes the specified listener so it no longer receives
control motion events from this component.
  
    -  Parameters:
    
 -  listener - the control listener
  
 
 
 
 · 
processControlEvent
 public void processControlEvent(ControlEvent evt)
  -  Fire a control event to registered listeners.
  
    -  Parameters:
    
 -  evt - A control event.
  
 
 
 
 · 
propertyLoad
 public void propertyLoad(Properties p,
                          String name) throws IllegalArgumentException
  -  Read object properties from the Properties list.
  
    -  Parameters:
    
 -  p - The properties for the object.
    
-  name - A name for the object.
    
  -  Throws: IllegalArgumentException
    
 -  Thrown if parameter values
are invalid.
  
 
 
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index