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 UpButton 
{
  //Stimulus Response Canvas Object
  public JButton up;
  
  //Dimentions for each area of the Stimulus and Pole Display
  private Dimension buttonDimension = new Dimension(20,30);
  
  public ImageIcon upIconRed = new ImageIcon("upRed.GIF");
  public ImageIcon upIconBlue = new ImageIcon("upBlue.GIF");
  
  /**
   * Default Constructor
   */
  public UpButton() 
  {
  }

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