com.iver.cit.gvsig.fmap
Class ExtentHistory

java.lang.Object
  extended bycom.iver.cit.gvsig.fmap.ExtentHistory

public class ExtentHistory
extends java.lang.Object

Clase que gestiona los diferentes extent por los que ha pasado la vista.

Author:
Vicente Caballero Navarro

Constructor Summary
ExtentHistory()
          Creates a new ExtentsHistory object.
ExtentHistory(int numEntries)
          Creates a new ExtentsHistory object.
 
Method Summary
static ExtentHistory createFromXML(XMLEntity xml)
          Crea un nuevo ExtentHistory a partir del XMLEntity.
 java.awt.geom.Rectangle2D get()
          Obtiene el último rectángulo que se añadió al histórico
 XMLEntity getXMLEntity()
          Devuelve el XMLEntity con la información para poder reproducir de nuevo el objeto actual.
 boolean hasPrevious()
          Devuelve true si hay algún rectángulo en el histórico
 void put(java.awt.geom.Rectangle2D ext)
          Pone un nuevo rectángulo al final del array
 java.awt.geom.Rectangle2D removePrev()
          Devuelve el último rectángulo del histórico y lo elimina del mismo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtentHistory

public ExtentHistory()
Creates a new ExtentsHistory object.


ExtentHistory

public ExtentHistory(int numEntries)
Creates a new ExtentsHistory object.

Parameters:
numEntries - Numero de entradas que se guardan en el historico de rectángulos, por defecto 20
Method Detail

put

public void put(java.awt.geom.Rectangle2D ext)
Pone un nuevo rectángulo al final del array

Parameters:
ext - Rectángulo que se añade al histórico

hasPrevious

public boolean hasPrevious()
Devuelve true si hay algún rectángulo en el histórico

Returns:
true o false en caso de que haya o no haya rectángulos

get

public java.awt.geom.Rectangle2D get()
Obtiene el último rectángulo que se añadió al histórico

Returns:
Ultimo rectángulo añadido

removePrev

public java.awt.geom.Rectangle2D removePrev()
Devuelve el último rectángulo del histórico y lo elimina del mismo

Returns:
Ultimo rectángulo añadido

getXMLEntity

public XMLEntity getXMLEntity()
Devuelve el XMLEntity con la información para poder reproducir de nuevo el objeto actual.

Returns:
XMLEntity.

createFromXML

public static ExtentHistory createFromXML(XMLEntity xml)
Crea un nuevo ExtentHistory a partir del XMLEntity.

Parameters:
xml - XMLEntity
Returns:
Nuevo ExtentHistory.