| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.beans.FeatureDescriptor
|
+--com.togethersoft.openapi.ide.inspector.IdeInspector
Represents abstract inspector which is used to control properties of ide
components. Inspector contains a number of IdeInspectorComponents
to store the properties and other information about ide components.
All inspector components are categorized into visible and non-visible by specifying
visibility condition for each component. Inspector sorts
all components by weights - double numbers, one for each inspector
component. This numbers are double in order to insert any number of new
inspector components between the existing ones.
| Field Summary | |
protected Vector | myComponents |
protected Vector | myConditions |
protected IdeContext | myContext |
protected double | myMaxWeight |
protected Vector | myVisibleComponents |
protected Vector | myWeights |
final static String | PROP_SELECTED_COMPONENT |
final static String | PROP_VISIBLE_COMPONENTS |
| Constructor Summary | |
IdeInspector(IdeContext context)Creates new inspector for specified context. | |
| Method Summary | |
void | addComponent(IdeInspectorComponent component, Condition condition)Adds new component to this inspector and sets it's weight for to be greater by one than the maximum weight. |
void | addComponent(IdeInspectorComponent component, Condition condition, double weight)Adds new component with the specified visibility condition and weight. |
void | addPropertyChangeListener(PropertyChangeListener listener)Adds new listener of property change event. |
void | clear()Clears this inspector, that is removes all components, visibility conditions and weights. |
IdeInspectorComponent | findComponent(String name)Seeks for the component specified by it's name. |
protected void | firePropertyChange(String propertyName, Object oldValue, Object newValue)Initiates change of the specified property. |
IdeInspectorComponent[] | getComponents()Returns components of this inspector . |
Condition | getCondition(IdeInspectorComponent component)Returns condition of visibility for the specified inspector component. |
IdeInspectorComponent | getSelectedComponent()Returns visually selected component. |
Object | getService(Class clazz)Returns Object that provides a service for this inspector. |
IdeInspectorComponent[] | getVisibleComponents()Returns visible inspector components. |
double | getWeight(IdeInspectorComponent component)Returns the weight for the specified inspector component. |
void | removeComponent(IdeInspectorComponent component)Removes specified component, it's visibility condition and weight. |
void | removePropertyChangeListener(PropertyChangeListener listener)Removes specified listener of property change event. |
void | setSelectedComponent(IdeInspectorComponent component)Sets visually selected component and fires change of the property PROP_SELECTED_COMPONENT. |
void | setService(Class clazz, Object service)Adds new service for this inspector. |
void | update()Rebuildes the list of visible components, re-calculates their weights and fires the change of PROP_VISIBLE_COMPONENTS property. |
| 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 |
protected Vector myComponents
protected Vector myConditions
protected IdeContext myContext
protected double myMaxWeight
protected Vector myVisibleComponents
protected Vector myWeights
public final static String PROP_SELECTED_COMPONENT
public final static String PROP_VISIBLE_COMPONENTS
| Constructor Detail |
public IdeInspector(IdeContext context)
IdeContext for which teh new inspector is created| Method Detail |
public void addComponent(IdeInspectorComponent component, Condition condition)
IdeInspectorComponent to be addedCondition of Visibility for this componentpublic void addComponent(IdeInspectorComponent component, Condition condition, double weight)
IdeInspectorComponent to be addedCondition of Visibility for this componentdouble weight for this component to inserted between the existing onespublic void addPropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener object that listens to the property change eventpublic void clear()
public IdeInspectorComponent findComponent(String name)
String name of the componentIdeInspectorComponent if found, null otherwiseprotected void firePropertyChange(String propertyName, Object oldValue, Object newValue)
String name of the property to be changedObject initial value of this propertyObject to be assigned to this propertypublic IdeInspectorComponent[] getComponents()
IdeInspectorComponent[] Array of inspector componentspublic Condition getCondition(IdeInspectorComponent component)
IdeInspectorComponent whose visibility condition is to be obtainedCondition of visibility for the specified componentpublic IdeInspectorComponent getSelectedComponent()
IdeInspectorComponent objectpublic Object getService(Class clazz)
Object that provides a service for this inspector.
In the HashTable of services the key for the service object is the class of this object.Class that defines the key for the serviceObject that provides the servicepublic IdeInspectorComponent[] getVisibleComponents()
IdeInspectorComponent[] Array of visible componentspublic double getWeight(IdeInspectorComponent component)
component.IdeInspectorComponent whose weight is to be obtaineddouble Weight for this inspector component.public void removeComponent(IdeInspectorComponent component)
IdeInspectorComponent to be removedpublic void removePropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener object that listens to the property change eventpublic void setSelectedComponent(IdeInspectorComponent component)
PROP_SELECTED_COMPONENT.IdeInspectorComponentpublic void setService(Class clazz, Object service)
Class that provides the serviceObject instance of this class.public void update()
PROP_VISIBLE_COMPONENTS property. Then updates all visible components.| Association Links |
to Class java.lang.String
to Class com.togethersoft.openapi.ide.IdeContext
to Class com.togethersoft.openapi.ide.inspector.IdeInspectorComponent
to Class com.togethersoft.openapi.ide.inspector.IdeInspectorComponent
to Class com.togethersoft.openapi.ide.inspector.Condition
to Class java.util.Vector
to Class java.beans.PropertyChangeSupport
to Class java.util.Hashtable
to Class com.togethersoft.openapi.ide.inspector.IdeInspectorComponent
| |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||