Esempio n. 1
0
 public void writeObject(MixedDataOutput outs) throws java.io.IOException {
   super.writeObject(outs); // BufForDrawable.writeObject( outs );
   if (childnode != null) {
     outs.writeInt(childnode.shadowbufs.size());
     Iterator belowbufs = childnode.shadowbufs.iterator();
     while (belowbufs.hasNext()) ((BufForShadows) belowbufs.next()).writeObject(outs);
     // Mark the ShadowBufs in the children node has been saved
     childnode.haveShadowBufsBeenSaved = true;
   } else // childnode == null
   outs.writeInt(0);
 }
Esempio n. 2
0
  public void empty() {
    if (childnode != null && childnode.haveShadowBufsBeenSaved) {
      Iterator belowbufs = childnode.shadowbufs.iterator();
      while (belowbufs.hasNext()) ((BufForShadows) belowbufs.next()).empty();
      // renewShadowBufs() for others to use
      childnode.shadowbufs.clear();
      childnode.haveShadowBufsBeenSaved = false;
    }

    // try to clear() on BufForDrawables.buf4drawables
    super.empty();
  }
Esempio n. 3
0
  /*
     finalizeLatestTime() should be invoked BEFORE
     mergeVerticalShadowBufs() and shiftHorizontalShadowBuf() are called
  */
  public void finalizeLatestTime(final Drawable last_drawable_added) {
    if (childnode == null) // i.e. if ( super.isLeaf() )
    super.setLatestTime(last_drawable_added.getLatestTime());
    else // if ( childnode != null )
    super.setLatestTime(childnode.getLatestTime());

    if (shadowbuf != null) {
      // After setting the LatestTime, seal the shadows' category weights
      shadowbuf.setLatestTime(super.getLatestTime());
      shadowbuf.initializeMapOfCategoryWeights();
    }
  }