org.gvsig.crs.gui.panels.wizard
Class DefSistCoordenadas

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.gvsig.crs.gui.panels.wizard.DefSistCoordenadas
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class DefSistCoordenadas
extends javax.swing.JPanel
implements java.awt.event.ActionListener, java.awt.event.ItemListener

Panel de Definicion del Sistema de Coordenadas

Author:
Luisa Marina Fernandez Ruiz (luisam.fernandez@uclm.es), Jose Luis Gomez Martinez (joseluis.gomez@uclm.es)
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static org.slf4j.Logger logger
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DefSistCoordenadas()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Fija los eventos de los RadioButtons y dem�s controles
 void ajustarTamanoTabla()
           
 void cleanData()
           
 double convert(double value, java.lang.String measure)
           
 double convert2Degree(java.lang.String unit, double value)
           
 double convert2Meters(java.lang.String unit, double value)
           
 double convert2Unitless(java.lang.String unit, double value)
           
 double convertFromDegree(java.lang.String unitSource, java.lang.String unitTarget, double value)
           
 double convertFromMeters(java.lang.String unitSource, java.lang.String unitTarget, double value)
           
 double convertFromUnitless(java.lang.String unitSource, java.lang.String unitTarget, double value)
           
 void fillData(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
           
 void fillData(org.gvsig.crs.ICrs crs)
           
 void fillTable(java.lang.String projection)
           
 javax.swing.JButton getBtnImportar()
          Inicializa el boton que importa la proyeccion actual
 javax.swing.JPanel getCardPanel()
           
 javax.swing.JComboBox getCbProyeccion()
          Contiene los nombres de las distintas proyecciones
 javax.swing.JComboBox getCbUnits()
          Contiene los nombres de las distintas unidades
 org.gvsig.crs.ICrs getCrs()
          Obtiene el CRS actual
 javax.swing.JLabel getLblNombreProy()
          Inicializa el label que contiene el Nombre de la Proyeccin
 javax.swing.JLabel getLblProyeccion()
          Inicializa el label Proyecci�n
 int getPos()
          Obtiene la posición de la proyección seleccionada dentro de la lista de proyecciones de proj4.
 org.gvsig.crs.Proj4 getProj4()
           
 java.lang.String getProjection(int indice)
          Obtencion de la proyecion utilizada a traves del indice.
 javax.swing.JPanel getProyectadoPanel()
          Inicializa el panel que contiene las opciones si el crs seleccionado es proyectado
 javax.swing.JRadioButton getRbGeografico()
          Inicializa el radio button Geogr�fico 2D
 javax.swing.JRadioButton getRbProyectado()
          Inicializa el radio button Proyectado
 javax.swing.JScrollPane getScrollTable()
          Crear scrollPane y agregar la tabla en �l
 javax.swing.JTable getTableParametros()
          Crea la tabla donde se definen los par�metros de la proyecci�n seleccionada en el combobox
 javax.swing.JPanel getTop()
          Inicializa el panel superior donde se define el sistema de coordenadas
 java.lang.String getTrueParametersNames(int indice)
          Consigue los nombres buenos de los parametros utilizados en una proyeccion
 javax.swing.JTextField getTxtNombreProy()
          Inicializa el cuadro de texto que contiene el nombre de la proyeccin
 void itemStateChanged(java.awt.event.ItemEvent e)
           
 void setCrs(int code)
          CRS que estamos cogiendo para poder rellenar los datos
 void setPos(int pos)
          Contiene la posición de la proyección seleccionada dentro de la lista de proyecciones de proj4.
 void setProjection(java.util.ArrayList proj)
          Seleccion de la proyeccion que estamos utilizando.
 void setTrueParametersNames(java.util.ArrayList names)
          define los parametros utilizados por una proyeccion.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

public static final org.slf4j.Logger logger
Constructor Detail

DefSistCoordenadas

public DefSistCoordenadas()
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Fija los eventos de los RadioButtons y dem�s controles

Specified by:
actionPerformed in interface java.awt.event.ActionListener

ajustarTamanoTabla

public void ajustarTamanoTabla()

cleanData

public void cleanData()

convert

public double convert(double value,
                      java.lang.String measure)
               throws javax.units.ConversionException
Throws:
javax.units.ConversionException

convert2Degree

public double convert2Degree(java.lang.String unit,
                             double value)

convert2Meters

public double convert2Meters(java.lang.String unit,
                             double value)

convert2Unitless

public double convert2Unitless(java.lang.String unit,
                               double value)

convertFromDegree

public double convertFromDegree(java.lang.String unitSource,
                                java.lang.String unitTarget,
                                double value)

convertFromMeters

public double convertFromMeters(java.lang.String unitSource,
                                java.lang.String unitTarget,
                                double value)

convertFromUnitless

public double convertFromUnitless(java.lang.String unitSource,
                                  java.lang.String unitTarget,
                                  double value)

fillData

public void fillData(org.opengis.referencing.crs.CoordinateReferenceSystem crs)

fillData

public void fillData(org.gvsig.crs.ICrs crs)

fillTable

public void fillTable(java.lang.String projection)

getBtnImportar

public javax.swing.JButton getBtnImportar()
Inicializa el boton que importa la proyeccion actual

Returns:

getCardPanel

public javax.swing.JPanel getCardPanel()

getCbProyeccion

public javax.swing.JComboBox getCbProyeccion()
Contiene los nombres de las distintas proyecciones

Returns:

getCbUnits

public javax.swing.JComboBox getCbUnits()
Contiene los nombres de las distintas unidades

Returns:

getCrs

public org.gvsig.crs.ICrs getCrs()
Obtiene el CRS actual

Returns:

getLblNombreProy

public javax.swing.JLabel getLblNombreProy()
Inicializa el label que contiene el Nombre de la Proyeccin

Returns:

getLblProyeccion

public javax.swing.JLabel getLblProyeccion()
Inicializa el label Proyecci�n

Returns:

getPos

public int getPos()
Obtiene la posición de la proyección seleccionada dentro de la lista de proyecciones de proj4.


getProj4

public org.gvsig.crs.Proj4 getProj4()

getProjection

public java.lang.String getProjection(int indice)
Obtencion de la proyecion utilizada a traves del indice.

Parameters:
indice -
Returns:

getProyectadoPanel

public javax.swing.JPanel getProyectadoPanel()
Inicializa el panel que contiene las opciones si el crs seleccionado es proyectado


getRbGeografico

public javax.swing.JRadioButton getRbGeografico()
Inicializa el radio button Geogr�fico 2D

Returns:

getRbProyectado

public javax.swing.JRadioButton getRbProyectado()
Inicializa el radio button Proyectado

Returns:

getScrollTable

public javax.swing.JScrollPane getScrollTable()
Crear scrollPane y agregar la tabla en �l


getTableParametros

public javax.swing.JTable getTableParametros()
Crea la tabla donde se definen los par�metros de la proyecci�n seleccionada en el combobox

Returns:

getTop

public javax.swing.JPanel getTop()
Inicializa el panel superior donde se define el sistema de coordenadas


getTrueParametersNames

public java.lang.String getTrueParametersNames(int indice)
Consigue los nombres buenos de los parametros utilizados en una proyeccion

Parameters:
indice -
Returns:

getTxtNombreProy

public javax.swing.JTextField getTxtNombreProy()
Inicializa el cuadro de texto que contiene el nombre de la proyeccin

Returns:

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
Specified by:
itemStateChanged in interface java.awt.event.ItemListener

setCrs

public void setCrs(int code)
CRS que estamos cogiendo para poder rellenar los datos

Parameters:
code -

setPos

public void setPos(int pos)
Contiene la posición de la proyección seleccionada dentro de la lista de proyecciones de proj4.

Parameters:
pos -

setProjection

public void setProjection(java.util.ArrayList proj)
Seleccion de la proyeccion que estamos utilizando. Esto lo hacemos para obtener la cadena correcta de la proyeccion en lugar de su traduccion que se utiliza en el combobox.

Parameters:
proj -

setTrueParametersNames

public void setTrueParametersNames(java.util.ArrayList names)
define los parametros utilizados por una proyeccion. Al igual que la proyeccion, sirve para coger el valor correcto del parametro en lugar de su traduccion en la tabla.

Parameters:
names -


Copyright © 2014 gvSIG Association. All Rights Reserved.