1 /*******************************************************************************
\r
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
\r
3 * in Industry THTH ry.
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.browsing.ui.common.processors;
\r
14 import java.util.Collection;
\r
16 import org.simantics.browsing.ui.GraphExplorer;
\r
17 import org.simantics.browsing.ui.NodeContext;
\r
20 * @author Tuukka Lehtonen
\r
22 public interface IsExpandedProcessor {
\r
25 * @return all expanded nodes in the owner {@link GraphExplorer}
\r
27 Collection<NodeContext> getExpanded();
\r
30 * @param context the context to test for expandedness
\r
31 * @return <code>true</code> if expanded
\r
33 boolean getExpanded(NodeContext context);
\r
36 * Set internal processor expanded status without notifying the graph
\r
37 * explorer query cache of changes.
\r
39 * @param context the context to mark as expanded
\r
40 * @param expanded the new expanded state
\r
41 * @return <code>true</code> if the node's expanded state was changed,
\r
42 * <code>false</code> otherwise
\r
44 boolean setExpanded(NodeContext context, boolean expanded);
\r
47 * Replace the current processor expanded status and notify the graph
\r
48 * explorer query cache of changes.
\r
50 * @param context the context to mark as expanded
\r
51 * @param expanded the new expanded state
\r
52 * @return <code>true</code> if the node's expanded state was changed,
\r
53 * <code>false</code> otherwise
\r
55 boolean replaceExpanded(NodeContext context, boolean expanded);
\r