Project

General

Profile

Download (1.58 KB) Statistics
| Branch: | Tag: | Revision:
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.gef.palette;
12

    
13
import java.util.List;
14

    
15
/**
16
 * A PaletteGroup consists of a group of
17
 * {@link org.eclipse.gef.palette.PaletteEntry} objects that are uncollapsible .
18
 * The user modification level is set to
19
 * {@link PaletteEntry#PERMISSION_NO_MODIFICATION}, meaning that the entries
20
 * cannot be reordered.
21
 */
22
public class PaletteGroup extends PaletteContainer {
23

    
24
	/** Type Identifier **/
25
	public static final String PALETTE_TYPE_GROUP = "Palette_Group";//$NON-NLS-1$
26

    
27
	/**
28
	 * Creates a new PaletteGroup with the given label
29
	 * 
30
	 * @param label
31
	 *            the label
32
	 */
33
	public PaletteGroup(String label) {
34
		super(label, null, null, PALETTE_TYPE_GROUP);
35
		setUserModificationPermission(PERMISSION_NO_MODIFICATION);
36
	}
37

    
38
	/**
39
	 * Creates a new PaletteGroup with the given label and list of
40
	 * {@link PaletteEntry Palette Entries}.
41
	 * 
42
	 * @param label
43
	 *            the label
44
	 * @param children
45
	 *            the list of PaletteEntry children
46
	 */
47
	public PaletteGroup(String label, List children) {
48
		this(label);
49
		addAll(children);
50
	}
51

    
52
}
(8-8/18)