package sale;

import javax.swing.*;

/**
  * A separator in a MenuSheet.
  *
  * <p>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.</p>
  *
  * @see MenuSheetObject
  * @see MenuSheet
  *
  * @author Steffen Zschaler
  * @version 2.0 20/05/1999
  * @since v2.0
  */
public class MenuSheetSeparator extends MenuSheetObject {

  /**
    * Create a new MenuSheetSeparator with a tag.
    *
    * @param sTag the tag to associate with this MenuSheetSeparator
    */
  public MenuSheetSeparator (String sTag) {
    super (null, sTag);
  }

  /**
    * Create a new MenuSheetSeparator.
    */
  public MenuSheetSeparator() {
    this (null);
  }

  /**
    * @override Never
    *
    * @return true to indicate that this is a separator.
    */
  public final boolean isSeparator() {
    return true;
  }

  /**
    * @override Never
    *
    * @return <code>null</code>, as separators do not need a peer.
    */
  public final JMenuItem getPeer() {
    return null;
  }

  /**
    * @override Never
    *
    * @return <code>null</code>, as separators do not need a peer.
    */
  public final JMenu getMenuPeer() {
    return null;
  }
}