/*
 * $Id: LayerChild.java,v 1.6 2001/01/31 23:41:04 dwd Exp $
 *
 * This software is provided by NOAA for full, free and open release.  It is
 * understood by the recipient/user that NOAA assumes no liability for any
 * errors contained in the code.  Although this software is released without
 * conditions or restrictions in its use, it is expected that appropriate
 * credit be given to its author and to the National Oceanic and Atmospheric
 * Administration should the software be included by the recipient as an
 * element in other product development.
 */
 
package sgtplot;
import java.awt.Graphics;
import java.awt.Rectangle;

import org.freehep.graphics2d.VectorGraphics;
 
/**
 * LayerChild defines an interface to allow classes to be
 * associated with a Layer. The interface is sufficient to
 * provide scaling, translation, and mouse selection.
 * 
 * @author Donald Denbo
 * @version $Revision: 1.6 $, $Date: 2001/01/31 23:41:04 $
 * @since 1.0
 */
public interface LayerChild extends Selectable {

  /**
   * Draw the LayerChild.
   * 
   * @param g Graphics context
   * @exception LayerNotFoundException No layer is associated with the LayerChild.
   */
  public void draw(VectorGraphics g) throws LayerNotFoundException ;

  /**
   * Get the associated Layer.
   * 
   * @return Associated layer
   */
  public Layer getLayer();

  /**
   * Associate a Layer with the LayerChild.
   * 
   * @param l Parent layer.
   */
  public void setLayer(Layer l);

  /**
   * Get the identifier.
   * 
   * @return LayerChild identification.
   */
  public String getId();

  /**
   * Set the identifier.
   * 
   * @param id LayerChild identification.
   */
  public void setId(String id);

  /**
   * Create a copy of the LayerChild.
   * 
   * @return A copy of the LayerChild.
   */
  public LayerChild copy();

  /**
   * Return a string that represents the LayerChild.
   * 
   * @return Stringified LayerChild representation.
   */
  public String toString();

  /**
   * Check if LayerChild is visible.
   *
   * @since 2.0
   * @return true if visible
   */
  public boolean isVisible();

  /**
   * Set visibility for a LayerChild.
   *
   * @since 2.0
   * @param visible visible if true
   */
  public void setVisible(boolean visible);
  /**
   * Get AbstractPane of the LayerChild.
   * @since 2.0
   */
  public AbstractPane getPane();
  /**
   * Used by sgtplot internally.
   * @since 2.0
   */
  public void modified(String mess);
}

 

Ads help maintain this website.