public interface DataLoader
extends java.io.Serializable
This class define a global subnetwork lazy data loader for all data box instances in TWaver to load data for all subnetworks. When a subnetwork data loading action was triggered (normally is double click the subnetwork), this loader will be performed.
TWaver use a global data loader instance for all data box instances
and subnetworks to load data lazily, which stored in class
twaver.TWaverUtil
. Use TWaverUtil.setDataLoader()
and TWaverUtil.getDataLoader()
to operate the loader.
Please note that this loader always be called when subnetworks
are triggered. If you don't want load the same data repeatedly,
use a flag (SubNetwork.isDataLoaded/setDataLoaded) of subnetwork
to indicate the data loading status. Although subnetwork provides
the flag to indicate the data loading status, you have to handle
it in the data loader by youself. You have to add all element
data into the databox and handle data loaded flag properly
by youself in method DataLoader.load()
.
TWaver implements a default data loader for general cases. Please
see class twaver.DefaultDataLoader
for more information.
Modifier and Type | Method and Description |
---|---|
void |
load(TSubNetwork subNetwork,
TDataBox box)
Load children data for the subnetwork object into the given databox lazily.
|
void load(TSubNetwork subNetwork, TDataBox box)
subNetwork
- SubNetwork subnetwork data will load intobox
- TDataBox databox the data should add intoCopyright © 2002 - 2010 Serva Software. All Rights Reserved.