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