SalesPoint Framework v3.0

sale.multiwindow
Class MultiWindowHandle

java.lang.Object
  |
  +--sale.multiwindow.MultiWindowHandle

public class MultiWindowHandle
extends Object
implements FormSheetContainer, Display, Serializable

A handle returned by getNewHandle.

This class represents a subframe inside a MultiWindow.

Since:
v2.0
Version:
2.0 03/06/1999
Author:
Stephan Gambke
See Also:
Serialized Form

Method Summary
 void addFormSheetListener(FormSheetListener fsl)
          Register a new FormSheetListener.
 void closeFormSheet()
          Closes the FormSheet currently rendered by this display.
 void closeFormSheet(FormSheet fs)
          Closes the FormSheet of this handle.
 String getDisplayCaption()
           
 FormSheet getFormSheet()
          Get the current FormSheet.
 MenuSheet getMenuSheet()
          Get the current MenuSheet.
 boolean isUseableDisplay()
          Returns wether this display is useable or not.
 void onFormSheetButtonAdded(FormSheet fs, FormSheet.FormButton fbNewButton)
          Method to be called when a new button has been added to the FormSheet.
 void onFormSheetButtonRemoved(FormSheet fs, FormSheet.FormButton fbRemovedButton)
          Method to be called when a button has been removed from the FormSheet.
 void onFormSheetButtonsCleared(FormSheet fs)
          Method to be called when all buttons have been removed from the FormSheet.
 void onFormSheetCaptionChanged(FormSheet fs, String sNewCaption)
          Method to be called when the FormSheet's caption has changed.
 void onFormSheetComponentChanged(FormSheet fs, JComponent jcmpNewComponent)
          Method to be called when the FormSheet's component has changed.
 void popUpFormSheet(FormSheet fs)
          Open a fresh JDisplayDialog and display the FormSheet in it.
 void removeFormSheetListener(FormSheetListener fsl)
          Un-register the given FormSheetListener.
 void setDisplayCaption(String sNewCaption)
          Set a new caption for the handles display.
 void setFormSheet(FormSheet fsNewFormSheet)
          Sets the FormSheet of this MultiWindowHandle.
 void setMenuSheet(MenuSheet msNewMenuSheet)
          Set the MenuSheet of this display.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

closeFormSheet

public void closeFormSheet(FormSheet fs)
Closes the FormSheet of this handle.

Since a MultiWindowHandle can display only one (or no) FormSheet at a time, the parameter will be ignored and the current FormSheet will be removed.

Override:
Never.
Specified by:
closeFormSheet in interface FormSheetContainer
Parameters:
fs - the FormSheet to be closed. Ignored.

onFormSheetCaptionChanged

public void onFormSheetCaptionChanged(FormSheet fs,
                                      String sNewCaption)
Method to be called when the FormSheet's caption has changed.
Override:
Never.
Specified by:
onFormSheetCaptionChanged in interface FormSheetContainer
Parameters:
fs - the FormSheet. Ignored.
sNewCaption - the new caption

onFormSheetComponentChanged

public void onFormSheetComponentChanged(FormSheet fs,
                                        JComponent jcmpNewComponent)
Method to be called when the FormSheet's component has changed.
Override:
Never.
Specified by:
onFormSheetComponentChanged in interface FormSheetContainer
Parameters:
fs - the FormSheet.
jcmpNewComponent - the new component

onFormSheetButtonAdded

public void onFormSheetButtonAdded(FormSheet fs,
                                   FormSheet.FormButton fbNewButton)
Method to be called when a new button has been added to the FormSheet.
Override:
Never.
Specified by:
onFormSheetButtonAdded in interface FormSheetContainer
Parameters:
fs - the FormSheet.
fbNewButton - the added button

onFormSheetButtonRemoved

public void onFormSheetButtonRemoved(FormSheet fs,
                                     FormSheet.FormButton fbRemovedButton)
Method to be called when a button has been removed from the FormSheet.
Override:
Never.
Specified by:
onFormSheetButtonRemoved in interface FormSheetContainer
Parameters:
fs - the FormSheet.
fbRemovedButton - the removed button

onFormSheetButtonsCleared

public void onFormSheetButtonsCleared(FormSheet fs)
Method to be called when all buttons have been removed from the FormSheet.
Override:
Never.
Specified by:
onFormSheetButtonsCleared in interface FormSheetContainer
Parameters:
fs - the FormSheet.

setFormSheet

public void setFormSheet(FormSheet fsNewFormSheet)
                  throws InterruptedException
Sets the FormSheet of this MultiWindowHandle. Additionally, notifies the owning MultiWindow.
Override:
Never.
Specified by:
setFormSheet in interface Display
Parameters:
fsNewFormSheet - the FormSheet to be set
Throws:
InterruptedException - if an interrupt occurred, while waiting for the FormSheet to be closed.

closeFormSheet

public void closeFormSheet()
Closes the FormSheet currently rendered by this display.
Override:
Never.
Specified by:
closeFormSheet in interface Display

popUpFormSheet

public void popUpFormSheet(FormSheet fs)
                    throws InterruptedException
Open a fresh JDisplayDialog and display the FormSheet in it.
Override:
Never.
Specified by:
popUpFormSheet in interface Display
Throws:
InterruptedException - if an interrupt occured while waiting for the FormSheet to be closed.

setMenuSheet

public void setMenuSheet(MenuSheet msNewMenuSheet)
Set the MenuSheet of this display.
Override:
Never.
Specified by:
setMenuSheet in interface Display
Parameters:
msNewMenuSheet - the MenuSheet to be set

isUseableDisplay

public boolean isUseableDisplay()
Returns wether this display is useable or not. For MultiWindowHandles the result is always true.
Override:
Never.
Specified by:
isUseableDisplay in interface Display
Returns:
true

addFormSheetListener

public void addFormSheetListener(FormSheetListener fsl)
Register a new FormSheetListener.
Override:
Never.
Specified by:
addFormSheetListener in interface Display
Parameters:
fsl - the listener to be registered

removeFormSheetListener

public void removeFormSheetListener(FormSheetListener fsl)
Un-register the given FormSheetListener.
Override:
Never.
Specified by:
removeFormSheetListener in interface Display
Parameters:
fsl - the listener to be un-registered

getMenuSheet

public MenuSheet getMenuSheet()
Get the current MenuSheet.
Override:
Never.
Returns:
a MenuSheet or null if no MenuSheet has been set.

getFormSheet

public FormSheet getFormSheet()
Get the current FormSheet.
Override:
Never.
Returns:
a FormSheet or null if no FormSheet has been set.

setDisplayCaption

public void setDisplayCaption(String sNewCaption)
Set a new caption for the handles display.

Normally this should be the name of the SalesPoint this display is attached to. The name of the current FormSheet will be appended automatically.

Override:
Never.
Parameters:
sNewCaption - the caption to be set

getDisplayCaption

public String getDisplayCaption()
Override:
Never.
Returns:
a String representing the current caption

SalesPoint Framework v3.0