import java.beans.*;
import java.awt.*;
/**
 * A ViewObject is a object to be drawn on a ViewWindow
 */
abstract class ViewObject {
	protected final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
	/**
	 * This will paint the object on the current graphical context.
	 * */
	public void paintOn(Graphics g) {
		
	}
	/**
	 * Based on the X, Y coordinates was this object clicked on?
	 * */
	public boolean wasClicked(int x,int y) {
		return false;
	}
	/**
	 * Adds a propertyChangeListener which will listen for various events on the object specifically when object state has changed.
	 * */
	public void addPropertyChangeListener( PropertyChangeListener pcl) {
		pcs.addPropertyChangeListener(pcl);
        }
	/**
	 * Adds a propertyChangeListener which will listen for various events on the object specifically when object state has changed.
	 * */
	public void addPropertyChangeListener(String propertyName, PropertyChangeListener pcl) {
		pcs.addPropertyChangeListener(propertyName,pcl);
        }
	/**
	 * Is the object draggable?
	 * */
	public boolean draggable() {
		return false;
	}
	/**
	 * Drag the object to x and y 
	 * @param x the xcoord to drag to
	 * @param y the ycoord to drag to
	 * */
	public void dragTo(int x,int y) {

	}
	/**
	 * Gets the biggest X coord taken 
	 * */
	int getMaxX() {
		return 0;
	}
	/**
	 * Gets the biggest Y coord taken 
	 * */
	int getMaxY() {
		return 0;
	}
}
