package org.richfaces.component;

import javax.faces.component.UIComponent;
import javax.faces.event.FacesListener;

public class DialogOpenEvent extends DialogEvent {
	private static final long serialVersionUID = 1L;
	
	boolean close = false;

	public DialogOpenEvent(UIComponent component) {
		super(component);
	}

//	@Override
	public boolean isAppropriateListener(FacesListener listener) {
		return (listener instanceof DialogOpenListener);
	}

//	@Override
	public void processListener(FacesListener listener) {
		((DialogOpenListener)listener).processDialogOpen(this);
	}
	
	public void setSourceViewId(String viewId) {
		sourceViewId = viewId;
	}
	
	public void setClose(boolean b) {
		close = b;
	}
	
	public boolean isClose() {
		return close;
	}

}
