public class GCPsGraphicLayer extends Object implements IGraphicLayer
Modifier and Type | Field and Description |
---|---|
boolean |
active |
Constructor and Description |
---|
GCPsGraphicLayer(int type,
ToolListener listener,
GCPList pointList)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
awake()
Recupera el estado de activación que tenía antes de la última invocación
de sleep
|
void |
draw(Graphics2D g,
Rectangle2D ext,
int w,
int h)
Dibujado del gráfico
|
long |
getID(int pos)
Obtiene el identificador del punto requerido
|
GPGraphic |
getLastPoint()
Obtiene el último punto arrastrado
|
GPGraphic |
getPoint(int pos)
Obtiene el punto de la posición indicada por el parámetro pos
|
GCPList |
getPointList()
Obtiene la lista de puntos
|
boolean |
isActive()
Consulta si está activo el evento de pinchado y arrastrado de los puntos de
control.
|
void |
mouseClicked(MouseEvent e) |
void |
mouseDragged(MouseEvent e) |
void |
mouseEntered(MouseEvent e) |
void |
mouseExited(MouseEvent e) |
void |
mouseMoved(MouseEvent e) |
void |
mousePressed(MouseEvent e) |
void |
mouseReleased(MouseEvent e)
Cuando se suelta el botón del ratón después de haber arrastrado volvemos
a dibujar el punto pero en la nueva ubicación.
|
void |
setActive(boolean active)
Asigna el flag que activa y desactiva el evento de pinchado y arrastrado
de los puntos de control.
|
void |
setGeoreferencingView(GeoreferencingView view) |
void |
setShowLabel(boolean showLabel)
Asigna el flag que muestra u oculta la etiqueta del punto
|
void |
sleep()
Desactiva la herramienta temporalmente.
|
public GCPsGraphicLayer(int type, ToolListener listener, GCPList pointList)
type
- El valor de type viene definido por las constantes de GPGraphiclistener
- Listener para acciones de finalización de la operación de mover puntopublic long getID(int pos)
pos
- Posición del punto en la capapublic void setGeoreferencingView(GeoreferencingView view)
public void draw(Graphics2D g, Rectangle2D ext, int w, int h)
IGraphicLayer
draw
in interface IGraphicLayer
g
- Graphics2Dext
- Rectangle2D del área de dibujadow
- Ancho en píxeles del área de dibujadoh
- Alto en píxeles del área de dibujadopublic void setShowLabel(boolean showLabel)
showLabel
- true para mostrar la etiqueta y false para ocultarlapublic GPGraphic getPoint(int pos)
pos
- Posición del puntopublic GCPList getPointList()
public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
public boolean isActive()
public void setActive(boolean active)
activeEvent
- public void sleep()
public void awake()
public GPGraphic getLastPoint()