org.salespointframework.core
Class NullDisplay

java.lang.Object
  extended by org.salespointframework.core.NullDisplay
All Implemented Interfaces:
Display

public final class NullDisplay
extends java.lang.Object
implements Display

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 isUseableDisplay() throw an InvalidDisplayException.

Since:
v2.0
Version:
2.0 27/05/1999
Author:
Steffen Zschaler

Field Summary
static NullDisplay s_ndGlobal
          The singleton NullDisplay used in the entire application.
 
Constructor Summary
private NullDisplay()
          Private constructor to make sure the singleton pattern is used.
 
Method Summary
 void addFormSheetListener(FormSheetListener fsl)
          Throws an InvalidDisplayException.
 void closeFormSheet()
          Throws an InvalidDisplayException.
 java.awt.Rectangle getBounds()
          Throws an InvalidDisplayException.
 FormSheet getFormSheet()
          Throws an InvalidDisplayException.
 MenuSheet getMenuSheet()
          Throws an InvalidDisplayException.
 boolean isUseableDisplay()
          Returns false to indicate this display is not useable.
 void load(java.io.ObjectInputStream ois)
          Throws an InvalidDisplayException.
 void popUpFormSheet(FormSheet fs)
          Throws an InvalidDisplayException.
 void removeFormSheetListener(FormSheetListener fsl)
          Throws an InvalidDisplayException.
 void save(java.io.ObjectOutputStream oos)
          Throws an InvalidDisplayException.
 void setBounds(java.awt.Rectangle r)
          Throws an InvalidDisplayException.
 void setButtonbarPosition(int position)
          Called to update the Buttonbar position
 void setFormSheet(FormSheet fs)
          Throws an InvalidDisplayException.
 void setMenuSheet(MenuSheet ms)
          Throws an InvalidDisplayException.
 void toFront()
          Throws an InvalidDisplayException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

s_ndGlobal

public static NullDisplay s_ndGlobal
The singleton NullDisplay used in the entire application.

Constructor Detail

NullDisplay

private NullDisplay()
Private constructor to make sure the singleton pattern is used.

Method Detail

setFormSheet

public final void setFormSheet(FormSheet fs)
Throws an InvalidDisplayException.

Specified by:
setFormSheet in interface Display
Parameters:
fs - the FormSheet to be displayed.

setBounds

public void setBounds(java.awt.Rectangle r)
Throws an InvalidDisplayException.

Specified by:
setBounds in interface Display
Parameters:
r - the Rectangle that contains the size and position information.

getBounds

public java.awt.Rectangle getBounds()
Throws an InvalidDisplayException.

Specified by:
getBounds in interface Display

getFormSheet

public FormSheet getFormSheet()
Throws an InvalidDisplayException.

Specified by:
getFormSheet in interface Display

getMenuSheet

public MenuSheet getMenuSheet()
Throws an InvalidDisplayException.

Specified by:
getMenuSheet in interface Display

closeFormSheet

public final void closeFormSheet()
Throws an InvalidDisplayException.

Specified by:
closeFormSheet in interface Display

popUpFormSheet

public final void popUpFormSheet(FormSheet fs)
Throws an InvalidDisplayException.

Specified by:
popUpFormSheet in interface Display
Parameters:
fs - the FormSheet to be displayed.

setMenuSheet

public final void setMenuSheet(MenuSheet ms)
Throws an InvalidDisplayException.

Specified by:
setMenuSheet in interface Display
Parameters:
ms - the MenuSheet to be displayed. null is a valid value and should result in the current MenuSheet being closed.

isUseableDisplay

public final boolean isUseableDisplay()
Returns false to indicate this display is not useable.

Specified by:
isUseableDisplay in interface Display

addFormSheetListener

public final void addFormSheetListener(FormSheetListener fsl)
Throws an InvalidDisplayException.

Specified by:
addFormSheetListener in interface Display
Parameters:
fsl - the FormSheetListener to be registered.

removeFormSheetListener

public void removeFormSheetListener(FormSheetListener fsl)
Throws an InvalidDisplayException.

Specified by:
removeFormSheetListener in interface Display
Parameters:
fsl - the FormSheetListener to be unregistered.

toFront

public void toFront()
Throws an InvalidDisplayException.

Specified by:
toFront in interface Display

load

public void load(java.io.ObjectInputStream ois)
          throws java.io.IOException,
                 java.lang.ClassNotFoundException
Throws an InvalidDisplayException.

Specified by:
load in interface Display
Parameters:
ois - the stream to read attributes from
Throws:
java.io.IOException
java.lang.ClassNotFoundException

save

public void save(java.io.ObjectOutputStream oos)
          throws java.io.IOException
Throws an InvalidDisplayException.

Specified by:
save in interface Display
Parameters:
oos - the stream to write attributes to
Throws:
java.io.IOException

setButtonbarPosition

public void setButtonbarPosition(int position)
Description copied from interface: Display
Called to update the Buttonbar position

Specified by:
setButtonbarPosition in interface Display