
package jp.riken.brain.ni.samuraigraph.base;

import java.util.ArrayList;
import org.w3c.dom.Document;


/**
 * An object which displays the data objects as a graph.
 * 
 */
public interface SGIFigureElementGraph extends SGIFigureElement
{

	/**
	 * 
	 */
	public boolean setAxisElement( SGIFigureElementAxis aElement );


	/**
	 * Set the name of a data object.
	 * @param data - the data object to get the name
	 * @return the name of data object
	 */
	public String getDataName( SGData data );


	/**
	 * Set the name of a data object.
	 * @param data - the data object to set the name
	 * @return true:succeeded, false:failed
	 */
	public boolean setDataName( String name, SGData data );



	/**
	 * 
	 */
	public ArrayList getDrawingElementList( SGData data );


	public SGProperties getDataProperties( SGData data );


	/**
	 * 
	 * @param data
	 * @return
	 */
	public SGAxis getXAxis( SGData data );


	/**
	 * 
	 * @param data
	 * @return
	 */
	public SGAxis getYAxis( SGData data );


	/**
	 * 
	 * @param data
	 * @return
	 */
	public SGAxis getZAxis( SGData data );


	/**
	 * 
	 */
	public boolean isDataVisible( SGData data );



	/**
	 * 
	 * @param document
	 * @return
	 */
	public boolean createElementOfData( Document document, ArrayList elList );

	
	
	/**
	 * 
	 * @return
	 */
	public ArrayList getVisibleDataList();


	/**
	 * 
	 */
	public int getSelectedDataNumber();


	/**
	 * 
	 */
	public boolean removeSelectedData();



	/**
	 * 
	 */
	public ArrayList getVisibleFlagList( SGData data );


	/**
	 * 
	 * @param data
	 * @return
	 */
	public boolean getVisibleInLegendFlag( SGData data );



	/**
	 * Returns a list of copies of the focused data objects.
	 * @return a list to which the cut data objects are added
	 */
	public ArrayList getFocusedDataList();


	/**
	 * Returns a list of the cut data objects.
	 * @return a list to which the cut data objects are added
	 */
	public ArrayList cutFocusedData();



	public static final String TAG_NAME_GRAPH = "Graph";
	public static final String TAG_NAME_DATA = "Data";
	public static final String KEY_SAMPLING_RATE = "SamplingRate";
	public static final String KEY_POLAR = "Polar";
	public static final String KEY_MAGNITUDE_PER_CM = "MagnitudePerCM";
	public static final String KEY_DIRECTION_INVARIANT = "DirectionInvariant";

	public boolean setAxisXDirectly( final int id, final int value );
	public boolean setAxisYDirectly( final int id, final int value );
	public boolean setVisibleInLegendDirectly( final int id , final boolean value );
	public boolean setNameDirectly( final int id , final String value );

}

