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