FileDocCategorySizeDatePackage
IsoFileTreeModel.javaAPI Docmp4parser 1.0-RC-172599Wed Dec 19 20:10:21 GMT 2012com.coremedia.iso.gui

IsoFileTreeModel

public class IsoFileTreeModel extends Object implements TreeModel
Adapter for an IsoFile to act as a TreeModel
see
IsoFile
see
TreeModel

Fields Summary
private com.coremedia.iso.IsoFile
file
Constructors Summary
public IsoFileTreeModel(com.coremedia.iso.IsoFile file)

        this.file = file;
    
Methods Summary
public voidaddTreeModelListener(javax.swing.event.TreeModelListener l)

    
public java.lang.ObjectgetChild(java.lang.Object parent, int index)

        if (parent instanceof ContainerBox) {
            ContainerBox container = (ContainerBox) parent;
            return container.getBoxes().get(index);

        }
        return null;
    
public intgetChildCount(java.lang.Object parent)

        if (parent != null) {
            if (parent instanceof ContainerBox) {
                ContainerBox container = (ContainerBox) parent;
                return container.getBoxes() == null ? 0 : container.getBoxes().size();
            }
        }
        return 0;
    
public intgetIndexOfChild(java.lang.Object parent, java.lang.Object child)


        if (parent instanceof ContainerBox) {
            ContainerBox container = (ContainerBox) parent;
            List<Box> boxes = container.getBoxes();
            for (int i = 0; i < boxes.size(); i++) {
                if (boxes.get(i).equals(child)) {
                    return i;
                }
            }
        }

        return 0;
    
public java.lang.ObjectgetRoot()

        return file;
    
public booleanisLeaf(java.lang.Object node)

        return !(node instanceof ContainerBox);
    
public voidremoveTreeModelListener(javax.swing.event.TreeModelListener l)

    
public voidvalueForPathChanged(javax.swing.tree.TreePath path, java.lang.Object newValue)

        throw new UnsupportedOperationException();