KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > registry > ActionSetCategory


1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.internal.registry;
12
13 import java.util.ArrayList JavaDoc;
14
15 /**
16  *
17  */

18 public class ActionSetCategory {
19     private String JavaDoc id;
20     private String JavaDoc label;
21     private ArrayList JavaDoc actionSets;
22 /**
23  * ActionSetCategory constructor comment.
24  */

25 public ActionSetCategory(String JavaDoc id, String JavaDoc label) {
26     super();
27     this.id = id;
28     this.label = label;
29 }
30 /**
31  * Adds an action set to this category.
32  */

33 public void addActionSet(IActionSetDescriptor desc) {
34     if (actionSets == null)
35         actionSets = new ArrayList JavaDoc(5);
36     actionSets.add(desc);
37     desc.setCategory(id);
38 }
39 /**
40  * Returns the action sets for this category.
41  * May be null.
42  */

43 public ArrayList JavaDoc getActionSets() {
44     return actionSets;
45 }
46 /**
47  * Returns category id.
48  */

49 public String JavaDoc getId() {
50     return id;
51 }
52 /**
53  * Returns category name.
54  */

55 public String JavaDoc getLabel() {
56     return label;
57 }
58 }
59
Popular Tags