SalesPoint Framework v3.1

sale.multiwindow
Class MultiWindow

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Frame
                  extended byjavax.swing.JFrame
                      extended bysale.multiwindow.MultiWindow
All Implemented Interfaces:
Accessible, ChangeListener, EventListener, ImageObserver, MenuContainer, RootPaneContainer, Serializable, WindowConstants

public class MultiWindow
extends JFrame
implements ChangeListener

A MultiWindow is a JFrame capable managing all kinds of Displays.

There are three view modes:

FRAME: Displays are DisplayFrames, that is, every Display has its own window (JFrame)
TAB: Displays are TabbedFrames. The MultiWindow contains a row of tabs, each of which is a Display
DESKTOP: Displays are DesktopFrames. These are Windows that can be moved within the frame borders of the MultiWindow. (see JDesktopPane)

The view mode can be chosen by client programs by calling the setViewMode(int) method or by the user using the "MultiWindow" menu.

Displays can be added via the addSalesPointDisplay(SalesPoint) method and removed with #removeSalesPointDisplay(SalesPoint). When a display is added it will be saved until it is explicitly closed.

The displays will be updated automatically when FormSheets or MenuSheets are set.

Since:
v2.0
Author:
Sven Matznick, Stephan Gambke, Andreas Bartho
See Also:
Serialized Form

Nested Class Summary
 class MultiWindow.DesktopFrame
          This class is actually used by MultiWindow to display SalesPoints in desktop view mode.
 class MultiWindow.DisplayFrame
          This class is actually used by MultiWindow to display SalesPoints in window view mode.
static class MultiWindow.MultiWindowAction
          Special Actions are necessary for MultiWindow-MenuSheets in order for the serialization to work properly.
 class MultiWindow.TabbedFrame
          This class is actually used by MultiWindow to display SalesPoints in tabbed view mode.
 
Nested classes inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame
 
Nested classes inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
 
Nested classes inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static String CASCADE_MENU_TAG
          Constant used as tag for the "Cascade" option.
static String DESKTOP_MENU_TAG
          Constant used as tag for the "Desktop" menu option.
static int DESKTOP_VIEW
          Constant for the desktop view mode.
protected  String m_sMergeBefore
          Contains the tag of the MultiWindow's MenuSheet, in front of which the active SalesPoint's MenuSheet should be merged when in tabbed view mode.
static String MULTIWINDOW_MENU_TAG
          Constant used as tag for the MultiWindowMenu.
static int OVERLAPPED
          Constant for cascaded arrangement of the frames in window or desktop view mode.
static String SEPARATOR_TAG
          Constant used as tag for the separator in the multi window menu.
static String TABBED_MENU_TAG
          Constant used as tag for the "Tabbed" menu option.
static int TABBED_VIEW
          Constant for the tabbed view mode.
static String TILE_HORIZ_MENU_TAG
          Constant used as tag for the "Tile horizontally" option.
static String TILE_VERT_MENU_TAG
          Constant used as tag for the "Tile vertically" option.
static int TILED_HORIZONTALLY
          Constant for horizontally tiled arrangement of the frames in window or desktop view mode.
static int TILED_VERTICALLY
          Constant for vertically tiled arrangement of the frames in window or desktop view mode.
static String WINDOW_MENU_TAG
          Constant used as tag for the "Window" menu option.
static int WINDOW_VIEW
          Constant for the window view mode.
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
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, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
MultiWindow(Shop sShop, int nViewMode)
          Creates a new MultiWindow for the given Shop and initializes the viewmode.
 
Method Summary
protected  void addAllDisplays()
          Sets the displays of all open SalesPoints according to the current view mode.
 void addSalesPointDisplay(SalesPoint sp)
          Opens a display for a SalesPoint according to the current view mode.
 void arrangeFrames(int nArrangement)
          Sets the arrangement of the frames in the MultiWindow.
 void closeSalesPointDisplay(SalesPoint sp)
          Closes a SalesPoint's display as #removeSalesPointDisplay(SalesPoint) does.
protected  JDesktopPane createDesktopPane()
          Creates and returns the JPanel which is used as content pane in DESKTOP_VIEW view mode.
protected  JPanel createFramePane()
          Creates and returns the JPanel which is used as content pane in WINDOW_VIEW view mode.
protected  IconTabbedPane createTabbedPane()
          Creates and returns the IconTabbedPane which is used as content pane in TABBED_VIEW view mode.
 MenuSheet getCurrentMenuSheet()
          Gets the current global MenuSheet.
protected  JDesktopPane getDesktopPane()
          Returns the JDesktopPane to be added to the content pane in DESKTOP_VIEW view mode.
protected  JPanel getFramePane()
          Returns the JPanel to be added to the content pane in WINDOW_VIEW view mode.
 MenuSheet getMultiWindowMenuSheet()
          Returns the MultiWindow management MenuSheet for this MultiWindow.
 Display getNewInternalFrame(SalesPoint sp)
          Creates and returns a new DesktopFrame for a SalesPoint.
 Display getNewTab(SalesPoint sp)
          Creates and returns a new TabbedFame for a SalesPoint.
 Display getNewWindow(SalesPoint sp)
          Creates and returns a new DisplayFrame for a SalesPoint.
protected  IconTabbedPane getTabbedPane()
          Returns the IconTabbedPane to be added to the content pane in TABBED_VIEW view mode.
 int getViewMode()
          Gets the current view mode.
 void load(ObjectInputStream ois)
          Loads the state of the MultiWindow from a stream.
protected  void prepareNewContentPane(int viewMode)
          Prepares the MultiWindow's content pane for a new view mode.
protected  void removeAllDisplays()
          Closes the displays of all open SalesPoints.
 void save(ObjectOutputStream oos)
          Saves the current state of the MultiWindow.
 void setDefaultMenuSheet()
          Sets the default MenuSheet.
 void setMenuSheet(MenuSheet msNewMenuSheet)
          Sets the given MenuSheet as a global MenuSheet in the MultiWindow.
protected  void setMergeBefore(String sMergeBefore)
          Sets the value of m_sMergeBefore.
 void setSecondMenuSheet(MenuSheet ms)
          Merges the MultiWindow's MenuSheet with a second one.
 void setViewMode(int viewMode)
          Sets a new view mode.
 void stateChanged(ChangeEvent evt)
          Implementation of the method in ChangeListener.
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

m_sMergeBefore

protected String m_sMergeBefore
Contains the tag of the MultiWindow's MenuSheet, in front of which the active SalesPoint's MenuSheet should be merged when in tabbed view mode.
The default implementation is null, so SalesPoint's menus appear behind all Shop's menus. It is also possible to use setMergeBefore(String) to change this variable's value.

See Also:
setSecondMenuSheet(sale.MenuSheet)
Override:
Sometimes if you want SalesPoint's menus to be displayed at a different position.

WINDOW_VIEW

public static final int WINDOW_VIEW
Constant for the window view mode. Should be used as parameter for setViewMode(int) and for recognizing the return values of getViewMode().

See Also:
Constant Field Values

TABBED_VIEW

public static final int TABBED_VIEW
Constant for the tabbed view mode. Should be used as parameter for setViewMode(int) and for recognizing the return values of getViewMode().

See Also:
Constant Field Values

DESKTOP_VIEW

public static final int DESKTOP_VIEW
Constant for the desktop view mode. Should be used as parameter for setViewMode(int) and for recognizing the return values of getViewMode().

See Also:
Constant Field Values

OVERLAPPED

public static final int OVERLAPPED
Constant for cascaded arrangement of the frames in window or desktop view mode. Should be used as parameter for arrangeFrames(int).

See Also:
Constant Field Values

TILED_VERTICALLY

public static final int TILED_VERTICALLY
Constant for vertically tiled arrangement of the frames in window or desktop view mode. Should be used as parameter for arrangeFrames(int).

See Also:
Constant Field Values

TILED_HORIZONTALLY

public static final int TILED_HORIZONTALLY
Constant for horizontally tiled arrangement of the frames in window or desktop view mode. Should be used as parameter for arrangeFrames(int).

See Also:
Constant Field Values

MULTIWINDOW_MENU_TAG

public static final String MULTIWINDOW_MENU_TAG
Constant used as tag for the MultiWindowMenu. Use this constant to gain access to the menu and manipulate it.

See Also:
Constant Field Values

WINDOW_MENU_TAG

public static final String WINDOW_MENU_TAG
Constant used as tag for the "Window" menu option. Use this constant to gain access to the menu and manipulate it.

See Also:
Constant Field Values

TABBED_MENU_TAG

public static final String TABBED_MENU_TAG
Constant used as tag for the "Tabbed" menu option. Use this constant to gain access to the menu and manipulate it.

See Also:
Constant Field Values

DESKTOP_MENU_TAG

public static final String DESKTOP_MENU_TAG
Constant used as tag for the "Desktop" menu option. Use this constant to gain access to the menu and manipulate it.

See Also:
Constant Field Values

SEPARATOR_TAG

public static final String SEPARATOR_TAG
Constant used as tag for the separator in the multi window menu. Use this constant to gain access to the menu and manipulate it.

See Also:
Constant Field Values

CASCADE_MENU_TAG

public static final String CASCADE_MENU_TAG
Constant used as tag for the "Cascade" option. Use this constant to gain access to the menu and manipulate it.

See Also:
Constant Field Values

TILE_HORIZ_MENU_TAG

public static final String TILE_HORIZ_MENU_TAG
Constant used as tag for the "Tile horizontally" option. Use this constant to gain access to the menu and manipulate it.

See Also:
Constant Field Values

TILE_VERT_MENU_TAG

public static final String TILE_VERT_MENU_TAG
Constant used as tag for the "Tile vertically" option. Use this constant to gain access to the menu and manipulate it.

See Also:
Constant Field Values
Constructor Detail

MultiWindow

public MultiWindow(Shop sShop,
                   int nViewMode)
Creates a new MultiWindow for the given Shop and initializes the viewmode. The MultiWindow's caption will be the Shop's frame title.

Parameters:
sShop - the Shop for which the MultiWindow is created
nViewMode - the initial view mode
Method Detail

save

public void save(ObjectOutputStream oos)
          throws IOException
Saves the current state of the MultiWindow.

Parameters:
oos - the stream into which to save the state.
Throws:
IOException - if an error occurs while saving.
Override:
Sometimes Override this method whenever you added attributes that need to be saved when making the Shop persistent. Should be overridden along with load().

load

public void load(ObjectInputStream ois)
          throws IOException,
                 ClassNotFoundException
Loads the state of the MultiWindow from a stream.

Parameters:
ois - the input stream to restore the state from.
Throws:
IOException - if an error occurs while reading.
ClassNotFoundException - if an error occurs while reading.
Override:
Sometimes Override this method whenever you added attributes. Should be overridden along with save().

getMultiWindowMenuSheet

public MenuSheet getMultiWindowMenuSheet()
Returns the MultiWindow management MenuSheet for this MultiWindow.

The MultiWindow management MenuSheet contains the following items for managing the look of the MultiWindow:

Item text Item tag Item action Comments
Window WINDOW_MENU_TAG Change to Window view. Executes WindowAction. All SalesPoints will have their displays converted to DisplayFrames, i.e. all SalesPoints are shown in a separate window.
Tabbed TABBED_MENU_TAG Change to Tab view. Executes TabAction. All SalesPoints will have their displays converted to TabbedFrames, i.e. the MultiFrame will contain a row of tabs each of which displays a SalesPoint. The SalesPoint's menus will be merged with the Shop's menu.
See also setSecondMenuSheet(sale.MenuSheet)
Desktop DESKTOP_MENU_TAG Change to Desktop view. Executes DesktopAction. All SalesPoints will have their displays converted to DesktopFrames, i.e. all SalesPoints are shown in a separate window. But in contrast to Window view mode the SalesPoints cannot moved around the whole screen but only within the borders of the MultiWindow.
Separator SEPARATOR_TAG None.
Cascade CASCADE_MENU_TAG Cascade the Displays. Is ignored in tabbed view mode. Executes CascadeAction.
Tile horizontally TILE_HORIZ_MENU_TAG Tile internal frames horizontally. Is ignored in tabbed view mode. Executes TileHorizontallyAction.
Tile vertically TILE_VERT_MENU_TAG Tile internal frames vertically. Is ignored in tabbed view mode. Executes TileVerticallyAction.

This method is used by setDefaultMenuSheet().

Note: When adding new MenuSheetItems make sure the Actions are not implemented as anonymous inner classes as this causes problems on serialization. See MultiWindowAction for details.

Returns:
a MenuSheet representing the default MultiWindow menu
Override:
Sometimes

setDefaultMenuSheet

public void setDefaultMenuSheet()
Sets the default MenuSheet.

This method uses getMultiWindowMenuSheet() to get the MenuSheet to be set. The actual setting of the MenuSheet is performed by setMenuSheet(sale.MenuSheet)

Override:
Never

setMenuSheet

public void setMenuSheet(MenuSheet msNewMenuSheet)
Sets the given MenuSheet as a global MenuSheet in the MultiWindow.

Parameters:
msNewMenuSheet - the MenuSheet to be set
Override:
Never

setSecondMenuSheet

public void setSecondMenuSheet(MenuSheet ms)
Merges the MultiWindow's MenuSheet with a second one.

The position of the inserted MenuSheet is determined from the m_sMergeBefore variable. The MultiWindow's very MenuSheet object will not be changed, only the MenuSheet's view is altered.

This method is used to insert SalesPoint's MenuSheets into the MultiFrame's MenuSheet when in tabbed view mode, because tabs cannot contain menus. The actual merging is done by MenuSheet.mergePeers(sale.MenuSheet, java.lang.String).

Parameters:
ms - The MenuSheet to be added.
See Also:
setMergeBefore(java.lang.String)
Override:
Never

setMergeBefore

protected void setMergeBefore(String sMergeBefore)
Sets the value of m_sMergeBefore.

This variable contains a menu tag, in front of which a second MenuSheet will be added when executing setSecondMenuSheet(sale.MenuSheet)

Parameters:
sMergeBefore - the menu's tag in front of which a second MenuSheet should be added
Override:
Never

getCurrentMenuSheet

public MenuSheet getCurrentMenuSheet()
Gets the current global MenuSheet.

Override:
Never

getViewMode

public int getViewMode()
Gets the current view mode.

Returns:
an int value representing the view mode
See Also:
WINDOW_VIEW, TABBED_VIEW, DESKTOP_VIEW
Override:
Never

setViewMode

public void setViewMode(int viewMode)
Sets a new view mode.

When setting a new view mode, all open displays are closed, the MultiWindow's content pane is prepared for the new view mode and all displays that have been closed are converted and added according to the new view mode.

See Also:
WINDOW_VIEW, TABBED_VIEW, DESKTOP_VIEW
Override:
Never

prepareNewContentPane

protected void prepareNewContentPane(int viewMode)
Prepares the MultiWindow's content pane for a new view mode.

In fact, not the content pane directly is set. Instead an appropriate JComponent is added to the content pane.

View mode Set Component
WINDOW_VIEW Adds the JComponent that is returned by getFramePane(), by default an empty JPanel.
TABBED_VIEW Adds the JComponent that is returned by getTabbedPane(), by default a IconTabbedPane.
DESKTOP_VIEW Adds the JComponent that is returned by getDesktopPane(), by default a JDesktopPane.

Parameters:
viewMode - the view mode to be prepared
Override:
Never

getTabbedPane

protected IconTabbedPane getTabbedPane()
Returns the IconTabbedPane to be added to the content pane in TABBED_VIEW view mode.

Override:
Never, override createTabbedPane() instead.

createTabbedPane

protected IconTabbedPane createTabbedPane()
Creates and returns the IconTabbedPane which is used as content pane in TABBED_VIEW view mode.

Override:
Sometimes if you need a customized JPanel.

getDesktopPane

protected JDesktopPane getDesktopPane()
Returns the JDesktopPane to be added to the content pane in DESKTOP_VIEW view mode.

Override:
Never, override createDesktopPane() instead.

createDesktopPane

protected JDesktopPane createDesktopPane()
Creates and returns the JPanel which is used as content pane in DESKTOP_VIEW view mode.

Override:
Sometimes if you need a customized JPanel.

getFramePane

protected JPanel getFramePane()
Returns the JPanel to be added to the content pane in WINDOW_VIEW view mode.

Override:
Never, override createFramePane() instead.

createFramePane

protected JPanel createFramePane()
Creates and returns the JPanel which is used as content pane in WINDOW_VIEW view mode.

Override:
Sometimes if you need a customized JPanel.

addAllDisplays

protected void addAllDisplays()
Sets the displays of all open SalesPoints according to the current view mode.

This method iterates over the list of active SalesPoints (see Shop.getSalesPoints()) and calls addSalesPointDisplay(sale.SalesPoint) for each one.

Override:
Never

removeAllDisplays

protected void removeAllDisplays()
Closes the displays of all open SalesPoints.

This method iterates over the list of active SalesPoints (see Shop.getSalesPoints()) and calls #removeSalesPointDisplay for each one.

Override:
Never

addSalesPointDisplay

public void addSalesPointDisplay(SalesPoint sp)
Opens a display for a SalesPoint according to the current view mode.

Depending on the view mode set, this method calls #addSalesPoint_Window, #addSalesPoint_Tab or #addSalesPoint_InternalFrame.

Parameters:
sp - the SalesPoint for which to add a Display.
Override:
Sometimes if there are additional view modes that require a special add() method to be invoked for adding.

closeSalesPointDisplay

public void closeSalesPointDisplay(SalesPoint sp)
Closes a SalesPoint's display as #removeSalesPointDisplay(SalesPoint) does. Additionally all displays that have been saved for this SalesPoint will be deleted.

Parameters:
sp - the SalesPoint for which to close the display.

arrangeFrames

public void arrangeFrames(int nArrangement)
Sets the arrangement of the frames in the MultiWindow.

If in window or desktop viewing mode, the frames will be rearranged. In tabbed mode nothing happens.

Parameters:
nArrangement - the new Arrangement
See Also:
OVERLAPPED, TILED_HORIZONTALLY, TILED_VERTICALLY
Override:
Never

getNewTab

public Display getNewTab(SalesPoint sp)
Creates and returns a new TabbedFame for a SalesPoint.

Parameters:
sp - the SalesPoint for which to create the display
Returns:
the created display

getNewInternalFrame

public Display getNewInternalFrame(SalesPoint sp)
Creates and returns a new DesktopFrame for a SalesPoint.

Parameters:
sp - the SalesPoint for which to create the display
Returns:
the created display

getNewWindow

public Display getNewWindow(SalesPoint sp)
Creates and returns a new DisplayFrame for a SalesPoint.

Parameters:
sp - the SalesPoint for which to create the display
Returns:
the created display

stateChanged

public void stateChanged(ChangeEvent evt)
Implementation of the method in ChangeListener.

This method is invoked when Tabs in tabbed mode are changed. This is to ensure that always the correct second MenuSheet is set.

ATTENTION: This method is public as an implementation detail and must not be called directly!

Specified by:
stateChanged in interface ChangeListener
Override:
Never

SalesPoint Framework v3.1