public class SourceProductList
extends com.bc.ceres.swing.binding.ComponentAdapter
The file paths the user chooses are stored as objects of type File
within the property that is passed
into the constructor. Products that are chosen from the product tree can be retrieved via
getSourceProducts()
. So, clients of these must take care that the value in the given property is taken into
account as well as the return value of that method.
The property that serves as target container for the source product paths must be of type
String[].class
. Changes in the list are synchronised with the property. If the changes of the property
values outside this component shall be synchronised with the list, it is necessary that the property lies within a
property container.
Constructor and Description |
---|
SourceProductList(AppContext appContext)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ListDataListener changeListener)
Add a listener that is informed every time the list's contents change.
|
void |
addProduct(org.esa.snap.core.datamodel.Product product)
Allows clients to add single products.
|
void |
addSelectionListener(ListSelectionListener selectionListener)
Add a listener that is informed every time the list's selection is changed.
|
void |
adjustComponents() |
void |
bindComponents() |
void |
clear()
Clears the list of source products.
|
JComponent[] |
getComponents()
Creates an array of two JPanels.
|
org.esa.snap.core.datamodel.Product[] |
getSourceProducts()
Returns those source products that have been chosen from the product tree.
|
boolean |
isSelected(Object object) |
void |
removeChangeListener(ListDataListener changeListener)
Remove a change listener
|
void |
removeSelectionListener(ListSelectionListener selectionListener)
Remove a selection listener
|
void |
setDefaultPattern(String pattern)
If set, users will be asked whether to use this pattern for recursively collecting products from directories.
|
void |
setProductFilter(org.esa.snap.core.datamodel.ProductFilter productFilter)
The filter to be used to filter the list of opened products which are offered to the user for selection.
|
void |
setPropertyNameLastOpenedFormat(String propertyNameLastOpenedFormat)
Setter for property name indicating the last directory the user has opened
|
void |
setPropertyNameLastOpenInputDir(String propertyNameLastOpenInputDir)
Setter for property name indicating the last product format the user has opened
|
void |
setXAxis(boolean xAxis)
Setter for xAxis property.
|
void |
unbindComponents() |
public SourceProductList(AppContext appContext)
appContext
- The context of the app using this component.public JComponent[] getComponents()
getComponents
in class com.bc.ceres.swing.binding.ComponentAdapter
public void clear()
public void addProduct(org.esa.snap.core.datamodel.Product product)
product
- A product to add.public org.esa.snap.core.datamodel.Product[] getSourceProducts()
public void setDefaultPattern(String pattern)
null
as pattern.pattern
- The pattern to be used when collecting products from directoriespublic void bindComponents()
bindComponents
in class com.bc.ceres.swing.binding.ComponentAdapter
public void unbindComponents()
unbindComponents
in class com.bc.ceres.swing.binding.ComponentAdapter
public void adjustComponents()
adjustComponents
in class com.bc.ceres.swing.binding.ComponentAdapter
public void addChangeListener(ListDataListener changeListener)
changeListener
- the listener to addpublic void removeChangeListener(ListDataListener changeListener)
changeListener
- the listener to removepublic void addSelectionListener(ListSelectionListener selectionListener)
selectionListener
- the listener to addpublic void removeSelectionListener(ListSelectionListener selectionListener)
selectionListener
- the listener to removepublic boolean isSelected(Object object)
object
- the object which may be selected or notpublic void setProductFilter(org.esa.snap.core.datamodel.ProductFilter productFilter)
productFilter
- the filterpublic void setPropertyNameLastOpenedFormat(String propertyNameLastOpenedFormat)
propertyNameLastOpenedFormat
- property name indicating the last directory the user has openedpublic void setPropertyNameLastOpenInputDir(String propertyNameLastOpenInputDir)
propertyNameLastOpenInputDir
- property name indicating the last product format the user has openedpublic void setXAxis(boolean xAxis)
xAxis
- true
if the buttons on the second panel shall be laid out in horizontal directionCopyright © 2014–2016 European Space Agency (ESA). All rights reserved.