public class SourceProductList
extends com.bc.ceres.swing.binding.ComponentAdapter
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(Product product)
Allows clients to add single products.
|
void |
adjustComponents() |
void |
bindComponents() |
void |
clear()
Clears the list of source products.
|
JComponent[] |
getComponents()
Creates an array of two JPanels.
|
Product[] |
getSourceProducts()
Returns those source products that have been chosen from the product tree.
|
void |
removeChangeListener(ListDataListener changeListener)
Remove a change listener
|
void |
setLastOpenedFormat(String lastOpenedFormat)
Setter for property name indicating the last directory the user has opened
|
void |
setLastOpenInputDir(String lastOpenInputDir)
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(Product product)
product
- A product to add.public Product[] getSourceProducts()
public 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 setLastOpenedFormat(String lastOpenedFormat)
lastOpenedFormat
- property name indicating the last directory the user has openedpublic void setLastOpenInputDir(String lastOpenInputDir)
lastOpenInputDir
- 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 © 2002–2014 Brockmann Consult GmbH. All rights reserved.