Name

LzResizeReplicationManager — An optimization for displaying large sets of data that allows the elements to resize.

Synopsis

JavaScript: LzResizeReplicationManager
Type: Class
Access: public
Topic: LFC.Data
Declared in: WEB-INF/lps/lfc/data/LzResizeReplicationManager.lzs

Description

The LzResizeReplicationManager extends the capabilities of the LzLazyReplicationManager so that the elements in the replication can be resized in their axis. All of the restrictions on the use of the LzLazyReplicationManager apply to the LzResizeReplicationManager except for this one:

  • The replicated view can change its size in the replication axis, and the size can be a constraint. Resize replication should work in all cases -- even those in which the replicated view is sized by its contents.

Note that the performance of a resize replication manager is related to the number of items displayed and the length of the data, whereas the lazy replication manager performance is only determined by the number of items displayed.

 <canvas height="200">
 
     <dataset name="vegetables">
         <celery/> <celeriac/> <carrot/> <florence_fennel/> <parsnip/> 
         <parsley/> <winter_endive/> <witloof_chicory/> <cardoon/> 
         <artichoke/> <head_lettuce/> <cos_lettuce/> <black_salsify/> 
         <swedish_turnip/> <cauliflower/> <cabbage/> <brussels_sprouts/> 
         <kohlrabi/> <broccoli/> <savoy_cabbage/> <turnip/> <radish/> 
         <water_cress/> <garden_cress/> <foliage_beet/> <spinach/> 
         <sweet_potato/> <watermelon/> <melon/> <cucumber/> <winter_squash/> 
         <marrow/> <chickpea/> <lentil/> <runner_bean/> <common_bean/> 
         <pea/> <faba_bean/> <leek/> <shallot/> <onion/> <salsify/> 
         <welsh_onion/> <garlic/> <chives/> <asparagus/> <ladyfinger/> 
         <sweet_corn/> <rhubarb/> <capsicum_pepper/> <tomato/> <eggplant/>
 
     </dataset>
 
     <simplelayout spacing="10" />
     <text width="200" oninit="checkSubviews()">
         <method name="checkSubviews"
                 event="onaddsubview" reference="replicationParent">
             this.setText( 'number of subviews: ' + 
                           replicationParent.subviews.length );
         </method>
 
     </text>
 
     <view  width="100" height="160" id="clipper">
         <>
             <view bgcolor="#CCCCFF" height="15">
                 <datapath xpath="vegetables:/* /name()" />
 
                 <text datapath="name()" valign="middle"/>
                 <method name="toggleSize" event="onclick">
                     if ( this.height != 40 ){
                         this.animate ( 'height', 40 , 500 );
                     } else {
                         this.animate ( 'height', 15 , 500 );
                     }
                 </method>
                 </view>
         </view>
         <scrollbar/>
 
     </view>
 
 </canvas>
 

Using a resize replication manager to display a large datasetwhen the elements resize.

Superclass Chain

node (LzNode) » datapointer (LzDatapointer) » datapath (LzDatapath) » LzReplicationManager » LzLazyReplicationManager » LzResizeReplicationManager

Known Subclasses

Details

Prototype Properties (1)

pooling
public var pooling = false;

JavaScript Synopsis

public LzResizeReplicationManager extends  LzLazyReplicationManager  {
  prototype public var pooling  = false;
}