SalesPoint v3.3 API

sale
Class MenuSheetSeparator

java.lang.Object
  extended by sale.MenuSheetObject
      extended by sale.MenuSheetSeparator
All Implemented Interfaces:
Serializable

public class MenuSheetSeparator
extends MenuSheetObject

A separator in a MenuSheet.

Separators are horizontal lines that are displayed in pop up menus to divide them into sections. Separators will not be displayed in JMenuBar representations of MenuSheets.

Since:
v2.0
Author:
Steffen Zschaler
See Also:
MenuSheetObject, MenuSheet, Serialized Form

Field Summary
 
Fields inherited from class sale.MenuSheetObject
m_msParent, m_pAttached, m_spAttached
 
Constructor Summary
MenuSheetSeparator()
          Create a new MenuSheetSeparator.
MenuSheetSeparator(String sTag)
          Create a new MenuSheetSeparator with a tag.
 
Method Summary
 JMenu getMenuPeer()
          Return the JMenu peer for this MenuSheetObject.
 JMenuItem getPeer()
          Return the JMenuItem peer for this MenuSheetObject.
 boolean isSeparator()
          Return true if this is a separator.
 
Methods inherited from class sale.MenuSheetObject
attach, attach, detachSaleProcess, detachSalesPoint, equals, getCaption, getParent, getTag, getTaggedItem, getTaggedItem, isVisible, setCaption, setVisible
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MenuSheetSeparator

public MenuSheetSeparator(String sTag)
Create a new MenuSheetSeparator with a tag.

Parameters:
sTag - the tag to associate with this MenuSheetSeparator

MenuSheetSeparator

public MenuSheetSeparator()
Create a new MenuSheetSeparator.

Method Detail

isSeparator

public final boolean isSeparator()
Description copied from class: MenuSheetObject
Return true if this is a separator. Separators need not have peers.

Overrides:
isSeparator in class MenuSheetObject
Returns:
true to indicate that this is a separator.
See Also:
MenuSheetObject.getPeer(), MenuSheetObject.getMenuPeer()
Override:
Never

getPeer

public final JMenuItem getPeer()
Description copied from class: MenuSheetObject
Return the JMenuItem peer for this MenuSheetObject. This can be a JMenuItem or a JMenu, just as is appropriate. You can always return the same peer.

Specified by:
getPeer in class MenuSheetObject
Returns:
null, as separators do not need a peer.
Override:
Never

getMenuPeer

public final JMenu getMenuPeer()
Description copied from class: MenuSheetObject
Return the JMenu peer for this MenuSheetObject. Independently of the actual type of the MenuSheetObject this must return a JMenu object.

For MenuSheetItems and similar MenuSheetObjects it is recommended that you create a JMenu with the same caption and only one item, the MenuElement peer of the MenuSheetObject. Make sure, however, to create all these objects afresh for the JMenu peer, lest there should result inpredictably behaving menus. This does, of course not apply, if the MenuElement peer and the JMenu peer are entirely equal as is the case for MenuSheets.

Although JMenuItem peer and JMenu peer should be different objects, subsequent calls to getMenuPeer() can still return the same object.

Specified by:
getMenuPeer in class MenuSheetObject
Returns:
null, as separators do not need a peer.
Override:
Never

SalesPoint v3.3 API