// created: 29.12.00
// modified:

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

class ExistFunctionChanger extends FunctionChanger
 {

 JRadioButton someButton;
 JRadioButton noneButton; 

 ExistFunctionChanger()
  {  
  super();
  // set up the components
  someButton = new JRadioButton("some");
  someButton.setSelected(true);
  noneButton = new JRadioButton("none");

  ButtonGroup group = new ButtonGroup();
  group.add(someButton);
  group.add(noneButton);

  add(someButton);
  add(noneButton);
  } 
 
 public void setEnabled(boolean bool)
  {
  super.setEnabled(bool);
  someButton.setEnabled(bool);
  noneButton.setEnabled(bool);
  }

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

 ValueFunction getFunction()
  { 
  if (someButton.isSelected())
    return new SomeValueFunction();
  else
    return new NoneValueFunction();
  }

 }