/[libvob]/libvob/org/nongnu/libvob/lava/Group.java
ViewVC logotype

Diff of /libvob/org/nongnu/libvob/lava/Group.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by benja, Fri Apr 4 12:15:17 2003 UTC revision 1.2 by benja, Sat Apr 5 18:51:19 2003 UTC
# Line 30  import java.awt.Graphics; Line 30  import java.awt.Graphics;
30  import java.util.*;  import java.util.*;
31    
32  /** A vob that contains a list of other vobs.  /** A vob that contains a list of other vobs.
33     *  The vobs are all rendered with the same
34     *  RenderTraversal settings, i.e. transform,
35     *  color etc.
36   */   */
37  public class Group implements Vob {  public class Group implements Sequence {
38    
39      protected final List content = new ArrayList();      protected final List content = new ArrayList();
40      protected int size = 1;      protected int size = 1;
41    
42        public Sequence cloneEmpty() {
43            return new Group();
44        }
45    
46      public int add(Vob v) {      public int add(Vob v) {
47          content.add(v);          content.add(v);
48          int index = size;          int index = size;
# Line 43  public class Group implements Vob { Line 50  public class Group implements Vob {
50          return index;          return index;
51      }      }
52    
53      public void close() {      public float getSize(Axis axis) {
54            float size = 0;
55            for(Iterator i=content.iterator(); i.hasNext();) {
56                float s = ((Vob)i.next()).getSize(axis);
57                if(s > size) size = s;
58            }
59            return size;
60        }
61    
62        public Sequence close() {
63            return this;
64      }      }
65    
66      public int getCount() {      public int getCount() {

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26