Package org.esa.snap.ui
Class RegionBoundsInputUI
- java.lang.Object
-
- org.esa.snap.ui.RegionBoundsInputUI
-
public class RegionBoundsInputUI extends Object
This user interface provides a world map and text fields to define region bounds. The input values from the text fields and from the world map are reflected in theBindingContext
, which can be retrieved usinggetBindingContext()
.
-
-
Field Summary
Fields Modifier and Type Field Description static String
PROPERTY_EAST_BOUND
static String
PROPERTY_NORTH_BOUND
static String
PROPERTY_SOUTH_BOUND
static String
PROPERTY_WEST_BOUND
-
Constructor Summary
Constructors Constructor Description RegionBoundsInputUI()
Initializes a RegionBoundsInputUI.RegionBoundsInputUI(double northBound, double eastBound, double southBound, double westBound)
Initializes a RegionBoundsInputUI with the given parameters.RegionBoundsInputUI(com.bc.ceres.swing.binding.BindingContext bindingContext)
Initializes a RegionBoundsInputUI with the givenbindingContext
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.bc.ceres.swing.binding.BindingContext
getBindingContext()
Returns the binding context which contains property valuesnorthBound
,southBound
,westBound
, andeastBound
.JPanel
getUI()
void
setEnabled(boolean enabled)
Enables or disables all child components.
-
-
-
Field Detail
-
PROPERTY_NORTH_BOUND
public static final String PROPERTY_NORTH_BOUND
- See Also:
- Constant Field Values
-
PROPERTY_EAST_BOUND
public static final String PROPERTY_EAST_BOUND
- See Also:
- Constant Field Values
-
PROPERTY_SOUTH_BOUND
public static final String PROPERTY_SOUTH_BOUND
- See Also:
- Constant Field Values
-
PROPERTY_WEST_BOUND
public static final String PROPERTY_WEST_BOUND
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RegionBoundsInputUI
public RegionBoundsInputUI()
Initializes a RegionBoundsInputUI. This constructor creates the user interface and a binding context with default values. The created binding context can be retrieved viagetBindingContext()
.
-
RegionBoundsInputUI
public RegionBoundsInputUI(double northBound, double eastBound, double southBound, double westBound)
Initializes a RegionBoundsInputUI with the given parameters. If the parameters are valid geographic coordinates, they are used to initialize the user interface and to create a binding context. If the values are invalid, default values will be used. The created binding context can be retrieved viagetBindingContext()
.- Parameters:
northBound
- The northern bounding latitude valueeastBound
- The eastern bound longitude valuesouthBound
- The southern bound latitude valuewestBound
- The western bound longitude value
-
RegionBoundsInputUI
public RegionBoundsInputUI(com.bc.ceres.swing.binding.BindingContext bindingContext)
Initializes a RegionBoundsInputUI with the givenbindingContext
. The bindingContext has to contain four parameters:northBound
,southBound
,westBound
andeastBound
. If the bindingContext contains geographic coordinates, these coordinates are used to initialize the user interface.- Parameters:
bindingContext
- The binding context which is needed for initialisation.
-
-
Method Detail
-
setEnabled
public void setEnabled(boolean enabled)
Enables or disables all child components.- Parameters:
enabled
- -
-
getBindingContext
public com.bc.ceres.swing.binding.BindingContext getBindingContext()
Returns the binding context which contains property valuesnorthBound
,southBound
,westBound
, andeastBound
. This method should be used to get the bounds set by the UI components. It is needed when no binding context has been passed to the RegionBoundsInputUI initially.- Returns:
- the binding context.
-
-