public class TankItemLoader extends AbstractProcessingTask
List of IqmDataBoxes to the DefaultListModel in the
TankPanel . This class is called by the Tank's methods, e.g.
when the user double clicks on the JList items in order to show an
item in the LookPanel or PlotPanel.
Changes
SwingWorker.StateValue| Modifier and Type | Field and Description |
|---|---|
protected DataType |
dataType
The type of the
IqmDataBox content. |
protected List<IqmDataBox> |
list
The list to load.
|
private static org.apache.log4j.Logger |
logger
Logging variable.
|
protected int |
replaceIndex
The index to be replaced.
|
protected boolean |
replaceItem
A flag whether to replace an existing stack.
|
childTask, duration, headless, operator, operatorGUI, parentTask, startTime, virtual, workPackage| Constructor and Description |
|---|
TankItemLoader(List<IqmDataBox> list,
boolean replaceItem,
int replaceIndex)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected List<IqmDataBox> |
addNewItems(List<IqmDataBox> list,
boolean isVirtual,
File virtDir)
This method adds 1...n new items to the
JList. |
protected List<IqmDataBox> |
doInBackground()
This method must be implemented by all subclasses.
|
protected void |
done()
This method is called after the
doInBackground() method and
must be implemented by all subclasses. |
DataType |
getDataType() |
List<IqmDataBox> |
getList() |
void |
setDataType(DataType dataType) |
void |
setList(List<IqmDataBox> list) |
protected void |
setTankAndManager(List<IqmDataBox> listNew)
|
getChildTask, getOperator, getOperatorGUI, getParentTask, getWorkPackage, isHeadless, isVirtual, process, setChildTask, setHeadless, setOperator, setOperatorGUI, setParentTask, setVirtual, setWorkPackageaddPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, publish, removePropertyChangeListener, run, setProgressprivate static final org.apache.log4j.Logger logger
protected List<IqmDataBox> list
protected boolean replaceItem
protected int replaceIndex
protected DataType dataType
IqmDataBox content. Default:
DataType.UNSUPPORTEDpublic TankItemLoader(List<IqmDataBox> list, boolean replaceItem, int replaceIndex)
list - protected List<IqmDataBox> doInBackground() throws Exception
AbstractProcessingTaskdoInBackground in class AbstractProcessingTaskget().Exceptionprotected void done()
AbstractProcessingTaskdoInBackground() method and
must be implemented by all subclasses. It is called too, when the
SwingWorker is cancelled.done in class AbstractProcessingTaskprotected void setTankAndManager(List<IqmDataBox> listNew) throws Exception
listNew - Exceptionprotected List<IqmDataBox> addNewItems(List<IqmDataBox> list, boolean isVirtual, File virtDir)
JList. An item stack is
stored as a List of IqmDataBoxes. All elements (Plot,
File, Image, Custom) are stored in an IqmDataBox.
For instance, a single image is represented as a list of one
IqmDataBox.
list - List of IqmDataBoxespublic List<IqmDataBox> getList()
public void setList(List<IqmDataBox> list)
list - the list to setpublic DataType getDataType()
public void setDataType(DataType dataType)
dataType - the dataType to setCopyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.