001 package sale.events; 002 003 import java.util.EventObject; 004 005 import sale.FormSheet; 006 import sale.Display; 007 008 /** 009 * An EventObject describing a FormSheet that was set or closed at a Display. 010 * 011 * @see sale.FormSheet 012 * @see sale.Display 013 * 014 * @author Steffen Zschaler 015 * @version 2.0 27/05/1999 016 * @since v2.0 017 */ 018 public class FormSheetEvent extends EventObject { 019 020 /** 021 * The FormSheet that was affected by the event. 022 * 023 * @serial 024 */ 025 private FormSheet m_fsFormSheet; 026 027 /** 028 * Was the event caused by an explicit call to the responsible method or was it caused indirectly? 029 * 030 * @serial 031 */ 032 private boolean m_fExplicit; 033 034 /** 035 * Create a new FormSheetEvent. 036 * 037 * @param src the Display originating the event. 038 * @param fs the FormSheet that was affected by the event. 039 * @param fExplicit was the event caused by a direct call to the originating method or indirectly? 040 */ 041 public FormSheetEvent(Display src, FormSheet fs, boolean fExplicit) { 042 super(src); 043 044 m_fsFormSheet = fs; 045 m_fExplicit = fExplicit; 046 } 047 048 /** 049 * Get the affected FormSheet. 050 * 051 * @override Never 052 */ 053 public FormSheet getFormSheet() { 054 return m_fsFormSheet; 055 } 056 057 /** 058 * Was the event caused by a direct call to the originating method or indirectly? 059 * 060 * <p><code>formSheetSet</code> events are always considered explicit. In contrast, 061 * <code>formSheetRemoved</code> events are explicit only if they were originated as the consequence 062 * of a call to <code>closeFormSheet</code> or <code>setFormSheet (<b>null</b>)</code>. FormSheet 063 * removals that were caused by setting another FormSheet are not considered explicit.</p> 064 * 065 * @override Never 066 */ 067 public boolean isExplicit() { 068 return m_fExplicit; 069 } 070 }