/*
 * Licensed Materials - Property of Perforce Software, Inc. 
 * © Copyright Perforce Software, Inc. 2014, 2021 
 * © Copyright IBM Corp. 2009, 2014
 * © Copyright ILOG 1996, 2009
 * All Rights Reserved.
 *
 * Note to U.S. Government Users Restricted Rights:
 * The Software and Documentation were developed at private expense and
 * are "Commercial Items" as that term is defined at 48 CFR 2.101,
 * consisting of "Commercial Computer Software" and
 * "Commercial Computer Software Documentation", as such terms are
 * used in 48 CFR 12.212 or 48 CFR 227.7202-1 through 227.7202-4,
 * as applicable.
 */

import ilog.views.IlvGraphic;
import ilog.views.IlvPoint;
import ilog.views.IlvSelection;
import ilog.views.graphic.IlvMarker;
import ilog.views.io.IlvInputStream;
import ilog.views.io.IlvReadFileException;

/**
 * A marker subclass that has a specific selection object with specific
 * object interaction.
 */
public class MyMarker extends IlvMarker
{ 
  /**
   * Creates a new <code>IlvMarker</code> centered in <code>(0, 0)</code>
   * of type {@link IlvMarker#IlvMarkerSquare}.
   * @see #IlvMarker(IlvPoint, int)
   * @since JViews 6.0
   */
  public MyMarker()
  {
    super();
  }

  /**
   * Creates a marker by copying an existing one.
   * @param source The source marker.
   */
  public MyMarker(IlvMarker source)
  {
    super(source);
  }

  /**
   * Reads the object from an <code>IlvInputStream</code>.
   * @param stream The input stream.
   * @exception IlvReadFileException if the format is not correct.
   */
  public MyMarker(IlvInputStream stream) throws IlvReadFileException
  {
    super(stream);
  }

  /**
   * Copies the object.
   * This method copies the object by calling the copy constructor.
   * @return A copy of the object.
   */
  Override
  public IlvGraphic copy()
  {
    return new MyMarker(this);
  }

  /**
   * Creates a specific selection object for this graphic object.
   */
  Override
  public IlvSelection makeSelection()
  {
    return new MyMarkerSelection(this);
  }
}