KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > views > properties > PropertySheetAction


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 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.ui.views.properties;
12
13 import org.eclipse.jface.action.Action;
14
15 /**
16  * This is the base class of all the local actions used
17  * in the PropertySheet.
18  */

19 /*package*/abstract class PropertySheetAction extends Action {
20     protected PropertySheetViewer viewer;
21
22     private String JavaDoc id;
23
24     /**
25      * Create a PropertySheetViewer action.
26      */

27     protected PropertySheetAction(PropertySheetViewer viewer, String JavaDoc name) {
28         super(name);
29         this.id = name;
30         this.viewer = viewer;
31     }
32
33     /**
34      * Return the unique action ID that will be
35      * used in contribution managers.
36      */

37     public String JavaDoc getId() {
38         return id;
39     }
40
41     /**
42      * Return the PropertySheetViewer
43      */

44     public PropertySheetViewer getPropertySheet() {
45         return viewer;
46     }
47
48     /**
49      * Set the unique ID that should be used
50      * in the contribution managers.
51      */

52     public void setId(String JavaDoc newId) {
53         id = newId;
54     }
55 }
56
Popular Tags