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 org.simantics.browsing.ui.BuiltinKeys;
15 import org.simantics.browsing.ui.NodeContext;
16 import org.simantics.browsing.ui.PrimitiveQueryProcessor;
19 * A primitive query processor (see {@link PrimitiveQueryProcessor}) interface
20 * for externally controlling the results of
21 * {@link BuiltinKeys#SHOW_MAX_CHILDREN} queries.
23 * @author Tuukka Lehtonen
25 public interface ShowMaxChildrenProcessor {
28 * Set internal processor showAllChildren status without notifying the graph
29 * explorer query cache of changes.
31 * @param context the context to mark
32 * @param maxChildren the new max child count or 0 to make this processor
33 * return <code>null</code> when queried
34 * @return <code>true</code> if the node's expanded state was changed,
35 * <code>false</code> otherwise
37 boolean setShowMaxChildren(NodeContext context, int maxChildren);
40 * Replace the current processor showAllChildren status and notify the graph
41 * explorer query cache of changes.
43 * @param context the context to mark
44 * @param maxChildren the new max child count or 0 to make this processor
45 * return <code>null</code> when queried
46 * @return <code>true</code> if the node's expanded state was changed,
47 * <code>false</code> otherwise
49 boolean replaceShowMaxChildren(NodeContext context, int maxChildren);