KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > presentations > defaultpresentation > DefaultSimpleTabListener


1 /*******************************************************************************
2  * Copyright (c) 2004, 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.presentations.defaultpresentation;
12
13 import org.eclipse.ui.internal.preferences.AbstractBooleanListener;
14 import org.eclipse.ui.internal.preferences.IDynamicPropertyMap;
15
16 /**
17  * @since 3.1
18  */

19 public final class DefaultSimpleTabListener extends AbstractBooleanListener {
20
21     private DefaultTabFolder folder;
22     
23     /**
24      * @param map
25      * @param propertyId
26      * @param defaultValue
27      */

28     public DefaultSimpleTabListener(IDynamicPropertyMap map, String JavaDoc propertyId, DefaultTabFolder folder) {
29         super();
30         
31         this.folder = folder;
32         
33         attach(map, propertyId, true);
34     }
35     
36     /* (non-Javadoc)
37      * @see org.eclipse.ui.internal.preferences.AbstractBooleanListener#handleValue(boolean)
38      */

39     protected void handleValue(boolean b) {
40         folder.setSimpleTabs(b);
41     }
42
43 }
44
Popular Tags