Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.togethersoft.openapi.ide.inspector
Class IdeInspectorPropertySetComponent

    java.lang.Object
      |
      +--java.beans.FeatureDescriptor
            |
            +--com.togethersoft.openapi.ide.inspector.IdeInspectorComponent
                  |
                  +--com.togethersoft.openapi.ide.inspector.IdeInspectorPropertySetComponent

public class IdeInspectorPropertySetComponent
extends IdeInspectorComponent
implements PropertyChangeListener

Represents inspector component that keeps a list of properties. This components handles the properties same way as IdeInspector handles the components.

Author:
  TogetherSoft

Field Summary
`protected Vector` | `myConditions`
`protected IdeContext` | `myContext`
`protected double` | `myMaxWeight`
`protected Vector` | `myProperties`
`protected Vector` | `myVisibleProperties`
`protected Vector` | `myWeights`
`final static String` | `PROP_VISIBLE_PROPERTIES`

Constructor Summary
`IdeInspectorPropertySetComponent(IdeContext context)` Creates new component keeps properties inside an inspector for specified context.

Method Summary
`void` | `addProperty(IdeInspectorProperty property, Condition condition)` Adds new property to this component and sets weight for it to 1 more then maximum weight.
`void` | `addProperty(IdeInspectorProperty property, Condition condition, double weight)` Adds new property with specified visibility condition and weight.
`void` | `addPropertyChangeListener(PropertyChangeListener listener)` Adds new listener of property change event.
`IdeInspectorProperty` | `findProperty(String name)` Search for the property specified by it's name.
`protected void` | `firePropertyChange(String propertyName, Object oldValue, Object newValue)` Initiates change of specified porperty.
`Condition` | `getCondition(IdeInspectorProperty property)` Returns visibility condition for specified property.
`IdeInspectorProperty[]` | `getProperties()` Returns all properties.
`IdeInspectorProperty[]` | `getVisibleProperties()` Returns all visible properties.
`double` | `getWeight(IdeInspectorProperty property)` Returns weight for specified property.
`void` | `propertyChange(PropertyChangeEvent e)`
`void` | `removeProperty(IdeInspectorProperty property)` Removes specified property, it's visibility condition and weight.
`void` | `removePropertyChangeListener(PropertyChangeListener listener)` Removes listener of property change event.
`void` | `update()` Rebuildes list of visible properties, weights of them and fires change of PROP_VISIBLE_PROPERTIES property.

Methods inherited from class com.togethersoft.openapi.ide.inspector.IdeInspectorComponent
`getService, setService`

Methods inherited from class java.beans.FeatureDescriptor
`getName, setName, getDisplayName, setDisplayName, isExpert, setExpert, isHidden, setHidden, isPreferred, setPreferred, getShortDescription, setShortDescription, setValue, getValue, attributeNames`

Methods inherited from class java.lang.Object
`getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize`

Field Detail

### myConditions

    protected Vector myConditions

  associates
  clientCardinality 1..*

### myContext

    protected IdeContext myContext

### myMaxWeight

    protected double myMaxWeight

### myProperties

    protected Vector myProperties

  associates
  clientCardinality 1..*
  label getComponents()
  link aggregation

### myVisibleProperties

    protected Vector myVisibleProperties

  associates
  label getProperties()
  clientCardinality 1..*

### myWeights

    protected Vector myWeights

### PROP_VISIBLE_PROPERTIES

    public final static String PROP_VISIBLE_PROPERTIES

Constructor Detail

### IdeInspectorPropertySetComponent

    public IdeInspectorPropertySetComponent(IdeContext context)

  Creates new component keeps properties inside an inspector for specified context.

Method Detail

### addProperty

    public void addProperty(IdeInspectorProperty property, Condition condition)

  Adds new property to this component and sets weight for it to 1 more then maximum weight.
  Parameters:
    property - Property to be added.
    condition - Visibility condition for this property.

### addProperty

    public void addProperty(IdeInspectorProperty property, Condition condition, double weight)

  Adds new property with specified visibility condition and weight.
  Parameters:
    property - Property to be added.
    condition - Visibility condition.
    weight - Specifies weight for this property to insert it between existing.

### addPropertyChangeListener

    public void addPropertyChangeListener(PropertyChangeListener listener)

  Adds new listener of property change event.

### findProperty

    public IdeInspectorProperty findProperty(String name)

  Search for the property specified by it's name.
  Parameters:
    name - Name of property as a `String`.
  Returns: IdeInspectorProperty if found, `null` otherwise.

### firePropertyChange

    protected void firePropertyChange(String propertyName, Object oldValue, Object newValue)

  Initiates change of specified porperty.

### getCondition

    public Condition getCondition(IdeInspectorProperty property)

  Returns visibility condition for specified property.

### getProperties

    public IdeInspectorProperty[] getProperties()

  Returns all properties.
  Returns: Array of all properties.

### getVisibleProperties

    public IdeInspectorProperty[] getVisibleProperties()

  Returns all visible properties.
  Returns: Array of visible properties.

### getWeight

    public double getWeight(IdeInspectorProperty property)

  Returns weight for specified property.
  Returns: `double` weight for specified property.

### propertyChange

    public void propertyChange(PropertyChangeEvent e)

### removeProperty

    public void removeProperty(IdeInspectorProperty property)

  Removes specified property, it's visibility condition and weight. If this property had maximum weight than recalculates maximum weight.
  Parameters:
    property - Property to be removed.

### removePropertyChangeListener

    public void removePropertyChangeListener(PropertyChangeListener listener)

  Removes listener of property change event.

### update

    public void update()

  Rebuildes list of visible properties, weights of them and fires change of PROP_VISIBLE_PROPERTIES property. Then updates all visible properties.

Association Links

to Class java.lang.String

to Class com.togethersoft.openapi.ide.IdeContext

to Class com.togethersoft.openapi.ide.inspector.IdeInspectorProperty

  Label getProperties()
  Client Cardinality 1..*
  associates

to Class com.togethersoft.openapi.ide.inspector.IdeInspectorProperty

  Label getComponents()
  Client Cardinality 1..*
  Type aggregation
  associates

to Class com.togethersoft.openapi.ide.inspector.Condition

  Client Cardinality 1..*
  associates

to Class java.util.Vector

to Class java.beans.PropertyChangeSupport

Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD