package sale; import sale.events.*; /** * A dummy display, that cannot display anything. This display is used for background processes that * must not display any Form- or MenuSheets. All methods of this display, except * {@link #isUseableDisplay} throw a {@link InvalidDisplayException}. * * @author Steffen Zschaler * @version 2.0 27/05/1999 * @since v2.0 */ public final class NullDisplay implements Display { /** * Private constructor to make sure the singleton pattern is used. */ private NullDisplay() { super(); } /** * Throw a {@link InvalidDisplayException}. * * @override Never */ public final void setFormSheet (FormSheet fs) { throw new InvalidDisplayException(); } /** * Throw a {@link InvalidDisplayException}. * * @override Never */ public final void closeFormSheet() { throw new InvalidDisplayException(); } /** * Throw a {@link InvalidDisplayException}. * * @override Never */ public final void popUpFormSheet (FormSheet fs) { throw new InvalidDisplayException(); } /** * Throw a {@link InvalidDisplayException}. * * @override Never */ public final void setMenuSheet (MenuSheet ms) { throw new InvalidDisplayException(); } /** * Return false to indicate this display is not useable. * * @override Never */ public final boolean isUseableDisplay() { return false; } /** * Throw a {@link InvalidDisplayException}. * * @override Never */ public final void addFormSheetListener (FormSheetListener fsl) { throw new InvalidDisplayException(); } /** * Throw a {@link InvalidDisplayException}. * * @override Never */ public void removeFormSheetListener (FormSheetListener fsl) { throw new InvalidDisplayException(); } /** * The singleton NullDisplay used in the entire application. */ public static NullDisplay s_ndGlobal = new NullDisplay(); }