| java.lang.Object org.netbeans.modules.vmd.api.model.DesignEvent
DesignEvent | final public class DesignEvent (Code) | | The class represents a document change event. There is an only one event type for document changes. The class tracks
all types of changes. Types of changes are: Any change of a property value, components hierarchy, or selection.
The event also contains all values of property values. These old values are one that were store at the begining of the transaction.
When a property is overriden many times, only the newest value is stored in the document and the oldest value is stored
in the event.
When a component hierarchy is changed, the event remembers which components were affected during the transaction.
The newest hierarchy is stored in the document. There is no way how to resolve state before the transaction. Also
when a component is removed from and then added back to structure, so hierarchy is the same as before, an event is fired
anyway and the component and its parent are marked as hierarchy-modified.
When a component is created, the event remembers all those components that were created during the transaction.
author: David Kaspar |
Constructor Summary | |
| DesignEvent(long eventID, Set<DesignComponent> fullyComponents, Set<DesignComponent> partlyComponents, Set<DesignComponent> fullyHierarchies, Set<DesignComponent> partlyHierarchies, Set<DesignComponent> descriptorChangedComponents, Set<DesignComponent> createdComponents, HashMap<DesignComponent, HashMap<String, PropertyValue>> oldPropertyValues, boolean selectionChanged) |
DesignEvent | DesignEvent(long eventID, Set<DesignComponent> fullyComponents, Set<DesignComponent> partlyComponents, Set<DesignComponent> fullyHierarchies, Set<DesignComponent> partlyHierarchies, Set<DesignComponent> descriptorChangedComponents, Set<DesignComponent> createdComponents, HashMap<DesignComponent, HashMap<String, PropertyValue>> oldPropertyValues, boolean selectionChanged)(Code) | | |
getCreatedComponents | public Set<DesignComponent> getCreatedComponents()(Code) | | Returns a set of all components that were created during a transaction.
the set of created components |
getDescriptorChangedComponents | public Set<DesignComponent> getDescriptorChangedComponents()(Code) | | Returns a set of all components whose component descriptor is changed during a transaction because of component-descriptor-registry update.
the set of components with changed descriptor |
getEventID | public long getEventID()(Code) | | Returns an event id. The id is increasing non-negative number.
the event id |
getFullyAffectedComponents | public Set<DesignComponent> getFullyAffectedComponents()(Code) | | Returns a set of all components that have at least one property changed during a transaction.
the set of fully property-affected components |
getFullyAffectedHierarchies | public Set<DesignComponent> getFullyAffectedHierarchies()(Code) | | Returns a set of all components that have changed their placement in components-hierarchy during a transaction.
An affected component is the one that is added to or removed from a parent component. The parent component is
an affected component too.
the set of fully hierarchy-affected components |
getOldPropertyValue | public PropertyValue getOldPropertyValue(DesignComponent component, String propertyName)(Code) | | Returns an old value of a property of a component.
Parameters: component - the component Parameters: propertyName - the property name the old value, null if a property is not changed |
getPartlyAffectedComponents | public Set<DesignComponent> getPartlyAffectedComponents()(Code) | | Returns a set of all components where they or one of their sub-components have at least one property changed during a transaction.
the set of partly property-affected components |
getPartlyAffectedHierarchies | public Set<DesignComponent> getPartlyAffectedHierarchies()(Code) | | Returns a set of all components where they or one of their sub-components have changed their placement
in components-hierarchy during a transaction.
An affected component is the one that is added to or removed from a parent component. The parent component is
an affected component too.
the set of partly hierarchy-affected components |
isComponentPropertyChanged | public boolean isComponentPropertyChanged(DesignComponent component, String propertyName)(Code) | | Returns whether a property of a component is changed.
Parameters: component - the component Parameters: propertyName - the property name true, if a property is changed |
isSelectionChanged | public boolean isSelectionChanged()(Code) | | Returns whether a selection is changed. The actual selection is store in a document.
true if changed. |
isStructureChanged | public boolean isStructureChanged()(Code) | | Returns whether a document structure is changed. It means a property, hierarchy, or a descriptor is changed.
true if a structure is changed |
|
|