KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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  * Gunnar Wagenknecht - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.views.properties;
12
13 /**
14  * Extension to the standard <code>IPropertySource</code> interface.
15  * <p>
16  * This interface provides extended API to <code>IPropertySource</code> to
17  * allow an easier indication of properties that have a default value and can be
18  * resetted.
19  * </p>
20  *
21  * @since 3.0
22  * @see org.eclipse.ui.views.properties.IPropertySource
23  */

24 public interface IPropertySource2 extends IPropertySource {
25
26     /**
27      * Returns whether the value of the property with the specified id is
28      * resettable to a default value.
29      *
30      * @param id
31      * the id of the property
32      * @return <code>true</code> if the property with the specified id has a
33      * meaningful default value to which it can be resetted, and
34      * <code>false</code> otherwise
35      * @see IPropertySource#resetPropertyValue(Object)
36      * @see IPropertySource#isPropertySet(Object)
37      */

38     boolean isPropertyResettable(Object JavaDoc id);
39
40     /**
41      * <code>IPropertySource2</code> overrides the specification of this <code>IPropertySource</code>
42      * method to return <code>true</code> instead of <code>false</code> if the specified
43      * property does not have a meaningful default value.
44      * <code>isPropertyResettable</code> will only be called if <code>isPropertySet</code> returns
45      * <code>true</code>.
46      * <p>
47      * Returns whether the value of the property with the given id has changed
48      * from its default value. Returns <code>false</code> if this source does
49      * not have the specified property.
50      * </p>
51      * <p>
52      * If the notion of default value is not meaningful for the specified
53      * property then <code>true</code> is returned.
54      * </p>
55      *
56      * @param id
57      * the id of the property
58      * @return <code>true</code> if the value of the specified property has
59      * changed from its original default value, <code>true</code> if
60      * the specified property does not have a meaningful default value,
61      * and <code>false</code> if this source does not have the
62      * specified property
63      * @see IPropertySource2#isPropertyResettable(Object)
64      * @see #resetPropertyValue(Object)
65      * @since 3.1
66      */

67     public boolean isPropertySet(Object JavaDoc id);
68 }
69
Popular Tags