001 package sale;
002
003 import javax.swing.*;
004
005 /**
006 * An object that can contain and display {@link FormSheet FormSheets}. FormSheetContainers are usually also
007 * {@link Display displays}. The two interfaces FormSheetContainer and Display are two sides of one coin,
008 * with Display being the view of the application developer and FormSheetContainer the framework (i.e.
009 * FormSheet) view.
010 *
011 * @author Steffen Zschaler
012 * @version 2.0 21/05/1999
013 * @since v2.0
014 */
015 public interface FormSheetContainer {
016
017 /**
018 * Close a FormSheet.
019 *
020 * <p>Closing a FormSheet must hide all the GUI elements that stem from displaying the
021 * FormSheet. It must then {@link FormSheet#detachDisplay detach} this display
022 * from the FormSheet. Any {@link Display#setFormSheet} calls waiting for this FormSheet to
023 * be closed, must be unblocked.</p>
024 *
025 * @override Always
026 *
027 * @param fs the FormSheet to be closed.
028 */
029 public void closeFormSheet(FormSheet fs);
030
031 /**
032 * Notification event informing about a change of a FormSheet's caption.
033 *
034 * @override Always
035 *
036 * @param fs the FormSheet whose caption changed.
037 * @param sNewCaption the new caption of the FormSheet.
038 */
039 public void onFormSheetCaptionChanged(FormSheet fs, String sNewCaption);
040
041 /**
042 * Notification event informing about a change of a FormSheet's component.
043 *
044 * @override Always
045 *
046 * @param fs the FormSheet whose component changed.
047 * @param jcmpNew the new component of the FormSheet.
048 */
049 public void onFormSheetComponentChanged(FormSheet fs, JComponent jcmpNew);
050
051 /**
052 * Notification event informing that a button was added to the FormSheet's button bar.
053 *
054 * @override Always
055 *
056 * @param fs the FormSheet whose button bar changed.
057 * @param fb the button that was added to the FormSheet.
058 */
059 public void onFormSheetButtonAdded(FormSheet fs, FormSheet.FormButton fb);
060
061 /**
062 * Notification event informing that a button was removed from the FormSheet's button bar.
063 *
064 * @override Always
065 *
066 * @param fs the FormSheet whose button bar changed.
067 * @param fb the button that was removed from the FormSheet.
068 */
069 public void onFormSheetButtonRemoved(FormSheet fs, FormSheet.FormButton fb);
070
071 /**
072 * Notification event informing that all buttons were removed from a FormSheet's button bar.
073 *
074 * @override Always
075 *
076 * @param fs the FormSheet whose button bar was cleared.
077 */
078 public void onFormSheetButtonsCleared(FormSheet fs);
079 }