]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.browsing.ui.common/src/org/simantics/browsing/ui/common/processors/ShowMaxChildrenProcessor.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.browsing.ui.common / src / org / simantics / browsing / ui / common / processors / ShowMaxChildrenProcessor.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
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
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.browsing.ui.common.processors;
13
14 import org.simantics.browsing.ui.BuiltinKeys;
15 import org.simantics.browsing.ui.NodeContext;
16 import org.simantics.browsing.ui.PrimitiveQueryProcessor;
17
18 /**
19  * A primitive query processor (see {@link PrimitiveQueryProcessor}) interface
20  * for externally controlling the results of
21  * {@link BuiltinKeys#SHOW_MAX_CHILDREN} queries.
22  * 
23  * @author Tuukka Lehtonen
24  */
25 public interface ShowMaxChildrenProcessor {
26
27     /**
28      * Set internal processor showAllChildren status without notifying the graph
29      * explorer query cache of changes.
30      * 
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
36      */
37     boolean setShowMaxChildren(NodeContext context, int maxChildren);
38
39     /**
40      * Replace the current processor showAllChildren status and notify the graph
41      * explorer query cache of changes.
42      * 
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
48      */
49     boolean replaceShowMaxChildren(NodeContext context, int maxChildren);
50
51 }