ca.odell.glazedlists
Class DefaultExternalExpansionModel<E>

java.lang.Object
  extended by ca.odell.glazedlists.DefaultExternalExpansionModel<E>
All Implemented Interfaces:
TreeList.ExpansionModel<E>

public class DefaultExternalExpansionModel<E>
extends Object
implements TreeList.ExpansionModel<E>

An TreeList.ExpansionModel that uses a Map to remember the expanded/collapsed state of elements. TODO(jessewilson): USE WEAK REFERENCES

Author:
Jesse Wilson

Constructor Summary
DefaultExternalExpansionModel()
           
DefaultExternalExpansionModel(TreeList.ExpansionModel<E> defaultsModel)
           
 
Method Summary
 boolean isExpanded(E element, List<E> path)
          Determine the specified element's initial expand/collapse state.
 void setExpanded(E element, List<E> path, boolean expanded)
          Notifies this handler that the specified element's expand/collapse state has changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultExternalExpansionModel

public DefaultExternalExpansionModel(TreeList.ExpansionModel<E> defaultsModel)

DefaultExternalExpansionModel

public DefaultExternalExpansionModel()
Method Detail

isExpanded

public boolean isExpanded(E element,
                          List<E> path)
Description copied from interface: TreeList.ExpansionModel
Determine the specified element's initial expand/collapse state.

Specified by:
isExpanded in interface TreeList.ExpansionModel<E>
Parameters:
element - the newly inserted (or unfiltered etc.) value
path - the tree path of the element, from root to the value.
Returns:
true if the specified node's children shall be visible, or false if they should be hidden.

setExpanded

public void setExpanded(E element,
                        List<E> path,
                        boolean expanded)
Description copied from interface: TreeList.ExpansionModel
Notifies this handler that the specified element's expand/collapse state has changed.

Specified by:
setExpanded in interface TreeList.ExpansionModel<E>


Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by hbrands at 2013-02-12 20:58