import javax.swing.*;
import javax.swing.event.*;
import javax.swing.tree.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.border.*;
import java.util.*;

class DownButton 
{
  //Stimulus Response Canvas Object
  public JButton down;
  
  //Dimentions for each area of the Stimulus and Pole Display
  private Dimension buttonDimension = new Dimension(20,30);
  
  public ImageIcon downIconRed = new ImageIcon("downRed.GIF");
  public ImageIcon downIconBlue = new ImageIcon("downBlue.GIF");
  
  /**
   * Default Constructor
   */
  public DownButton() 
  {
  }

  public DownButton(JLayeredPane layers, BevelBorder bevelL) 
  {
    //Instantiate objects
	
    down = new JButton(downIconBlue);
    down.setFont(new Font("Serif",Font.PLAIN,11));
    down.setRolloverIcon(downIconRed);
	down.setActionCommand("Down");
	
    //********************************************************
    //Include the Canvas in the SRPole and set its layer
    //********************************************************
    
    layers.add(down);
    layers.setLayer(down,1);
    
    //***********************************
    //Setdown properties of the SRPole
    //***********************************
    
    //down.setForeground(Color.white);
    down.setSize(buttonDimension);
    //down.setBorder(bevelL);
	down.setBorderPainted(false);
	down.setFocusPainted(false);
	down.setBackground(Color.lightGray);
	down.setVerticalAlignment(SwingConstants.TOP);
	down.setHorizontalAlignment(SwingConstants.CENTER);	
    down.setBounds(585,505,(int)buttonDimension.getWidth(),(int)buttonDimension.getHeight());
	//down.setLabel("Down");
	//down.setText("Down");
	down.setToolTipText("Move Item Down");
    //down.setMinimumSize(buttonDimension);
    //down.setMaximumSize(buttonDimension);
    //down.setPreferredSize(buttonDimension);
    
    //********************************
    //Set the Areas to a visible state
    //********************************
    
    down.setVisible(true);
  }
}
