// created: 29.12.00
// modified:

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

class CountFunctionChanger extends FunctionChanger
 {

 JRadioButton moreButton;
 JRadioButton lessButton; 

 CountFunctionChanger()
  {  
  super();
  // set up the components
  moreButton = new JRadioButton("more");
  moreButton.setSelected(true);
  lessButton = new JRadioButton("less");

  ButtonGroup group = new ButtonGroup();
  group.add(moreButton);
  group.add(lessButton);

  add(moreButton);
  add(lessButton);
  } 
 
 public void setEnabled(boolean bool)
  {
  super.setEnabled(bool);
  moreButton.setEnabled(bool);
  lessButton.setEnabled(bool);  
  }

 /**********************/
 /* method getFunction */
 /**********************/

 ValueFunction getFunction()
  { 
  if (lessButton.isSelected())
    return new NegativeValueFunction();
  else
    return new PositiveValueFunction();
  }

 }