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.util.table
Class RwiElementsComponent

    java.lang.Object
      |
      +--java.beans.FeatureDescriptor
            |
            +--com.togethersoft.openapi.ide.inspector.IdeInspectorComponent
                  |
                  +--com.togethersoft.openapi.ide.inspector.util.table.RwiElementsComponent

Direct Known Subclasses:
  RwiMembersComponent

public abstract class RwiElementsComponent
extends IdeInspectorComponent

Class `RwiElementsComponent` provides a storage for keeping `IdeInspectorProperties` relating to the same `RwiElement`s.

For each `RwiElement` there is an associated `IdeInspectorPropertySetComponent` (presumably containg some set of `IdeInspectorProperties` related to the `RwiElement`). This class contains abstract method `IdeInspectorPropertySetComponent createIdePropertySetForRwiElement(RwiElement rwiElement)`; which is used in the `addRwiElement(RwiElement rwiElement)` method. In the `createIdePropertySetForRwiElement` method you must create an instance of `IdeInspectorPropertySetComponent` and fill it with appropriate `IdeInspectorProperties`.

Method `checkRwiElement(RwiElement)` is used in `addRwiElement` method to check if the specified method is suitable for this storage. If you want to work only with specific `RwiElements`, you must override this method.

Author:
  TogetherSoft

Field Summary
`protected IdeContext` | `myContext`

Constructor Summary
`RwiElementsComponent(IdeContext context)` Constructs `RwiElementsComponent` object for the specified `IdeContext`.

Method Summary
`void` | `addPropertyChangeListener(PropertyChangeListener listener)` Adds specified listener of the property changes.
`void` | `addRwiElement(RwiElement rwiElement)` Adds a PropertySet to the specified `RwiElement` to this component.
`protected boolean` | `checkRwiElement(RwiElement rwiElement)` Should be overridden for working only with specific kinds of `RwiElement`s.
`protected abstract IdeInspectorPropertySetComponent` | `createIdePropertySetForRwiElement(RwiElement rwiElement)` In this method you must create `IdeInspectorPropertySetComponent` with some `IdeInspectorProperties`.
`protected void` | `firePropertyChange(String propertyName, Object oldValue, Object newValue)` Fires change of property.
`protected RwiElement[]` | `getCandidatesToAdd()`
`int` | `getRwiElementIndex(RwiElement rwiElement)` Returns the index of the specified `RwiElement` in this component.
`RwiElement[]` | `getRwiElements()` Returns all inspected `RwiElement`s.``
`IdeInspectorPropertySetComponent[]` | `getRwiElementsPropertySets()` Returns an array of `IdeInspectorPropertySetComponent`s (this array represents the rows for the table model).``
`void` | `removePropertyChangeListener(PropertyChangeListener listener)` Removes specified `listener` of property changes.
`void` | `removeRwiElement(RwiElement rwiElement)` Removes PropertySet of the specified `RwiElement` from this component.
`protected void` | `resetElements()` Removes all `PropertySetComponents` from this component.
`void` | `update()`

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

### myContext

    protected IdeContext myContext

Constructor Detail

### RwiElementsComponent

    public RwiElementsComponent(IdeContext context)

  Constructs `RwiElementsComponent` object for the specified `IdeContext`.
  Parameters:
    context - `IdeContext` containing RwiElements

Method Detail

### addPropertyChangeListener

    public void addPropertyChangeListener(PropertyChangeListener listener)

  Adds specified listener of the property changes.
  Parameters:
    listener - `PropertyChangeListener` to be added

### addRwiElement

    public void addRwiElement(RwiElement rwiElement)

  Adds a PropertySet to the specified `RwiElement` to this component.
  Parameters:
    rwiElement - `RwiElement` for which PropertySet will be added

### checkRwiElement

    protected boolean checkRwiElement(RwiElement rwiElement)

  Should be overridden for working only with specific kinds of `RwiElement`s.
  Parameters:
    rwiElement - RwiElement to be checked
  Returns: `true`

### createIdePropertySetForRwiElement

    protected abstract IdeInspectorPropertySetComponent createIdePropertySetForRwiElement(RwiElement rwiElement)

  In this method you must create `IdeInspectorPropertySetComponent` with some `IdeInspectorProperties`. For example:

       protected IdeInspectorPropertySetComponent createIdePropertySetForRwiElement(RwiElement rwiElement){
         IdeInspectorPropertySetComponent idePropertySetComponent = new IdeInspectorPropertySetComponent(null);
         idePropertySetComponent.addProperty(new RwiInspectorStringProperty(rwiElement, RwiProperty.NAME), null);
         idePropertySetComponent.addProperty(new RwiInspectorStringProperty(rwiElement, RwiProperty.TYPE), null);
         idePropertySetComponent.addProperty(new RwiInspectorStringProperty(rwiElement, RwiProperty.UNIQUE_NAME), null);
         return idePropertySetForBeanProperty;
       }

  In this example we create three IdeInspectorProperties in each IdeInspectorPropertySetComponent. The RwiElementsTableModel will treat it as we were defining three columns in the table.

### firePropertyChange

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

  Fires change of property.
  Parameters:
    propertyName - `String` Name of the property to be changed
    oldValue - `Object` Old value of this property
    newValue - `Object` New value of this property

### getCandidatesToAdd

    protected RwiElement[] getCandidatesToAdd()

### getRwiElementIndex

    public int getRwiElementIndex(RwiElement rwiElement)

  Returns the index of the specified `RwiElement` in this component.
  Returns: `int` index of specified RwiElement in this component

### getRwiElements

    public RwiElement[] getRwiElements()

  Returns all inspected `RwiElement`s.``
  Returns: An array of RwiElements

### getRwiElementsPropertySets

    public IdeInspectorPropertySetComponent[] getRwiElementsPropertySets()

  Returns an array of `IdeInspectorPropertySetComponent`s (this array represents the rows for the table model).``
  Returns: an array of IdeInspectorPropertySetComponents
  See Also:
    RwiElementsTableModel

### removePropertyChangeListener

    public void removePropertyChangeListener(PropertyChangeListener listener)

  Removes specified `listener` of property changes.
  Parameters:
    listener - `PropertyChangeListener` to be removed

### removeRwiElement

    public void removeRwiElement(RwiElement rwiElement)

  Removes PropertySet of the specified `RwiElement` from this component.
  Parameters:
    rwiElement - `RwiElement` for which PropertySet will be removed

### resetElements

    protected void resetElements()

  Removes all `PropertySetComponents` from this component.

### update

    public void update()

Association Links

to Class com.togethersoft.openapi.ide.IdeContext

to Class java.util.Vector

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