SalesPoint Framework v3.0

sale
Interface Display

All Known Implementing Classes:
JDisplayDialog, JDisplayFrame, NullDisplay, MultiWindowHandle

public interface Display

An abstract display that can display Form- and MenuSheets.

Displays are used to hide concrete user interface implementation details from the application developer. Together with FormSheets and MenuSheets they provide a complete abstraction from concrete user interfaces. Whatever the concrete user interface looks like, Displays, Form- and MenuSheets will always be handled in the same way by the application.

At any given point of time there may be up to one FormSheet and up to one MenuSheet set on a given Display. The Display interface offers methods to set and close these Form- and MenuSheets. as well as a restricted set of events that can be used to keep up to date with the current state of the display.

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

Method Summary
 void addFormSheetListener(FormSheetListener fsl)
          Register a FormSheetListener to be informed when a FormSheet is set or closed.
 void closeFormSheet()
          Close the current FormSheet.
 boolean isUseableDisplay()
          Return true to indicate that this is a display that can be used normally.
 void popUpFormSheet(FormSheet fs)
          Show a FormSheet, but do not close the current FormSheet.
 void removeFormSheetListener(FormSheetListener fsl)
          Unregister a FormSheetListener to be informed when a FormSheet is set or closed.
 void setFormSheet(FormSheet fs)
          Set and display a FormSheet.
 void setMenuSheet(MenuSheet ms)
          Set and display a MenuSheet.
 

Method Detail

setFormSheet

public void setFormSheet(FormSheet fs)
                  throws InterruptedException
Set and display a FormSheet.

This method should attach a FormSheetContainer as the FormSheet's display, get the FormSheet's caption, component and button bar and render them. The entire peer creation should be synchronized using FormSheet.getComponentLock() and FormSheet.getButtonsLock(), so as not to loose any events.

If fs.waitResponse() returns true, setFormSheet() should block, until the FormSheet is closed by a matching call to a closeFormSheet() method.

If a FormSheet is already being displayed, setFormSheet() should cancel this FormSheet prior to setting the new FormSheet.

Override:
Always.
Parameters:
fs - the FormSheet to be displayed.
Throws:
InterruptedException - if an interrupt occured while waiting for the FormSheet to be closed.

closeFormSheet

public void closeFormSheet()
Close the current FormSheet. It is up to the display whether the FormSheet will be cancelled or just closed normally.
Override:
Always.

popUpFormSheet

public void popUpFormSheet(FormSheet fs)
                    throws InterruptedException
Show a FormSheet, but do not close the current FormSheet. This method will normally pop up an extra JDisplayDialog that has the FormSheet set.

This method should attach a FormSheetContainer as the FormSheet's display, get the FormSheet's caption, component and button bar and render them. The entire peer creation should be synchronized using FormSheet.getComponentLock() and FormSheet.getButtonsLock(), so as not to loose any events.

If fs.waitResponse() returns true, popUpFormSheet() should block, until the FormSheet is closed by a matching call to a closeFormSheet() method.

If a FormSheet is already being displayed, popUpFormSheet() must not close this FormSheet prior to setting the new FormSheet.

Override:
Always.
Parameters:
fs - the FormSheet to be displayed.
Throws:
InterruptedException - if an interrupt occured while waiting for the FormSheet to be closed.

setMenuSheet

public void setMenuSheet(MenuSheet ms)
Set and display a MenuSheet.

If a MenuSheet is already being displayed, setMenuSheet() should remove this MenuSheet prior to setting the new MenuSheet.

Override:
Always.
Parameters:
ms - the MenuSheet to be displayed. null is a valid value and should result in the current MenuSheet being closed.

isUseableDisplay

public boolean isUseableDisplay()
Return true to indicate that this is a display that can be used normally. The only subclass that is actually allowed to return false is NullDisplay.
Override:
Always.

addFormSheetListener

public void addFormSheetListener(FormSheetListener fsl)
Register a FormSheetListener to be informed when a FormSheet is set or closed.
Override:
Always.
Parameters:
fsl - the FormSheetListener to be registered.

removeFormSheetListener

public void removeFormSheetListener(FormSheetListener fsl)
Unregister a FormSheetListener to be informed when a FormSheet is set or closed.
Override:
Always.
Parameters:
fsl - the FormSheetListener to be unregistered.

SalesPoint Framework v3.0