package org.gcube.portlets.user.reportgenerator.client.events; import org.gcube.portlets.user.reportgenerator.client.targets.ReportTextArea; import com.google.gwt.event.shared.GwtEvent; public class AddCommentEvent extends GwtEvent{ public static Type TYPE = new Type(); private final ReportTextArea source; private final String comment; private final int areaHeight; public AddCommentEvent(ReportTextArea sourceComponent, String comment, int areaHeight) { super(); this.source = sourceComponent; this.comment = comment; this.areaHeight = areaHeight; } public int getAreaHeight() { return areaHeight; } public ReportTextArea getSourceComponent() { return source; } public String getComment() { return comment; } @Override public Type getAssociatedType() { return TYPE; } @Override protected void dispatch(AddCommentEventHandler handler) { handler.onAddComment(this); } }