View Javadoc

1   /*
2    *  File: IHierarchicalTableViewState.java 
3    *  Copyright (c) 2004-2007  Peter Kliem (Peter.Kliem@jaret.de)
4    *  A commercial license is available, see http://www.jaret.de.
5    *
6    * All rights reserved. This program and the accompanying materials
7    * are made available under the terms of the Common Public License v1.0
8    * which accompanies this distribution, and is available at
9    * http://www.eclipse.org/legal/cpl-v10.html
10   */
11  package de.jaret.util.ui.table.model;
12  
13  /***
14   * Interface describing a hierarchical table viewstate. Extends the default table viewstate.
15   * 
16   * @author Peter Kliem
17   * @version $Id: IHierarchicalTableViewState.java 1076 2010-12-05 13:34:42Z kliem $
18   */
19  public interface IHierarchicalTableViewState extends ITableViewState {
20      /***
21       * Check whether a node is expanded.
22       * 
23       * @param node node to check
24       * @return true for expanded
25       */
26      boolean isExpanded(ITableNode node);
27  
28      /***
29       * Set the expanded state for a single node.
30       * 
31       * @param node node
32       * @param expanded true for expanded
33       */
34      void setExpanded(ITableNode node, boolean expanded);
35  
36      /***
37       * Set the expanded state for a node and all of it's children.
38       * 
39       * @param node node to begin with
40       * @param expanded expanded state
41       */
42      void setExpandedRecursive(ITableNode node, boolean expanded);
43  
44      /***
45       * Add a view state listener.
46       * 
47       * @param htvsListener listener to add
48       */
49      void addHierarchicalViewstateListener(IHierarchicalTableViewStateListener htvsListener);
50  
51      /***
52       * Remove a view state listener.
53       * 
54       * @param htvsListener listener to remove
55       */
56      void remHierarchicalViewStateListener(IHierarchicalTableViewStateListener htvsListener);
57  }