01: /*******************************************************************************
02: * Copyright (c) 2004, 2007 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal.presentations.r33;
11:
12: import org.eclipse.ui.internal.preferences.AbstractBooleanListener;
13: import org.eclipse.ui.internal.preferences.IDynamicPropertyMap;
14:
15: /**
16: * @since 3.1
17: */
18: public final class DefaultSimpleTabListener extends
19: AbstractBooleanListener {
20:
21: private DefaultTabFolder folder;
22:
23: /**
24: * @param map
25: * @param propertyId
26: * @param defaultValue
27: */
28: public DefaultSimpleTabListener(IDynamicPropertyMap map,
29: String propertyId, DefaultTabFolder folder) {
30: super ();
31:
32: this .folder = folder;
33:
34: attach(map, propertyId, true);
35: }
36:
37: /* (non-Javadoc)
38: * @see org.eclipse.ui.internal.preferences.AbstractBooleanListener#handleValue(boolean)
39: */
40: protected void handleValue(boolean b) {
41: folder.setSimpleTabs(b);
42: }
43:
44: }
|