Package org.gvsig.utils
Class ExtentsHistory
java.lang.Object
org.gvsig.utils.ExtentsHistory
Clase que representa un array circular de rectángulos
- Author:
- Fernando González Cortés
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new ExtentsHistory object.ExtentsHistory(int numEntries) Creates a new ExtentsHistory object. -
Method Summary
Modifier and TypeMethodDescriptionget()Obtiene el último rectángulo que se añadió al históricobooleanDevuelve true si hay algún rectángulo en el históricovoidput(Rectangle2D.Double ext) Pone un nuevo rectángulo al final del arrayDevuelve el último rectángulo del histórico y lo elimina del mismo
-
Constructor Details
-
ExtentsHistory
public ExtentsHistory()Creates a new ExtentsHistory object. -
ExtentsHistory
public ExtentsHistory(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 Details
-
put
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
Obtiene el último rectángulo que se añadió al histórico- Returns:
- Ultimo rectángulo añadido
-
removePrev
Devuelve el último rectángulo del histórico y lo elimina del mismo- Returns:
- Ultimo rectángulo añadido
-