|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.prodevelop.gvsig.mobile.fmap.viewport.ViewPort
Clase con atributos de la vista. 050211, jmorell: Añado los Grados como unidad de mapa.
Field Summary | |
static double |
ARROW_KEYS_FACTOR
|
static int |
CENTIMETRO
|
static int |
GRADOS
|
static int |
KILOMETROS
|
static int |
METROS
|
static int |
MILIMETRO
|
static int |
MILLAS
|
static int |
PIES
|
static int |
PULGADAS
|
static int |
YARDAS
|
Constructor Summary | |
ViewPort(IProjection p)
Crea un nuevo ViewPort. |
Method Summary | |
boolean |
addViewPortListener(ViewPortListener arg0)
Añade un ViewPortListener al extentListener. |
int |
fromMapDistance(double d)
Devuelve la distancia en pixels a partir de una distancia real. |
java.awt.geom.Point2D |
fromMapPoint(double x,
double y)
Devuelve un punto en pixels a partir de una coordenada X e Y real. |
java.awt.geom.Point2D |
fromMapPoint(java.awt.geom.Point2D point)
Devuelve el punto en pixels a partir de un punto real. |
java.awt.geom.Rectangle2D |
fromMapRectangle(java.awt.geom.Rectangle2D r)
|
java.awt.geom.Rectangle2D |
getAdjustedExtent()
Returns the extent currently covered by the view. |
java.awt.geom.AffineTransform |
getAffineTransform()
Devuelve la matriz de transformación. |
java.util.HashMap |
getAttributeValues(java.lang.reflect.Field[] attributes,
java.lang.Object obj)
|
java.awt.Color |
getBackColor()
Devuelve el color de fondo. |
double |
getDist1pixel()
Devuelve la distancia real de un pixel. |
double |
getDist3pixel()
Devuelve la distancia real de tres pixel. |
int |
getDistanceUnits()
Devuelve la unidad de medida en la que queremos realizar nuestras mediciones y en la que se nos mostrará toda la información. |
java.awt.geom.Rectangle2D |
getExtent()
When the zoom changes (for instance when using the zoom in or zoom out tools, but also zooming to a selected feature or shape) the extent that covers that area is the value returned by this method. |
ExtentHistory |
getExtents()
Devuelve los Extents anteriores almacenados. |
int |
getImageHeight()
Devuelve la altura de la imagen. |
java.awt.Dimension |
getImageSize()
Devuelve las dimensiones de la imagen. |
int |
getImageWidth()
Devuelve la anchura de la imagen. |
int |
getMapUnits()
Devuelve la unidad de medida del mapa, es la unidad de medida en la que está la cartográfia que cargamos, normalmente en metros. |
java.awt.geom.Point2D |
getOffset()
The offset is the position where to start drawing. |
IProjection |
getProjection()
Devuelve la proyección. |
double |
getScale()
Devuelve la escala. |
boolean |
hasNextExtent()
|
boolean |
hasPreviousExtent()
|
boolean |
moveExtent(double x,
double y,
boolean repaint)
|
void |
refreshExtent(boolean repaint)
Refresca el extent. |
boolean |
removeViewPortListener(ViewPortListener arg0)
Borra el ViewPortListener que se pasa como parámetro delos extentListener. |
boolean |
scaleExtent(double d,
boolean repaint)
|
void |
setAdjustable(boolean adjustable)
Sets the adjustable option, so the extent is automatically adjusted to view aspect. |
void |
setAffineTransform(java.awt.geom.AffineTransform at)
Método que solo lo utilizamos a la hora de imprimir. |
void |
setDist1pixel(double dist1pixel)
Inserta la distancia real de un pixel. |
void |
setDist3pixel(double dist3pixel)
Inserta la distancia real de tres pixels. |
void |
setDistanceUnits(int distanceUnits)
Inserta la unidad de medida en la que queremos realizar nuestras mediciones y en la que se nos mostrará toda la información. |
void |
setExtent(java.awt.geom.Rectangle2D r,
boolean repaint)
Inserta el extent. |
void |
setImageSize(java.awt.Dimension imageSize)
Inserta las dimensiones de la imagen. |
void |
setMapUnits(int mapUnits)
Inserta la unidad de medida del mapa, es la unidad de medida en la que está la cartográfia que cargamos, normalmente en metros. |
void |
setNextExtent()
Rellena el extent siguiente como actual. |
void |
setOffset(java.awt.geom.Point2D p)
Inserta la desviación. |
void |
setPreviousExtent()
Rellena el extent anterior como actual. |
void |
setProjection(IProjection proj)
Inserta la proyección. |
double |
toMapDistance(int d)
Devuelve la distancia real a partir de la distancia en pixels. |
java.awt.geom.Point2D |
toMapPoint(int x,
int y)
Devuelve un punto real a partir de una coordenada X e Y en pixels. |
java.awt.geom.Point2D |
toMapPoint(java.awt.geom.Point2D pScreen)
Devuelve un punto real a partir de un punto en pixels. |
java.awt.geom.Rectangle2D |
toMapRectangle(java.awt.geom.Rectangle2D r)
|
java.lang.String |
toString()
Devuelve el String con datos del ViewPort. |
java.lang.StringBuffer |
toXML(java.lang.String name)
Gets a description of this object as a XML string |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final double ARROW_KEYS_FACTOR
public static int KILOMETROS
public static int METROS
public static int CENTIMETRO
public static int MILIMETRO
public static int MILLAS
public static int YARDAS
public static int PIES
public static int PULGADAS
public static int GRADOS
Constructor Detail |
public ViewPort(IProjection p)
p
- Proyección.Method Detail |
public void setAdjustable(boolean adjustable)
adjustable
- boolean Adjustable.public boolean addViewPortListener(ViewPortListener arg0)
arg0
- ViewPortListener.
public boolean removeViewPortListener(ViewPortListener arg0)
arg0
- ViewPortListener.
public int fromMapDistance(double d)
d
- Distancia real.
public java.awt.geom.Point2D fromMapPoint(double x, double y)
x
- Coordenada X real.y
- Coordenada Y real.
public java.awt.geom.Point2D fromMapPoint(java.awt.geom.Point2D point)
point
- Punto real.
public java.awt.geom.Point2D toMapPoint(int x, int y)
x
- Coordenada X en pixels.y
- Coordenada Y en pixels.
public java.awt.geom.Rectangle2D toMapRectangle(java.awt.geom.Rectangle2D r)
public double toMapDistance(int d)
d
- Distancia en pixels.
public java.awt.geom.Point2D toMapPoint(java.awt.geom.Point2D pScreen)
pScreen
- Punto en pixels.
java.lang.RuntimeException
public void setPreviousExtent()
public void setNextExtent()
public boolean hasNextExtent()
public boolean hasPreviousExtent()
public java.awt.geom.Rectangle2D getExtent()
When the zoom changes (for instance when using the zoom in or zoom out tools,
but also zooming to a selected feature or shape) the extent that covers that
area is the value returned by this method. It is not the actual area shown
in the view because it does not care about the aspect ratio. However, any
part of the real world contained in this extent is shown in the view.
Probably this is not what you are looking for. If you are looking for the complete extent currently shown, you must use getAdjustedExtent() method which returns the extent that contains this one but regarding the current view's aspect ratio.
public void setExtent(java.awt.geom.Rectangle2D r, boolean repaint)
r
- Extent.public void refreshExtent(boolean repaint)
public double getScale()
public java.awt.geom.AffineTransform getAffineTransform()
public java.awt.Dimension getImageSize()
public void setImageSize(java.awt.Dimension imageSize)
imageSize
- The imageSize to set.public void setOffset(java.awt.geom.Point2D p)
p
- Punto.public java.awt.geom.Point2D getOffset()
public java.awt.Color getBackColor()
public java.awt.geom.Rectangle2D getAdjustedExtent()
public int getDistanceUnits()
public void setDistanceUnits(int distanceUnits)
distanceUnits
- The distanceUnits to set.public int getMapUnits()
public void setMapUnits(int mapUnits)
mapUnits
- The mapUnits to set.public int getImageWidth()
public int getImageHeight()
public double getDist1pixel()
public void setDist1pixel(double dist1pixel)
dist1pixel
- Distancia real de un pixel.public double getDist3pixel()
public void setDist3pixel(double dist3pixel)
dist3pixel
- Distancia real de tres pixels.public ExtentHistory getExtents()
public IProjection getProjection()
public void setProjection(IProjection proj)
proj
- The proj to set.public void setAffineTransform(java.awt.geom.AffineTransform at)
at
- public java.lang.String toString()
public java.awt.geom.Rectangle2D fromMapRectangle(java.awt.geom.Rectangle2D r)
public boolean scaleExtent(double d, boolean repaint)
public java.util.HashMap getAttributeValues(java.lang.reflect.Field[] attributes, java.lang.Object obj)
public java.lang.StringBuffer toXML(java.lang.String name)
Persistible
toXML
in interface Persistible
name
- name of the main element
public boolean moveExtent(double x, double y, boolean repaint)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |