KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > PageSelectionService


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.internal;
12
13 import org.eclipse.ui.IWorkbenchPage;
14
15 /**
16  * The selection service for a page.
17  */

18 /* package */
19 class PageSelectionService extends AbstractSelectionService {
20
21     private IWorkbenchPage page;
22
23     /**
24      * Creates a new selection service for a specific workbench page.
25      */

26     public PageSelectionService(IWorkbenchPage page) {
27         setPage(page);
28     }
29
30     /**
31      * Sets the page.
32      */

33     private void setPage(IWorkbenchPage page) {
34         this.page = page;
35     }
36
37     /**
38      * Returns the page.
39      */

40     protected IWorkbenchPage getPage() {
41         return page;
42     }
43
44     /*
45      * @see AbstractSelectionService#createPartTracker(String)
46      */

47     protected AbstractPartSelectionTracker createPartTracker(String JavaDoc partId) {
48         return new PagePartSelectionTracker(getPage(), partId);
49     }
50
51 }
52
Popular Tags