com.iver.cit.gvsig.gui.Panels
Class WCSParamsPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bycom.iver.cit.gvsig.gui.Panels.WCSParamsPanel
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class WCSParamsPanel
extends javax.swing.JPanel

This class implements the coverage option panel. It includes a set of Listeners that implement some control rules which refresh the component values that depends on those selected in the other components to avoid to choose an invalid set of options. It also includes a method (hayParametrosSuficientes() which translates from spanish to "there is enough parameters") that checks if the current set of values is enough to correctly launch a GetCoverage request. The information is obtained from a WCSWizardDataSource object. Esta clase implementa el panel de opciones disponibles sobre la cobertura. Incluye una serie de Listeners que implementan unas reglas de control que refrescan los valores de componentes cuyos valores dependen de aquéllos seleccionados en otros componentes para evitar que se escoja una combinación de opciones errónea así como una función (hayParametrosSuficientes()) que comprueba si la combinación escogida actualmente es suficiente para lanzar una operación GetCoverage correctamente. La información obtiene a partir de un objeto WCSWizardDataSource.

Author:
jaume - jaume dominguez faus
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 javax.swing.JLabel lblFrom
           
 javax.swing.JLabel lblInterval
           
 javax.swing.JLabel lblSample
           
 javax.swing.JLabel lblTo
           
 
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
WCSParamsPanel()
          This method initializes jTabbedPane
 
Method Summary
 void actualizarParametros(java.lang.String coverage)
          Refreshes the parameters name at the cmbParam.
 void actualizaWizard()
          Refreshes the wizard components data each time a coverage is selected.
 void addTiempo()
          Adds the selected items from the time list to the selected times list.
 void avanzaTab()
          Sets the focus to the tab next to the current one.
 int currentPage()
          Returns the index of the current tab.
 void delTiempo()
          Removes the selected items from the selected times list.
 javax.swing.JButton getBtnAddTemps()
          This method initializes jButton2
 javax.swing.JButton getBtnDelTemps()
          This method initializes btnDelTemps
 javax.swing.JComboBox getCmbParam()
          This method initializes cmbParam
 int getCoverageIndex(java.lang.String coverageName)
          Returns the index of the coverage within the coverages list Devuelve la posición que ocupa la cobertura en la lista de coberturas
 javax.swing.JLabel getCoverageLabel()
           
 java.lang.String getEtiquetaCobertura()
          The coverage label.
 java.lang.String getFormat()
          Returns the selected format.
 int getFormatIndex(java.lang.String format)
          Returns the index of the format within the formats list.
 int getIndiceSolapaActual()
          Returns the current tab index.
 javax.swing.JScrollPane getJScrollPane5()
          This method initializes jScrollPane5
 javax.swing.JTabbedPane getJTabbedPane()
           
 java.lang.String getLayerName()
          Returns the name of the selected coverage.
 java.awt.geom.Rectangle2D getLayersRectangle()
          Returns the extent of the currently selected coverage for the currently selected SRS.
 javax.swing.JList getLstCoverages()
          This method initializes jList1
 javax.swing.JList getLstCRSs()
          This method initializes lstCRSs
 javax.swing.JList getLstFormats()
          This method initializes lstFormats
 javax.swing.JList getLstSelectedTimes()
          This method initializes lstSelectedTimes
 javax.swing.JList getLstTemps()
          This method initializes lstTemps
 java.awt.geom.Point2D getMaxRes()
          Returns the max supported resolution for the coverage.
 java.lang.String getNomCobertura()
          Returns the selected coverage name.
 int getNumTabs()
          Returns the tab amount that the WCSParamsPanel currently have Devuelve el número de solapas que tiene actualmente el WCSParamsPanel
 java.lang.String getParametro()
          Returns the name and the selected values (if they are) of the parameter in a query string.
 int getParamIndex(java.lang.String nParam)
          Returns the parameter's name's index within the cmbBox.
 javax.swing.JRadioButton getRadioMultipleInterval()
          This method initializes radioMultipleInterval
 javax.swing.JRadioButton getRadioSingleInterval()
          This method initializes radioSingleInterval
 javax.swing.JList getSingleParamValuesList()
          This method initializes lstParamValues
 java.lang.String getSRS()
          Returns the selected CRS.
 int getSRSIndex(java.lang.String crs)
          Returns the index of the CRS within the CRS list.
 java.lang.String getTiempos()
          Returns the time positions in a string that may directly be concatenated to the query string.
 javax.swing.JTextField getTxtInterval()
          This method initializes txtInterval
 javax.swing.JTextField getTxtIntervalBegin()
          This method initializes txtIntervalBegin
 javax.swing.JTextField getTxtIntervalEnd()
          This method initializes txtIntervalEnd
 javax.swing.JTextField getTxtNomCobertura()
          This method initializes jTextField
 int getValueIndex(java.lang.String valor)
          Returns the position for the parameter's value within the parameter values list.
 boolean hayParametrosSuficientes()
          Verifies that the selected parameters are enough to request the coverage to the server.
 void limpiaWizard()
          Cleans up the wizard's components but the server's layers list.
 int nextPageEnabled()
          Returns the next enabled tab's index.
 int previousEnabledPage()
          Returns the index of the previous enabled tab.
 void refreshParamValues(java.lang.String coverage)
          Refreshes the parameter values.
 void retrocedeTab()
          Sets the focus to the tab previous to the current one.
 void setDataSource(WCSWizardDataSource dataSource)
          Sets the wizard's data source Establece el origen de los datos del wizard
 void setIntervalBegin(java.lang.String text)
           
 void setIntervalEnd(java.lang.String text)
           
 void setMultipleInterval(java.lang.String text)
           
 void setWizardData(WCSWizardData data)
          Sets the object that holds the wizard data.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

lblInterval

public javax.swing.JLabel lblInterval

lblSample

public javax.swing.JLabel lblSample

lblFrom

public javax.swing.JLabel lblFrom

lblTo

public javax.swing.JLabel lblTo
Constructor Detail

WCSParamsPanel

public WCSParamsPanel()
This method initializes jTabbedPane

Method Detail

getNumTabs

public int getNumTabs()
Returns the tab amount that the WCSParamsPanel currently have Devuelve el número de solapas que tiene actualmente el WCSParamsPanel

Returns:
int

avanzaTab

public void avanzaTab()
Sets the focus to the tab next to the current one. Enfoca a la solapa siguiente a la actualmente enfocada del TabbedPane


retrocedeTab

public void retrocedeTab()
Sets the focus to the tab previous to the current one. Enfoca a la solapa anterior a la actualmente enfocada del TabbedPane


getIndiceSolapaActual

public int getIndiceSolapaActual()
Returns the current tab index. Devuelve el número de solapa en que se encuentra

Returns:

getJTabbedPane

public javax.swing.JTabbedPane getJTabbedPane()

getLstCRSs

public javax.swing.JList getLstCRSs()
This method initializes lstCRSs

Returns:
javax.swing.JList

getLstTemps

public javax.swing.JList getLstTemps()
This method initializes lstTemps

Returns:
javax.swing.JList

getCmbParam

public javax.swing.JComboBox getCmbParam()
This method initializes cmbParam

Returns:
javax.swing.JComboBox

getSingleParamValuesList

public javax.swing.JList getSingleParamValuesList()
This method initializes lstParamValues

Returns:
javax.swing.JList

getBtnDelTemps

public javax.swing.JButton getBtnDelTemps()
This method initializes btnDelTemps

Returns:
javax.swing.JButton

getLstSelectedTimes

public javax.swing.JList getLstSelectedTimes()
This method initializes lstSelectedTimes

Returns:
javax.swing.JList

getLstFormats

public javax.swing.JList getLstFormats()
This method initializes lstFormats

Returns:
javax.swing.JList

getTxtNomCobertura

public javax.swing.JTextField getTxtNomCobertura()
This method initializes jTextField

Returns:
javax.swing.JTextField

getBtnAddTemps

public javax.swing.JButton getBtnAddTemps()
This method initializes jButton2

Returns:
javax.swing.JButton

getLstCoverages

public javax.swing.JList getLstCoverages()
This method initializes jList1

Returns:
javax.swing.JList

getCoverageLabel

public javax.swing.JLabel getCoverageLabel()

getJScrollPane5

public javax.swing.JScrollPane getJScrollPane5()
This method initializes jScrollPane5

Returns:
javax.swing.JScrollPane

hayParametrosSuficientes

public boolean hayParametrosSuficientes()
Verifies that the selected parameters are enough to request the coverage to the server. Comprueba que los parámetros seleccionados son suficientes para pedir la cobertura al servidor.

Returns:
boolean

getParametro

public java.lang.String getParametro()
Returns the name and the selected values (if they are) of the parameter in a query string. Such string may directly be concatenated to the query string. Devuelve el nombre y los valores seleccionados (si hay alguno) del parámetro en forma de querystring, de manera que puede ser concatenado a la query. Si no se han seleccionado devuelve null.

Returns:
String

getTiempos

public java.lang.String getTiempos()
Returns the time positions in a string that may directly be concatenated to the query string. Devuelve las posiciones para el tiempo en forma de querystring, de manera que puede ser concatenado a la query.

Returns:
String

getSRS

public java.lang.String getSRS()
Returns the selected CRS. Devuelve el CRS seleccionado.

Returns:
String

getFormat

public java.lang.String getFormat()
Returns the selected format. Devuelve el formato seleccionado.

Returns:
String

getLayerName

public java.lang.String getLayerName()
Returns the name of the selected coverage. Devuelve el nombre de la cobertura seleccionada.

Returns:
String

limpiaWizard

public void limpiaWizard()
Cleans up the wizard's components but the server's layers list. Limpia todos los componentes del wizard excepto la lista de capas del servidor.


getNomCobertura

public java.lang.String getNomCobertura()
Returns the selected coverage name. Devuelve el nombre de la cobertura seleccionada

Returns:
String

actualizaWizard

public void actualizaWizard()
Refreshes the wizard components data each time a coverage is selected. Actualiza los datos de los componentes del wizard cada vez que se selecciona una cobertura diferente.


actualizarParametros

public void actualizarParametros(java.lang.String coverage)
Refreshes the parameters name at the cmbParam. Actualiza los nombres de parámetros en el cmbParam.

Parameters:
coverage -

setWizardData

public void setWizardData(WCSWizardData data)
Sets the object that holds the wizard data. Establece el objeto que contiene los datos del wizard.

Parameters:
data -

addTiempo

public void addTiempo()
Adds the selected items from the time list to the selected times list. Añade los items seleccionados de la lista de tiempos a la lista de tiempos seleccionados.


refreshParamValues

public void refreshParamValues(java.lang.String coverage)
Refreshes the parameter values. This method is called by a listener when the state of the cmbParam changes. It is also called from FlyrWCS when the data is reloaded from a saved project. Actualiza la lista de valores para el parámetro. Éste método es lanzado por un listener cuando el estado del cmbParam (combo de los nombres de parámetro) cambia. También es lanzado desde FLyrWCS cuando recuperamos los datos en un proyecto guardado.

Parameters:
coverage -

delTiempo

public void delTiempo()
Removes the selected items from the selected times list. Quita posiciones de tiempo de la lista de tiempos seleccionados.


getEtiquetaCobertura

public java.lang.String getEtiquetaCobertura()
The coverage label. La etiqueta de la cobertura

Returns:
String

getLayersRectangle

public java.awt.geom.Rectangle2D getLayersRectangle()
Returns the extent of the currently selected coverage for the currently selected SRS. Devuelve el Extent de la cobertura actualmente seleccionada para el SRS actualmente seleccionado

Returns:
Rectangle2D

setDataSource

public void setDataSource(WCSWizardDataSource dataSource)
Sets the wizard's data source Establece el origen de los datos del wizard

Parameters:
dataSource -

getCoverageIndex

public int getCoverageIndex(java.lang.String coverageName)
Returns the index of the coverage within the coverages list Devuelve la posición que ocupa la cobertura en la lista de coberturas

Parameters:
coverageName -
Returns:
The coverage's index if it exists, -1 if it not exists.

getSRSIndex

public int getSRSIndex(java.lang.String crs)
Returns the index of the CRS within the CRS list. Devuelve la posicion que ocupa el CRS en la lista de CRS

Parameters:
crs -
Returns:
The CRS's index if it exists, -1 if it not exists.

getFormatIndex

public int getFormatIndex(java.lang.String format)
Returns the index of the format within the formats list. Devuelve la posicion que ocupa el formato en la lista de formatos

Parameters:
format -
Returns:
The format's index if it exists, -1 if it not exists.

getParamIndex

public int getParamIndex(java.lang.String nParam)
Returns the parameter's name's index within the cmbBox. Devuelve la posicion que ocupa el nombre dle parámetro en el comboBox de parámetros

Parameters:
nParam -
Returns:
The index if it exists, -1 if it not exists.

getValueIndex

public int getValueIndex(java.lang.String valor)
Returns the position for the parameter's value within the parameter values list. Devuelve la posicion que ocupa el valor para parametro en la lista de valores para parámetro

Parameters:
valor -
Returns:
The index if it exists, -1 if it not exists.

getMaxRes

public java.awt.geom.Point2D getMaxRes()
Returns the max supported resolution for the coverage. Recupera la resolución máxima soportada por la cobertura.

Returns:
double

nextPageEnabled

public int nextPageEnabled()
Returns the next enabled tab's index. Devuelve el índicie de la siguiente pestaña habilitada del wizard o -1 si no hay ninguna.

Returns:
The index or -1 if there is no one.

currentPage

public int currentPage()
Returns the index of the current tab. Devuelve el índice de la página actual del wizard.

Returns:

previousEnabledPage

public int previousEnabledPage()
Returns the index of the previous enabled tab. Devuelve el índice de la anterior página habilitada del wizard o -1 si no hay ninguna.

Returns:
The index, or -1 if there is no one.

getTxtInterval

public javax.swing.JTextField getTxtInterval()
This method initializes txtInterval

Returns:
javax.swing.JTextField

getTxtIntervalBegin

public javax.swing.JTextField getTxtIntervalBegin()
This method initializes txtIntervalBegin

Returns:
javax.swing.JTextField

getTxtIntervalEnd

public javax.swing.JTextField getTxtIntervalEnd()
This method initializes txtIntervalEnd

Returns:
javax.swing.JTextField

getRadioSingleInterval

public javax.swing.JRadioButton getRadioSingleInterval()
This method initializes radioSingleInterval

Returns:
javax.swing.JRadioButton

getRadioMultipleInterval

public javax.swing.JRadioButton getRadioMultipleInterval()
This method initializes radioMultipleInterval

Returns:
javax.swing.JRadioButton

setMultipleInterval

public void setMultipleInterval(java.lang.String text)

setIntervalBegin

public void setIntervalBegin(java.lang.String text)

setIntervalEnd

public void setIntervalEnd(java.lang.String text)