|
SalesPoint v3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JInternalFrame sale.multiwindow.JInternalDisplay
public class JInternalDisplay
A JInternalFrame that can display Form- and MenuSheets.
This display allows SalesPoints to be displayed on a JDesktopPane
.
The frame will display one FormSheet
. Closing the frame using the systems
menu or any other OS dependent gesture will result in a call to FormSheet.cancel()
on the FormSheet.
Also, the frame may display a MenuSheet
. It can therefore be used wherever a Display
can be used.
Attention: This class is not meant to be serialized. See load()
and store()
for details.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JInternalFrame |
---|
JInternalFrame.AccessibleJInternalFrame, JInternalFrame.JDesktopIcon |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected ListenerHelper |
m_lhListeners
The list of listeners. |
Fields inherited from class javax.swing.JInternalFrame |
---|
closable, CONTENT_PANE_PROPERTY, desktopIcon, FRAME_ICON_PROPERTY, frameIcon, GLASS_PANE_PROPERTY, iconable, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, isClosed, isIcon, isMaximum, isSelected, LAYERED_PANE_PROPERTY, maximizable, MENU_BAR_PROPERTY, resizable, ROOT_PANE_PROPERTY, rootPane, rootPaneCheckingEnabled, title, TITLE_PROPERTY |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JInternalDisplay()
Creates a new JInternalDisplay. |
Method Summary | |
---|---|
void |
addFormSheetListener(FormSheetListener fsl)
Adds a listener to receive notification on the JInternalDisplay's FormSheet. |
void |
closeFormSheet()
Closes the current FormSheet. |
void |
closeFormSheet(FormSheet fs)
Closes a FormSheet. |
void |
dispose()
In addition to disposing of the peer resources, removes the FormSheet and the MenuSheet. |
protected void |
exitForm()
Hook method called when the display is about to be closed. |
protected void |
fireFormSheetRemoved(FormSheet fs,
boolean fExplicit)
Fires an event to all FormSheetListeners indicating that
a FormSheet was removed from this display. |
protected void |
fireFormSheetSet(FormSheet fs)
Fires an event to all FormSheetListeners indicating that
a FormSheet was set on this display. |
protected void |
formSheetClosed()
Hook method called when the FormSheet was closed. |
FormSheet |
getFormSheet()
Returns the FormSheet that is currently attached to the display. |
MenuSheet |
getMenuSheet()
Returns the MenuSheet that is currently attached to the display. |
String |
getPrimaryTitle()
Returns the display's primary title. |
String |
getSecondaryTitle()
Returns the display's secondary title. |
boolean |
isUseableDisplay()
Returns true to indicate this is a useable display. |
void |
load(ObjectInputStream ois)
Restore this display frame from data in the given input stream. |
protected void |
onDisplayFocusGained()
Executed when the JInternalDisplay receives the focus, i.e. is being activated. |
void |
onFormSheetButtonAdded(FormSheet fs,
FormSheet.FormButton fb)
Notification event informing that a button was added to the FormSheet's button bar. |
void |
onFormSheetButtonRemoved(FormSheet fs,
FormSheet.FormButton fb)
Notification event informing that a button was removed from the FormSheet's button bar. |
void |
onFormSheetButtonsCleared(FormSheet fs)
Notification event informing that all buttons were removed from a FormSheet's button bar. |
void |
onFormSheetCaptionChanged(FormSheet fs,
String sNewCaption)
Notification event informing about a change of a FormSheet's caption. |
void |
onFormSheetComponentChanged(FormSheet fs,
JComponent jcmpNew)
Notification event informing about a change of a FormSheet's component. |
void |
popUpFormSheet(FormSheet fs)
Opens a fresh JDisplayDialog and displays the FormSheet in it. |
void |
removeFormSheetListener(FormSheetListener fsl)
Removse a listener to receive notification on the JInternalDisplay's FormSheet. |
void |
save(ObjectOutputStream oos)
Saves this display frame to the given output stream. |
void |
setDisplayTitle()
Sets the display's title. |
void |
setFormSheet(FormSheet fs)
Sets and displays a FormSheet. |
void |
setMenuSheet(MenuSheet ms)
Sets and displays a MenuSheet. |
void |
setPrimaryTitle(String sPrimaryTitle)
Sets the display's primary title. |
void |
setSecondaryTitle(String sSecondaryTitle)
Sets the display's secondary title. |
void |
toFront()
Gives the display the focus, i.e. brings it to front and activates it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface sale.Display |
---|
getBounds, setBounds |
Field Detail |
---|
protected ListenerHelper m_lhListeners
Constructor Detail |
---|
public JInternalDisplay()
exitForm()
when the JInternalDisplay is
closed and onDisplayFocusGained()
when it is activated.
Method Detail |
---|
protected void onDisplayFocusGained()
public void save(ObjectOutputStream oos) throws IOException
save
in interface Display
oos
- the stream to write attributes to
IOException
public void load(ObjectInputStream ois) throws IOException, ClassNotFoundException
load
in interface Display
ois
- the stream to read attributes from
IOException
ClassNotFoundException
public void setPrimaryTitle(String sPrimaryTitle)
The whole title will be displayed as follows: primaryTitle - secondaryTitle
sPrimaryTitle
- the primary title to be set.public String getPrimaryTitle()
public void setSecondaryTitle(String sSecondaryTitle)
The whole title will be displayed as follows: primaryTitle - secondaryTitle
sSecondaryTitle
- the secondary title to be set.public String getSecondaryTitle()
public void setDisplayTitle()
protected void exitForm()
By default cancels any FormSheet being currently displayed and closes the frame.
public void setFormSheet(FormSheet fs) throws InterruptedException
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.
setFormSheet
in interface Display
fs
- the FormSheet to be displayed.
InterruptedException
- if an interrupt occured while waiting for the
FormSheet to be closed.public FormSheet getFormSheet()
FormSheet
that is currently attached to the display.
getFormSheet
in interface Display
public void closeFormSheet()
closeFormSheet
in interface Display
public void popUpFormSheet(FormSheet fs) throws InterruptedException
JDisplayDialog
and displays the FormSheet in it.
popUpFormSheet
in interface Display
fs
- the FormSheet to be displayed.
InterruptedException
- if an interrupt occured while waiting for the
FormSheet to be closed.public void setMenuSheet(MenuSheet ms)
If a MenuSheet is already being displayed, setMenuSheet()
should remove this
MenuSheet prior to setting the new MenuSheet.
setMenuSheet
in interface Display
ms
- the MenuSheet to be displayed. null
is a valid value and should result in the
current MenuSheet being closed.public MenuSheet getMenuSheet()
MenuSheet
that is currently attached to the display.
getMenuSheet
in interface Display
public boolean isUseableDisplay()
isUseableDisplay
in interface Display
public void toFront()
toFront
in interface Display
toFront
in class JInternalFrame
public void addFormSheetListener(FormSheetListener fsl)
addFormSheetListener
in interface Display
fsl
- the FormSheetListener to be registered.public void removeFormSheetListener(FormSheetListener fsl)
removeFormSheetListener
in interface Display
fsl
- the FormSheetListener to be unregistered.protected void fireFormSheetSet(FormSheet fs)
FormSheetListeners
indicating that
a FormSheet
was set on this display. As FormSheet setting is always explicit, no
extra parameter is necessary.
fs
- the FormSheet that was setprotected void fireFormSheetRemoved(FormSheet fs, boolean fExplicit)
FormSheetListeners
indicating that
a FormSheet
was removed from this display.
fs
- the FormSheet that was setfExplicit
- true, if the FormSheet was closed explicitly, i.e. either by a call to one of
the closeFormSheet
methods or by setFormSheet (null)
.closeFormSheet()
,
closeFormSheet(FormSheet)
,
setFormSheet(sale.FormSheet)
public void closeFormSheet(FormSheet fs)
If a FormSheet is closed, by default, the JDisplayDialog containing it is also closed. You can,
however, alter this behavior by overriding formSheetClosed()
.
fs
- the FormSheet to be closed.formSheetClosed()
.protected void formSheetClosed()
exitForm()
.public void dispose()
dispose
in class JInternalFrame
public void onFormSheetCaptionChanged(FormSheet fs, String sNewCaption)
fs
- the FormSheet whose caption changed.sNewCaption
- the new caption of the FormSheet.public void onFormSheetComponentChanged(FormSheet fs, JComponent jcmpNew)
fs
- the FormSheet whose component changed.jcmpNew
- the new component of the FormSheet.public void onFormSheetButtonAdded(FormSheet fs, FormSheet.FormButton fb)
fs
- the FormSheet whose button bar changed.fb
- the button that was added to the FormSheet.public void onFormSheetButtonRemoved(FormSheet fs, FormSheet.FormButton fb)
fs
- the FormSheet whose button bar changed.fb
- the button that was removed from the FormSheet.public void onFormSheetButtonsCleared(FormSheet fs)
fs
- the FormSheet whose button bar was cleared.
|
SalesPoint v3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |