org.openide.explorer.propertysheet
Class PropertyEnv

java.lang.Object
  |
  +--org.openide.explorer.propertysheet.PropertyEnv

public final class PropertyEnv
extends Object

Instance of this class contains information that is being passed to the property editor (instance of ExtendedPropertyEditor) from the IDE.


Field Summary
static String PROP_STATE
          Name of the state property.
static Object STATE_INVALID
          One possible value for the setState/getState methods.
static Object STATE_NEEDS_VALIDATION
          One possible value for the setState/getState methods.
static Object STATE_VALID
          One possible value for the setState/getState methods.
 
Method Summary
 void addVetoableChangeListener(VetoableChangeListener l)
          Vetoable change listener: listenning here you will be notified when the state of the environment is being changed (when the setState method is being called).
 Object[] getBeans()
          Array of beans that the edited property belongs to.
 FeatureDescriptor getFeatureDescriptor()
          Feature descritor that describes the property.
 Object getState()
          A getter for the current state of the environment.
 void removeVetoableChangeListener(VetoableChangeListener l)
          Vetoable change listener removal.
 void setState(Object state)
          A setter that should be used by the property editor to change the state of the environment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_STATE

public static final String PROP_STATE
Name of the state property.

STATE_VALID

public static final Object STATE_VALID
One possible value for the setState/getState methods. With this value the editor is in a valid state.

STATE_NEEDS_VALIDATION

public static final Object STATE_NEEDS_VALIDATION
One possible value for the setState/getState methods. This one means that the editor does not know its state and it has to validate it later.

STATE_INVALID

public static final Object STATE_INVALID
One possible value for the setState/getState methods. With this one the editor is in invalid state (Ok button on custom editor panel is disabled and an invalid glyph shown on the property panel).
Method Detail

getBeans

public Object[] getBeans()
Array of beans that the edited property belongs to.

getFeatureDescriptor

public FeatureDescriptor getFeatureDescriptor()
Feature descritor that describes the property. It is feature descriptor so one can plug in PropertyDescritor and also Node.Property which both inherit from FeatureDescriptor

setState

public void setState(Object state)
A setter that should be used by the property editor to change the state of the environment. Even the state property is bound, changes made from the editor itself are allowed without restrictions.

getState

public Object getState()
A getter for the current state of the environment.

addVetoableChangeListener

public void addVetoableChangeListener(VetoableChangeListener l)
Vetoable change listener: listenning here you will be notified when the state of the environment is being changed (when the setState method is being called). You can veto the change and provide a displayable information in the thrown exception. Use the ErrorManager annotaion feature for the your exception to modify the message and severity.

removeVetoableChangeListener

public void removeVetoableChangeListener(VetoableChangeListener l)
Vetoable change listener removal.


Built on December 12 2001.  |  Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.